Skip to content

coda dcache-related cleanups and fixes

Al Viro linux-fsdevel 1 version Merged

Status from this message: has been merged into torvalds/linux.git:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesMerged

Patches in v1 Merged

#Subject and filesSizeRepliesApplied
1/3coda: is_bad_inode() is always false therefs/coda/dir.c+1 -40 replies
2/3sanitize coda_dentry_delete()fs/coda/dir.c+3 -90 replies
3/3coda_flag_children(): fix a UAFfs/coda/cache.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] coda dcache-related cleanups and fixes

1) prior to 2002 coda_revalidate_inode() used make_bad_inode() on failures; is_bad_inode() checks used to make sense back then. For the last 23.5 years they had been dead code; let's take them out...

2) coda ->d_delete() appears to have been hit by somebody overhardened back in 2021. Useful tip: if we've just checked d_really_is_negative() and it had returned false, dentry->d_inode is *NOT* going to be NULL.

3) coda_flag_children() is holding ->d_lock on parent while iterating through the list of its children; that's fine, but that does not protect ->d_inode of individual children. Hold rcu_read_lock() over the entire loop to prevent UAF there...

No preferences regarding the tree these would go through; at the moment it's in
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #work.coda but if coda folks prefer to route those through another tree, just say so.

Individual patches in followups. Please, review.

Al Viro (3):
coda: is_bad_inode() is always false there
sanitize coda_dentry_delete()
coda_flag_children(): fix a UAF

 fs/coda/cache.c |  2 ++
 fs/coda/dir.c   | 15 +++------------
 2 files changed, 5 insertions(+), 12 deletions(-)
Signature · 1 line
2.47.3