summaryrefslogtreecommitdiff
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-08-05 06:42:45 -0400
committerDavid Howells <dhowells@redhat.com>2022-08-09 14:13:55 +0100
commitfb24771faf72a2fd62b3b6287af3c610c3ec9cf1 (patch)
treeca92f6258605d877ac7155f86ca95d1e0499f3cd /fs/binfmt_misc.c
parent3d7cb6b04c3f3115719235cc6866b10326de34cd (diff)
downloadlwn-fb24771faf72a2fd62b3b6287af3c610c3ec9cf1.tar.gz
lwn-fb24771faf72a2fd62b3b6287af3c610c3ec9cf1.zip
fscache: don't leak cookie access refs if invalidation is in progress or failed
It's possible for a request to invalidate a fscache_cookie will come in while we're already processing an invalidation. If that happens we currently take an extra access reference that will leak. Only call __fscache_begin_cookie_access if the FSCACHE_COOKIE_DO_INVALIDATE bit was previously clear. Also, ensure that we attempt to clear the bit when the cookie is "FAILED" and put the reference to avoid an access leak. Fixes: 85e4ea1049c7 ("fscache: Fix invalidation/lookup race") Suggested-by: David Howells <dhowells@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/binfmt_misc.c')
0 files changed, 0 insertions, 0 deletions