IB/srp: Stop the scsi_eh_<n> and scsi_tmf_<n> threads if login fails
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 14 Aug 2015 18:01:09 +0000 (11:01 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 30 Aug 2015 22:12:24 +0000 (18:12 -0400)
commitbc44bd1d864664f3658352c6aaaa02557d49165d
treec00f8ca60fed5e7aaddf60c5c51970e5eee721d7
parent713ef24e41757561c7f0bfc9bf4436f7e4a5b527
IB/srp: Stop the scsi_eh_<n> and scsi_tmf_<n> threads if login fails

scsi_host_alloc() not only allocates memory for a SCSI host but also
creates the scsi_eh_<n> kernel thread and the scsi_tmf_<n> workqueue.
Stop these threads if login fails by calling scsi_host_put().

Reported-by: Konstantin Krotov <kkv@clodo.ru>
Fixes: fb49c8bbaae7 ("Remove an extraneous scsi_host_put() from an error path")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
Cc: <stable@vger.kernel.org> #v3.19
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srp/ib_srp.c