[SCSI] zfcp: Locking for req_no and req_seq_no
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Tue, 8 May 2007 09:15:48 +0000 (11:15 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 8 May 2007 16:55:19 +0000 (11:55 -0500)
commit801e0ced1891a2b8cad1a435c45234a719b3b6bf
tree9d7b203148f6040c855462d3eff20eae741de2b6
parent1d589edf9eeb60c9c8e62753d05cf4c8e094e5a7
[SCSI] zfcp: Locking for req_no and req_seq_no

There is a possible race condition while generating the unique
request ids and sequence numbers. Both might be read at the
same time and have the same value. Fix this by serializing the
access through the queue lock of the adapter: First call
zfcp_fsf_req_sbal_get that acquires the lock, then read and
increment the unique ids.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/s390/scsi/zfcp_fsf.c