[SCSI] bnx2fc: Avoid holding cq_lock when iounmap() is called
commit839900c69d5b8a07a4df8e9bd9d1e59a5c556811
authorBhanu Gollapudi <bprakash@broadcom.com>
Fri, 18 Mar 2011 00:13:26 +0000 (17 17:13 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 23 Mar 2011 16:36:59 +0000 (23 11:36 -0500)
tree067b746caab1ba5ee6d38c73a56df9f7bb953c9c
parent70c7c88a1a65ca683eb7f3fe3ce79c72f29d845e
[SCSI] bnx2fc: Avoid holding cq_lock when iounmap() is called

With kernel debugging enabled, holding cq_lock when calling
bnx2fc_free_session_resc() which calls iounmap() leads to a warning
stack trace [INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected].
iounmap() grabs a HARDIRQ-unsafe vmlist lock, so holding
spin_lock_bh(cq_lock) when calling iounmap() will trigger the LOCKDEP
warning.  Since cq_lock is required only to guard against deletion, hold
the lock just before freeing the cq.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/bnx2fc/bnx2fc_tgt.c