diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2012-01-23 21:00:46 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 09:08:58 -0500 |
commit | 2a7b29c5f267c143e280c1a5174a0d930bd6c1e3 (patch) | |
tree | 85c58f26d3eaac2cf183e765fd023d5c54d0aa41 /drivers/scsi/bnx2fc | |
parent | 9f71af2febd53620a379d71527f98bbc2ba67e61 (diff) |
[SCSI] bnx2fc: fix panic in bnx2fc_post_io_req
System panics while accessing stale pointer - timer_work_queue - in the IO path
before bnx2fc_stop is called. Fix is to destroy the workqueue after the destroy
operation is complete.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 8c6156a10d90..10cf5d96ce29 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -1537,6 +1537,7 @@ static void __bnx2fc_destroy(struct bnx2fc_interface *interface) | |||
1537 | static int bnx2fc_destroy(struct net_device *netdev) | 1537 | static int bnx2fc_destroy(struct net_device *netdev) |
1538 | { | 1538 | { |
1539 | struct bnx2fc_interface *interface = NULL; | 1539 | struct bnx2fc_interface *interface = NULL; |
1540 | struct workqueue_struct *timer_work_queue; | ||
1540 | int rc = 0; | 1541 | int rc = 0; |
1541 | 1542 | ||
1542 | rtnl_lock(); | 1543 | rtnl_lock(); |
@@ -1549,9 +1550,9 @@ static int bnx2fc_destroy(struct net_device *netdev) | |||
1549 | goto netdev_err; | 1550 | goto netdev_err; |
1550 | } | 1551 | } |
1551 | 1552 | ||
1552 | 1553 | timer_work_queue = interface->timer_work_queue; | |
1553 | destroy_workqueue(interface->timer_work_queue); | ||
1554 | __bnx2fc_destroy(interface); | 1554 | __bnx2fc_destroy(interface); |
1555 | destroy_workqueue(timer_work_queue); | ||
1555 | 1556 | ||
1556 | netdev_err: | 1557 | netdev_err: |
1557 | mutex_unlock(&bnx2fc_dev_lock); | 1558 | mutex_unlock(&bnx2fc_dev_lock); |