diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-06-15 23:22:14 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-21 10:52:42 -0500 |
commit | 30c9afa6cc477f6f21f8a0b36f3b81080941a0c9 (patch) | |
tree | 863c391cc13e13d005e55096ff3436e973c06453 /drivers/scsi/u14-34f.c | |
parent | 111986593561fc4c94a1fba3f3cd84476fb40b22 (diff) |
fix race that can give duplicate host number
Just once, two fcoe instances got the same host number
from scsi_add_host().
Use atomic_t and atomic_inc_return() to get next host number.
Subtract 1, so that scsi_host still starts with 0.
[jejb: added comment about unusual subtraction]
Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/u14-34f.c')
0 files changed, 0 insertions, 0 deletions