lkml.org 
[lkml]   [2024]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@linaro.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


\
 
 \ /
  Last update: 2024-01-10 20:11    [W:1.037 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site