IB/srp: Avoid that a cable pull can trigger a kernel crash
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 11 Oct 2017 17:27:26 +0000 (10:27 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 18 Oct 2017 14:49:54 +0000 (10:49 -0400)
commit8a0d18c62121d3c554a83eb96e2752861d84d937
treec4d4b4e6e0f29a06e81108bb8bad9300082c55ee
parentdea262094cdf629a3380061722b205de04057799
IB/srp: Avoid that a cable pull can trigger a kernel crash

This patch fixes the following kernel crash:

general protection fault: 0000 [#1] PREEMPT SMP
Workqueue: ib_mad2 timeout_sends [ib_core]
Call Trace:
 ib_sa_path_rec_callback+0x1c4/0x1d0 [ib_core]
 send_handler+0xb2/0xd0 [ib_core]
 timeout_sends+0x14d/0x220 [ib_core]
 process_one_work+0x200/0x630
 worker_thread+0x4e/0x3b0
 kthread+0x113/0x150

Fixes: commit aef9ec39c47f ("IB: Add SCSI RDMA Protocol (SRP) initiator")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Cc: <stable@vger.kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srp/ib_srp.c