lkml.org 
[lkml]   [2019]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] scsi: ufs: Put SCSI host after remove it
From
Date
On 12/14/19 8:03 AM, Can Guo wrote:
> In ufshcd_remove(), after SCSI host is removed, put it once so that its
> resources can be released.
>
> Signed-off-by: Can Guo <cang@codeaurora.org>
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index b5966fa..a86b0fd 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -8251,6 +8251,7 @@ void ufshcd_remove(struct ufs_hba *hba)
> ufs_bsg_remove(hba);
> ufs_sysfs_remove_nodes(hba->dev);
> scsi_remove_host(hba->host);
> + scsi_host_put(hba->host);
> /* disable interrupts */
> ufshcd_disable_intr(hba, hba->intr_mask);
> ufshcd_hba_stop(hba, true);

Hi Can,

The UFS driver may queue work asynchronously and that asynchronous work
may refer to the SCSI host, e.g. ufshcd_err_handler(). Is it guaranteed
that all that asynchronous work has finished before scsi_host_put() is
called?

Thanks,

Bart.

\
 
 \ /
  Last update: 2019-12-14 19:32    [W:0.077 / U:3.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site