Commit 33b525c
ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate
When doing cleanup, if flags without OCFS2_BH_READAHEAD, it may trigger
NULL pointer dereference in the following ocfs2_set_buffer_uptodate() if
bh is NULL.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: cf76c78 ("ocfs2: don't put and assigning null to bh allocated outside")
Signed-off-by: Lizhi Xu <[email protected]>
Signed-off-by: Joseph Qi <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Reported-by: Heming Zhao <[email protected]>
Suggested-by: Heming Zhao <[email protected]>
Cc: <[email protected]> [4.20+]
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent c03a82b commit 33b525c
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| |||
0 commit comments