mbox series

[0/4] scsi: fix failure handling of alloc/add host

Message ID 20210602133029.2864069-1-ming.lei@redhat.com
Headers show
Series scsi: fix failure handling of alloc/add host | expand

Message

Ming Lei June 2, 2021, 1:30 p.m. UTC
Hello Martin,

Fix failure handling of alloc/add host code, and related device release
handling.


Ming Lei (4):
  scsi: core: fix error handling of scsi_host_alloc
  scsi: core: fix failure handling of scsi_add_host_with_dma
  scsi: core: put .shost_dev in failure path if host state becomes
    running
  scsi: core: only put parent device if host state isn't in
    SHOST_CREATED

 drivers/scsi/hosts.c | 47 ++++++++++++++++++++++++--------------------
 1 file changed, 26 insertions(+), 21 deletions(-)

Cc: Bart Van Assche <bvanassche@acm.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Hannes Reinecke <hare@suse.de>

Comments

John Garry June 3, 2021, 3:43 p.m. UTC | #1
On 02/06/2021 14:30, Ming Lei wrote:
> Hello Martin,
> 
> Fix failure handling of alloc/add host code, and related device release
> handling.
> 
> 
> Ming Lei (4):
>    scsi: core: fix error handling of scsi_host_alloc
>    scsi: core: fix failure handling of scsi_add_host_with_dma
>    scsi: core: put .shost_dev in failure path if host state becomes
>      running
>    scsi: core: only put parent device if host state isn't in
>      SHOST_CREATED
> 
>   drivers/scsi/hosts.c | 47 ++++++++++++++++++++++++--------------------
>   1 file changed, 26 insertions(+), 21 deletions(-)
> 
> Cc: Bart Van Assche <bvanassche@acm.org>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Hannes Reinecke <hare@suse.de>
> 

I tested a single error path in each of scsi_host_alloc() and 
scsi_add_host_with_dma(), and it looked ok, so:

Tested-by: John Garry <john.garry@huawei.com>
Martin K. Petersen June 8, 2021, 3:04 a.m. UTC | #2
On Wed, 2 Jun 2021 21:30:25 +0800, Ming Lei wrote:

> Fix failure handling of alloc/add host code, and related device release

> handling.

> 

> 

> Ming Lei (4):

>   scsi: core: fix error handling of scsi_host_alloc

>   scsi: core: fix failure handling of scsi_add_host_with_dma

>   scsi: core: put .shost_dev in failure path if host state becomes

>     running

>   scsi: core: only put parent device if host state isn't in

>     SHOST_CREATED

> 

> [...]


Applied to 5.13/scsi-fixes, thanks!

[1/4] scsi: core: fix error handling of scsi_host_alloc
      https://git.kernel.org/mkp/scsi/c/66a834d09293
[2/4] scsi: core: fix failure handling of scsi_add_host_with_dma
      https://git.kernel.org/mkp/scsi/c/3719f4ff047e
[3/4] scsi: core: put .shost_dev in failure path if host state becomes running
      https://git.kernel.org/mkp/scsi/c/11714026c02d
[4/4] scsi: core: only put parent device if host state isn't in SHOST_CREATED
      https://git.kernel.org/mkp/scsi/c/1e0d4e622599

-- 
Martin K. Petersen	Oracle Linux Engineering