linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Recursive locking deadlock in hfsplus
@ 2025-12-01 10:51 Jiakai Xu
  0 siblings, 0 replies; only message in thread
From: Jiakai Xu @ 2025-12-01 10:51 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel
  Cc: Yangtao Li, John Paul Adrian Glaubitz, Viacheslav Dubeyko,
	2200013188

Hi,

I discovered a recursive locking bug in the hfsplus filesystem through fuzzing 
and successfully reproduced it on Linux mainline (v6.18).

The issue occurs when hfsplus_file_extend() holds extents_lock while calling
hfsplus_block_allocate(), which may trigger I/O that recursively calls
hfsplus_get_block(), which then tries to acquire the same extents_lock again.

Call chain:
  hfsplus_file_extend()
    └─ mutex_lock(&hip->extents_lock)
       hfsplus_block_allocate()
          └─ ...
             └─ hfsplus_get_block()
                └─ mutex_lock(&hip->extents_lock) ← recursive locking

Details: https://github.com/j1akai/temp/tree/main/20251201

Best regards,
Jiakai Xu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-01 10:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 10:51 [BUG] Recursive locking deadlock in hfsplus Jiakai Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).