From: Gal Rosen Date: Thu, 21 Jan 2010 08:15:32 +0000 (+0200) Subject: [SCSI] scsi_transport_fc: Fix synchronization issue while deleting vport X-Git-Tag: v2.6.34-rc2~18^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d9dc7c8b9b7fa0f53647423b41056ee1beed735;p=pandora-kernel.git [SCSI] scsi_transport_fc: Fix synchronization issue while deleting vport The issue occur while deleting 60 virtual ports through the sys interface /sys/class/fc_vports/vport-X/vport_delete. It happen while in a mistake each request sent twice for the same vport. This interface is asynchronous, entering the delete request into a work queue, allowing more than one request to enter to the delete work queue. The result is a NULL pointer. The first request already delete the vport, while the second request got a pointer to the vport before the device destroyed. Re-create vport later cause system freeze. Solution: Check vport flags before entering the request to the work queue. [jejb: fixed int<->long problem on spinlock flags variable] Signed-off-by: Gal Rosen Acked-by: James Smart Cc: Stable Tree Signed-off-by: James Bottomley --- Reading git-diff-tree failed