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] [day] [month] [year] [list]
Date:   Mon, 28 Sep 2020 18:15:57 -0700
From:   Nicolin Chen <nicoleotsuka@...il.com>
To:     Dmitry Osipenko <digetx@...il.com>
Cc:     thierry.reding@...il.com, joro@...tes.org, vdumpa@...dia.com,
        jonathanh@...dia.com, linux-tegra@...r.kernel.org,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iommu/tegra-smmu: Expend mutex protection range

On Tue, Sep 29, 2020 at 03:17:58AM +0300, Dmitry Osipenko wrote:
> ...
> >  static bool tegra_smmu_capable(enum iommu_cap cap)
> > @@ -420,17 +413,21 @@ static int tegra_smmu_as_prepare(struct tegra_smmu *smmu,
> >  				 struct tegra_smmu_as *as)
> >  {
> >  	u32 value;
> > -	int err;
> > +	int err = 0;
> > +
> > +	mutex_lock(&smmu->lock);
> >  
> >  	if (as->use_count > 0) {
> >  		as->use_count++;
> > -		return 0;
> > +		goto err_unlock;
> 
> This looks a bit odd because it's not a error condition. Perhaps should
> be better to "goto bump_usecount"?
> 
> Or make it similar to tegra_smmu_as_unprepare()?

Hmm...I think it's simple to just make it "goto unlock" then.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ