diff options
author | Pavel Snajdr <[email protected]> | 2024-04-04 03:09:19 +0200 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2024-04-29 13:50:05 -0700 |
commit | 531572b5906a0a4d042b7dcfd09b3ea947bd442e (patch) | |
tree | 9c34ee08f25d1a845eb631e1e4e2907c8ef6d5a7 /NOTICE | |
parent | 74101f7e2ade81d50d79ebec1b8b2a903eab432f (diff) |
Fix panics when truncating/deleting files
There's an union in dbuf_dirty_record_t; dr_brtwrite could evaluate
to B_TRUE if the dirty record is of another type than dl. Adding
more explicit dr type check before trying to access dr_brtwrite.
Fixes two similar panics:
[ 1373.806119] VERIFY0(db->db_level) failed (0 == 1)
[ 1373.807232] PANIC at dbuf.c:2549:dbuf_undirty()
[ 1373.814979] dump_stack_lvl+0x71/0x90
[ 1373.815799] spl_panic+0xd3/0x100 [spl]
[ 1373.827709] dbuf_undirty+0x62a/0x970 [zfs]
[ 1373.829204] dmu_buf_will_dirty_impl+0x1e9/0x5b0 [zfs]
[ 1373.831010] dnode_free_range+0x532/0x1220 [zfs]
[ 1373.833922] dmu_free_long_range+0x4e0/0x930 [zfs]
[ 1373.835277] zfs_trunc+0x75/0x1e0 [zfs]
[ 1373.837958] zfs_freesp+0x9b/0x470 [zfs]
[ 1373.847236] zfs_setattr+0x161a/0x3500 [zfs]
[ 1373.855267] zpl_setattr+0x125/0x320 [zfs]
[ 1373.856725] notify_change+0x1ee/0x4a0
[ 1373.859207] do_truncate+0x7f/0xd0
[ 1373.859968] do_sys_ftruncate+0x28e/0x2e0
[ 1373.860962] do_syscall_64+0x38/0x90
[ 1373.861751] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[ 1822.381337] VERIFY0(db->db_level) failed (0 == 1)
[ 1822.382376] PANIC at dbuf.c:2549:dbuf_undirty()
[ 1822.389232] dump_stack_lvl+0x71/0x90
[ 1822.389920] spl_panic+0xd3/0x100 [spl]
[ 1822.399567] dbuf_undirty+0x62a/0x970 [zfs]
[ 1822.400583] dmu_buf_will_dirty_impl+0x1e9/0x5b0 [zfs]
[ 1822.401752] dnode_free_range+0x532/0x1220 [zfs]
[ 1822.402841] dmu_object_free+0x74/0x120 [zfs]
[ 1822.403869] zfs_znode_delete+0x75/0x120 [zfs]
[ 1822.404906] zfs_rmnode+0x3f6/0x7f0 [zfs]
[ 1822.405870] zfs_inactive+0xa3/0x610 [zfs]
[ 1822.407803] zpl_evict_inode+0x3e/0x90 [zfs]
[ 1822.408831] evict+0xc1/0x1c0
[ 1822.409387] do_unlinkat+0x147/0x300
[ 1822.410060] __x64_sys_unlinkat+0x33/0x60
[ 1822.410802] do_syscall_64+0x38/0x90
[ 1822.411458] entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Signed-off-by: Pavel Snajdr <[email protected]>
Closes #15983
Diffstat (limited to 'NOTICE')
0 files changed, 0 insertions, 0 deletions