scsi: core: Only put parent device if host state differs from SHOST_CREATED
stable inclusion from stable-v5.10.44 commit 5b537408f2733d510060e72596befa44c3435cb6 bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=403 CVE: NA ------------------------------------------------- commit 1e0d4e62 upstream. get_device(shost->shost_gendev.parent) is called after host state has switched to SHOST_RUNNING. scsi_host_dev_release() shouldn't release the parent device if host state is still SHOST_CREATED. Link: https://lore.kernel.org/r/20210602133029.2864069-5-ming.lei@redhat.com Cc: Bart Van Assche <bvanassche@acm.org> Cc: John Garry <john.garry@huawei.com> Cc: Hannes Reinecke <hare@suse.de> Tested-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMing Lei <ming.lei@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Nyangshuo <look4polaris@163.com> Reviewed-by: Jian Cheng <cj.chengjian(a)huawei.com>
Showing
想要评论请 注册 或 登录