summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-07-10 04:44:20 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 13:24:17 -0700
commitd0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01 (patch)
treea6118e5bf43a4e60d9e555e74bac31e764e17aef /drivers/md/md.c
parentd69504325978c461b51b03cca49626026970307b (diff)
downloadkernel-crypto-d0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01.tar.gz
kernel-crypto-d0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01.tar.xz
kernel-crypto-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/md.c')
-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 a5286beddcf..b6d16022a53 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);