]> git.openfabrics.org - ~emulex/infiniband.git/commit
[SCSI] zfcp: eliminate race between validation and locking
authorSwen Schillig <swen@vnet.ibm.com>
Wed, 26 Nov 2008 17:07:39 +0000 (18:07 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 1 Dec 2008 16:17:50 +0000 (10:17 -0600)
commit0ac55aa90f2c3bd08e57e52a513b82b18ce0a5bc
tree0899a1087c0c4cde4d44cdcd651a6a36e6dbee96
parent26871c97d52e50dc574bd01967926650643b142a
[SCSI] zfcp: eliminate race between validation and locking

The check of having a valid pointer was performed before the
processing was secured by the lock. Between those two steps the
pointer can turn invalid.  During further processing another value is
used (referenced by the pointer described above) as a function pointer
which is never verified to be valid either, resulting under some
circumstances in an invalid function call.  This patch is fixing both
issues.

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