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: <20211026070637.30044-1-sj@kernel.org>
Date:   Tue, 26 Oct 2021 07:06:37 +0000
From:   SeongJae Park <sj@...nel.org>
To:     SeongJae Park <sj@...nel.org>
Cc:     Yang Yingliang <yangyingliang@...wei.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org
Subject: Re: [PATCH -next] mm/damon: fix error return code in damon_reclaim_turn()

On Mon, 25 Oct 2021 13:30:02 +0000 SeongJae Park <sj@...nel.org> wrote:

> On Mon, 25 Oct 2021 20:45:00 +0800 Yang Yingliang <yangyingliang@...wei.com> wrote:
> 
> > If damon_reclaim_new_scheme() fails, it should return
> > error code in damon_reclaim_turn()
> > 
> > Reported-by: Hulk Robot <hulkci@...wei.com>
> > Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> 
> Thank you for this fix!
> 
> Reviewed-by: SeongJae Park <sj@...nel.org>

FWIW, this patch fixes commit 53ab0082dc41 ("mm/damon: introduce DAMON-based
Reclamation (DAMON_RECLAIM)") in -mm[1].

[1] https://github.com/hnaz/linux-mm/commit/53ab0082dc41


Thanks,
SJ

> 
> 
> Thanks,
> SJ
> 
> > ---
> >  mm/damon/reclaim.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
> > index f5ae4c422555..dc1485044eaf 100644
> > --- a/mm/damon/reclaim.c
> > +++ b/mm/damon/reclaim.c
> > @@ -292,8 +292,10 @@ static int damon_reclaim_turn(bool on)
> >  
> >  	/* Will be freed by 'damon_set_schemes()' below */
> >  	scheme = damon_reclaim_new_scheme();
> > -	if (!scheme)
> > +	if (!scheme) {
> > +		err = -ENOMEM;
> >  		goto free_region_out;
> > +	}
> >  	err = damon_set_schemes(ctx, &scheme, 1);
> >  	if (err)
> >  		goto free_scheme_out;
> > -- 
> > 2.25.1
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ