Skip to content

Commit

Permalink
[PATCH] md: fix oops in error-handling
Browse files Browse the repository at this point in the history
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: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jul 10, 2006
1 parent d695043 commit d0a0a5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d0a0a5e

Please sign in to comment.