]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Avoid that sg_reset -d ${srp_device} triggers an infinite loop
authorBart Van Assche <bvanassche@acm.org>
Tue, 18 Sep 2018 01:10:05 +0000 (18:10 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 19 Sep 2018 21:28:24 +0000 (15:28 -0600)
commitdfaed1b7968a2dd1bfee1ddb2f202f4d4e9e6d6b
treea8187ceaf1414fbe76be49d56134c2e1ef3a0055
parentfb7470a0ca4007b0bacbc700165729a58180345e
IB/srp: Avoid that sg_reset -d ${srp_device} triggers an infinite loop

Use different loop variables for the inner and outer loop. This avoids
that an infinite loop occurs if there are more RDMA channels than
target->req_ring_size.

Fixes: fdb928895ebd ("IB/srp: Add multichannel support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/srp/ib_srp.c