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: <6ec71521-66ec-4da8-ad3e-2037cdde4287@moroto.mountain>
Date: Wed, 10 Jan 2024 22:07:34 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: David Howells <dhowells@...hat.com>
Cc: Jeff Layton <jlayton@...nel.org>, linux-cachefs@...hat.com,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] netfs, fscache: Prevent Oops in fscache_put_cache()

On Wed, Jan 10, 2024 at 07:01:40PM +0000, David Howells wrote:
> Dan Carpenter <dan.carpenter@...aro.org> wrote:
> 
> >  	zero = __refcount_dec_and_test(&cache->ref, &ref);
> > -	trace_fscache_cache(debug_id, ref - 1, where);
> > +	trace_fscache_cache(cache->debug_id, ref - 1, where);
> 
> You can't do that if !zero.  cache may be deallocated between the two lines.

Ah...  Right.  I misread what was going on in the latter part of the
function.  Sorry, I'll resend.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ