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]
Message-ID: <20201221023407epcms2p1e5aaaff4fffcee73a0ecf422b078e888@epcms2p1>
Date:   Mon, 21 Dec 2020 11:34:07 +0900
From:   Daejun Park <daejun7.park@...sung.com>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Avri Altman <Avri.Altman@....com>
CC:     Daejun Park <daejun7.park@...sung.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
        "stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
        "cang@...eaurora.org" <cang@...eaurora.org>,
        "huobean@...il.com" <huobean@...il.com>,
        "bvanassche@....org" <bvanassche@....org>,
        ALIM AKHTAR <alim.akhtar@...sung.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Sung-Jun Park <sungjun07.park@...sung.com>,
        yongmyung lee <ymhungry.lee@...sung.com>,
        Jinyoung CHOI <j-young.choi@...sung.com>,
        Adel Choi <adel.choi@...sung.com>,
        BoRam Shin <boram.shin@...sung.com>,
        SEUNGUK SHIN <seunguk.shin@...sung.com>
Subject: RE: Re: [PATCH v16 1/3] scsi: ufs: Introduce HPB feature

Hi Greg, Avri

> On Sat, Dec 19, 2020 at 12:48:31PM +0000, Avri Altman wrote:
> > > 
> > > 
> > > On Sat, Dec 19, 2020 at 06:18:47PM +0900, Daejun Park wrote:
> > > > +static int ufshpb_get_state(struct ufshpb_lu *hpb)
> > > > +{
> > > > +     return atomic_read(&hpb->hpb_state);
> > > > +}
> > > > +
> > > > +static void ufshpb_set_state(struct ufshpb_lu *hpb, int state)
> > > > +{
> > > > +     atomic_set(&hpb->hpb_state, state);
> > > > +}
> > > 
> > > You have a lock for the state, and yet the state is an atomic variable
> > > and you do not use the lock here at all.  You don't use the lock at all
> > > infact...
> > > 
> > > So either the lock needs to be dropped, or you need to use the lock and
> > > make the state a normal variable please.
> > hpb_state_lock is mainly protecting the list of active regions.
> > Just grep  lh_lru_rgn in patch 2/3.
> 
> Then why is the lock added in this patch if it is not used here?

I think it comes from that the name of the lock and related comment is
different from the actual usage.
I will modify the name and related comments, and introduce the lock to the
patch 2/3.

Thanks,
Daejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ