Skip to content

exfat: fix bitmap lock ordering and inode cache reinit

Breno Rodrigues Alves linux-fsdevel stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1exfat: fix bitmap lock ordering and inode cache reinitializationfs/exfat/fatent.c fs/exfat/super.c+13 -50 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/1] exfat: fix bitmap lock ordering and inode cache reinit

Two correctness fixes for fs/exfat:

- exfat_alloc_cluster() checks used_clusters and updates clu_srch_ptr before taking bitmap_lock, allowing concurrent allocations to observe an inconsistent bitmap and potentially double-allocate clusters. Moving the lock to the top and routing early errors through the existing 'unlock' label closes the window.

- exfat_alloc_inode() relied on exfat_inode_init_once() to seed the cache_lru fields, but slab objects are reused without re-running the constructor. Reinitializing the fields on every allocation prevents a crash in __exfat_cache_inval_inode() when an inode is recycled.

Breno Rodrigues Alves (1):
exfat: fix bitmap lock ordering and inode cache reinitialization

 fs/exfat/fatent.c | 13 ++++++++-----
 fs/exfat/super.c |  5 +++++
 2 files changed, 13 insertions(+), 5 deletions(-)
Signature · 1 line
2.56.0