]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnx2fc: Fix kernel panic when deleting NPIV ports
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>
Fri, 27 May 2011 18:47:27 +0000 (11:47 -0700)
committerBob Picco <bob.picco@oracle.com>
Fri, 3 Feb 2012 18:18:31 +0000 (13:18 -0500)
commita633cd73e7b3f8bc785fb240df98ac1546f7515d
tree6c9b8910c6e5ea907352d0e0ecd72b6b5f5ab7dc
parentb92cde9870b6e323225efc7efd92b4dfe56a2e6c
bnx2fc: Fix kernel panic when deleting NPIV ports

Deleting NPIV port causes a kernel panic when the NPIV port is in the same zone
as the physical port and shares the same LUN. This happens due to the fact that
vport destroy and unsolicited ELS are scheduled to run on the same workqueue,
and vport destroy destroys the lport and the unsolicited ELS tries to access
the invalid lport.  This patch fixes this issue by maintaining a list of valid
lports and verifying if the lport is valid or not before accessing it.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d36b3279e157641c345b12eddb3db78fb42da80f)
drivers/scsi/bnx2fc/bnx2fc.h
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
drivers/scsi/bnx2fc/bnx2fc_hwi.c