lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 13 Jul 2021 21:45:45 +0200
From:   Bean Huo <huobean@...il.com>
To:     Bart Van Assche <bvanassche@....org>,
        Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org,
        linux-scsi@...r.kernel.org
Cc:     Stanley Chu <stanley.chu@...iatek.com>,
        Can Guo <cang@...eaurora.org>, Bean Huo <beanhuo@...ron.com>,
        Asutosh Das <asutoshd@...eaurora.org>
Subject: Re: [PATCH] scsi: ufs: add missing host_lock in setup_xfer_req

On Tue, 2021-07-13 at 12:06 -0700, Bart Van Assche wrote:
> > --- a/drivers/scsi/ufs/ufshcd.h
> > +++ b/drivers/scsi/ufs/ufshcd.h
> > @@ -1229,8 +1229,13 @@ static inline int
> > ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
> >    static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba
> > *hba, int tag,
> >                                        bool is_scsi_cmd)
> >    {
> > -     if (hba->vops && hba->vops->setup_xfer_req)
> > -             return hba->vops->setup_xfer_req(hba, tag,
> > is_scsi_cmd);
> > +     if (hba->vops && hba->vops->setup_xfer_req) {
> > +             unsigned long flags;
> > +
> > +             spin_lock_irqsave(hba->host->host_lock, flags);
> > +             hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
> > +             spin_unlock_irqrestore(hba->host->host_lock, flags);
> > +     }
> >    }
> >    
> >    static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba
> > *hba,
> 
> 
> Can anyone help with reviewing this patch?
> 
> 
> 
> Thanks,
> 
> 
> 
Hi Bart,
This change only impacts on the Samsung exynos platform. and Can's
optimization patch is to optimise the host_lock,, and removed
host_lock, now add back in this function makes sense to me.
but I am thinking how about hba->host_sem?

Bean

Bean

> Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ