]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/iser: Fix possible SQ overflow
authorMax Gurtovoy <maxg@mellanox.com>
Sun, 7 Dec 2014 14:09:56 +0000 (16:09 +0200)
committerRoland Dreier <roland@purestorage.com>
Tue, 16 Dec 2014 02:11:44 +0000 (18:11 -0800)
commit6ec9d4d2310e8fc54fc638e4454271d1fcaefa95
tree38f326067915bcd0be2189b0c3a20e627d02d1ca
parent93acb7bbc7de789a97e0aed97ddb55fa607724f4
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 <maxg@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_initiator.c