Commit 550842c
ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown
After commit 0737e01 ("ocfs2: ocfs2_mount_volume does cleanup job
before return error"), any procedure after ocfs2_dlm_init() fails will
trigger crash when calling ocfs2_dlm_shutdown().
ie: On local mount mode, no dlm resource is initialized. If
ocfs2_mount_volume() fails in ocfs2_find_slot(), error handling will call
ocfs2_dlm_shutdown(), then does dlm resource cleanup job, which will
trigger kernel crash.
This solution should bypass uninitialized resources in
ocfs2_dlm_shutdown().
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 0737e01 ("ocfs2: ocfs2_mount_volume does cleanup job before return error")
Signed-off-by: Heming Zhao <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent dbb16df commit 550842c
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3403 | 3403 | | |
3404 | 3404 | | |
3405 | 3405 | | |
3406 | | - | |
3407 | | - | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
3408 | 3409 | | |
3409 | | - | |
| 3410 | + | |
| 3411 | + | |
3410 | 3412 | | |
3411 | 3413 | | |
3412 | 3414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1914 | 1914 | | |
1915 | 1915 | | |
1916 | 1916 | | |
1917 | | - | |
1918 | | - | |
| 1917 | + | |
1919 | 1918 | | |
1920 | 1919 | | |
1921 | 1920 | | |
| |||
0 commit comments