diff options
| author | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-04-03 16:05:52 -0700 |
|---|---|---|
| committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-04-08 14:23:28 -0700 |
| commit | 6dca66d7ba1767d1e8688ee63162eca8d2248e8c (patch) | |
| tree | c737580059b99ae2bbf9aa7bd86209df9ee6f23e /drivers/char/drm/git@git.tavy.me:linux.git | |
| parent | d47059dcc472ae823c7eebe87fb7cec9148b9f06 (diff) | |
hfsplus: fix potential race conditions in b-tree functionality
The HFS_BNODE_DELETED flag is checked in hfs_bnode_put()
under locked tree->hash_lock. This patch adds locking
for the case of setting the HFS_BNODE_DELETED flag in
hfs_bnode_unlink() with the goal to avoid potential
race conditions.
The hfs_btree_write() method should be called under
tree->tree_lock. This patch reworks logic by adding
locking the tree->tree_lock for the calls of
hfs_btree_write() in hfsplus_cat_write_inode() and
hfsplus_system_write_inode().
This patch adds also the lockdep_assert_held() in
hfs_bmap_reserve(), hfs_bmap_alloc(), and hfs_bmap_free().
cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
cc: Yangtao Li <frank.li@vivo.com>
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/20260403230556.614171-2-slava@dubeyko.com
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Diffstat (limited to 'drivers/char/drm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
