https://bugzilla.kernel.org/show_bug.cgi?id=210745
Bug ID: 210745
Summary: kernel crash during umounting a partition with f2fs
filesystem
Product: File System
Version: 2.5
Kernel Version: 4.14.193
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: f2fs
Assignee: [email protected]
Reporter: [email protected]
Regression: No
Hi,
When we do the reboot stress test in a device, we may encounter the following
kernel crash occasionally.
[ 42.035226] c6 Unable to handle kernel NULL pointer dereference at virtual
address 0000000a
[ 43.437464] c6 __list_del_entry_valid+0xc/0xd8
[ 43.441962] c6 f2fs_destroy_node_manager+0x218/0x398
[ 43.446984] c6 f2fs_put_super+0x19c/0x2b8
[ 43.451052] c6 generic_shutdown_super+0x70/0xf8
[ 43.455635] c6 kill_block_super+0x2c/0x5c
[ 43.459702] c6 kill_f2fs_super+0xac/0xd8
[ 43.463684] c6 deactivate_locked_super+0x5c/0x124
[ 43.468442] c6 deactivate_super+0x5c/0x68
[ 43.472512] c6 cleanup_mnt+0x9c/0x118
[ 43.476231] c6 __cleanup_mnt+0x1c/0x28
[ 43.480043] c6 task_work_run+0x88/0xa8
[ 43.483850] c6 do_notify_resume+0x39c/0x1c88
[ 43.488174] c6 work_pending+0x8/0x14
the code of crash point is:
f2fs/node.c
void f2fs_destroy_node_manager(struct f2fs_sb_info *sbi)
while ((found = __gang_lookup_nat_cache(nm_i,
nid, NATVEC_SIZE, natvec))) {
unsigned idx;
nid = nat_get_nid(natvec[found - 1]) + 1;
for (idx = 0; idx < found; idx++) {
spin_lock(&nm_i->nat_list_lock);
> list_del(&natvec[idx]->list);
spin_unlock(&nm_i->nat_list_lock);
__del_from_nat_cache(nm_i, natvec[idx]);
}
}
because of the current nat entry in natvec[idx] is a invalid pointer or its
member list has null next member.
We have encountered this issue for several times in both Andoird Q & R version
I analyze these issue as following:
1. the current nat can be found in stack, like as "a"
ffffff800806b8d0: ffffffc0af33cbc0 ffffffc0af4869a0
> ffffff800806b8e0: ffffffc0f49baa00 000000000000000a
ffffff800806b8f0: ffffffc0af33c040 ffffffc0c69f0e20
ffffff800806b900: ffffffc0c695abc0 ffffffc01e2a4460
2.these invalid entry can be found in nat_root radix tree of f2fs_nm_info
3. I have reviewed the codes about nat_tree_lock, and has not any clues
please let me know if you need any other information
thanks a lot.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel