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]
Message-ID: <20220301065837.GA106@VICKYMQLIN-NB1.localdomain>
Date:   Tue, 1 Mar 2022 14:58:37 +0800
From:   Miaoqian Lin <linmq006@...il.com>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     Andy Gross <agross@...nel.org>, Luca Weiss <luca@...tu.xyz>,
        Brian Masney <masneyb@...tation.org>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc: qcom: ocmem: Fix missing put_device() call in
 of_get_ocmem

Hi, Andersson:

> Your patch solves the particular problem, so I'm applying it.
> 
> But it seems that we never release pdev in the case of successfully
> return the ocmem object either... So there's more to improve here.
> 
Thanks for your time. Should I submit another patch to release pdev 
in the regular path?

> >  drivers/soc/qcom/ocmem.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> > index d2dacbbaafbd..97fd24c178f8 100644
> > --- a/drivers/soc/qcom/ocmem.c
> > +++ b/drivers/soc/qcom/ocmem.c
> > @@ -206,6 +206,7 @@ struct ocmem *of_get_ocmem(struct device *dev)
> >  	ocmem = platform_get_drvdata(pdev);
> >  	if (!ocmem) {
> >  		dev_err(dev, "Cannot get ocmem\n");
> > +		put_device(&pdev->dev);
> >  		return ERR_PTR(-ENODEV);
> >  	}
> >  	return ocmem;
> > -- 
> > 2.17.1
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ