Bug 216781 - wrong check buffer_head in ext4_simulate_fail_bh
Summary: wrong check buffer_head in ext4_simulate_fail_bh
Status: RESOLVED INVALID
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: All Linux
: P1 low
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-07 03:06 UTC by eriri
Modified: 2022-12-07 03:12 UTC (History)
0 users

See Also:
Kernel Version: 6.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description eriri 2022-12-07 03:06:11 UTC
ext4_simulate_fail_bh used at https://elixir.bootlin.com/linux/latest/source/fs/ext4/inode.c#L4574
but it seems bh(buffer_head) can only be ptr or NULL, so it is wrong to use IS_ERR in ext4_simulate_fail_bh at https://elixir.bootlin.com/linux/latest/source/fs/ext4/ext4.h#L1855

replace IS_ERR with IS_ERR_OR_NULL here.
Comment 1 eriri 2022-12-07 03:12:13 UTC
Oops,it's my mistake.

Note You need to log in before you can comment on or make changes to this bug.