Commit d0a0a5ee authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] md: fix oops in error-handling

During early MD setup (superblock reading), we don't have a personality yet.
But the error-handling code tries to dereference mddev->pers.  Fix.
Acked-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d6950432
......@@ -4592,6 +4592,8 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev)
__builtin_return_address(0),__builtin_return_address(1),
__builtin_return_address(2),__builtin_return_address(3));
*/
if (!mddev->pers)
return;
if (!mddev->pers->error_handler)
return;
mddev->pers->error_handler(mddev,rdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment