From: Bhanu Prakash Gollapudi Date: Fri, 5 Aug 2011 00:38:46 +0000 (-0700) Subject: [SCSI] bnx2fc: Fix NULL pointer deref during arm_cq. X-Git-Tag: v3.2-rc1~125^2~186 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b338c785c5c945383046ff39092e3021ea5b1d95;p=pandora-kernel.git [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 Signed-off-by: James Bottomley --- Reading git-diff-tree failed