]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:15 +0000 (19:26 +0200)
commitb25b17c50502368c2306a449ce217d34f8e0b287
tree974a810e13752db9600eb8d4e501331660ca88e4
parentbff7d8e55354c86893324b85eed532cb0c94f965
IB/srp: Stop the scsi_eh_<n> and scsi_tmf_<n> threads if login fails

commit bc44bd1d864664f3658352c6aaaa02557d49165d upstream.

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>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/srp/ib_srp.c