]> git.baikalelectronics.ru Git - kernel.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)
commit213a24f9bd4a3914e8d8fd3536d707bbdc60de76
tree0899a1087c0c4cde4d44cdcd651a6a36e6dbee96
parent476a54c09dbe561e4635ac29376f02f627fda6cc
[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