]> www.infradead.org Git - users/jedix/linux-maple.git/commit
[SCSI] bnx2fc: Fix NULL pointer deref during arm_cq.
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>
Fri, 5 Aug 2011 00:38:46 +0000 (17:38 -0700)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 01:09:17 +0000 (09:09 +0800)
commit4103d59ac442c2b8c452e3270d6e597ba325621e
tree29f8aadc15da047c8f7ba5b2a793ed02310bd050
parent1e19ce8f5c9f6b60865f4b26fde80de3e531941b
[SCSI] bnx2fc: Fix NULL pointer deref during arm_cq.

There exists a race condition between CQ doorbell unmap and IO completion path
that arms the CQ which causes a NULL dereference. Protect the ctx_base with
cq_lock to avoid this. Also, wait for the CQ doorbell to be successfully mapped
before arming the CQ.

Also, do not count uncolicited CQ completions for free_sqes.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b338c785c5c945383046ff39092e3021ea5b1d95)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/scsi/bnx2fc/bnx2fc_hwi.c
drivers/scsi/bnx2fc/bnx2fc_tgt.c