]> git.karo-electronics.de Git - karo-tx-linux.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)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 24 Aug 2011 03:32:32 +0000 (20:32 -0700)
commitef8d915412c652e9cd31841d156d01b6f2bd8024
treed3336cb436c17a29b3590f65fb492c04289c09c5
parent79e081c0674d72b4f5d79246fc9fc0f30ee440de
[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>
drivers/scsi/bnx2fc/bnx2fc_hwi.c
drivers/scsi/bnx2fc/bnx2fc_tgt.c