]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:20 +0000 (16:59 -0700)
commitfa22f4874e9409bcb321839ceefeadb88e423b9f
tree3577597b42dae4282c932930a03c9028d7b0f2e1
parentebc51114fa51756d627022f2fc4f202bfeef1b22
IB/srp: Avoid that sg_reset -d ${srp_device} triggers an infinite loop

commit ee92efe41cf358f4b99e73509f2bfd4733609f26 upstream.

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: d92c0da71a35 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srp/ib_srp.c