From: Max Gurtovoy Date: Sun, 7 Dec 2014 14:09:56 +0000 (+0200) Subject: IB/iser: Fix possible SQ overflow X-Git-Tag: omap-for-v3.19/fixes-rc1~37^2^4~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ec9d4d2310e8fc54fc638e4454271d1fcaefa95;p=pandora-kernel.git IB/iser: Fix possible SQ overflow Fix a regression was introduced in commit 6df5a128f0fd ("IB/iser: Suppress scsi command send completions"). The sig_count was wrongly set to be static variable, thus it is possible that we won't reach to (sig_count % ISER_SIGNAL_BATCH) == 0 condition (due to races) and the send queue will be overflowed. Instead keep sig_count per connection. We don't need it to be atomic as we are safe under the iscsi session frwd_lock taken by libiscsi on the queuecommand path. Fixes: 6df5a128f0fd ("IB/iser: Suppress scsi command send completions") Signed-off-by: Max Gurtovoy Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier --- Reading git-diff-tree failed