mirror of https://gitee.com/openkylin/linux.git
[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: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
d695043259
commit
d0a0a5ee7a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue