summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-07-10 13:44:20 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 22:24:17 +0200
commitd0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01 (patch)
treea6118e5bf43a4e60d9e555e74bac31e764e17aef /drivers/md
parent[PATCH] md: include sector number in messages about corrected read errors (diff)
downloadlinux-d0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01.tar.xz
linux-d0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01.zip
[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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index a5286beddcf5..b6d16022a53e 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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);