diff options
author | Andrew Morton <akpm@osdl.org> | 2006-07-10 07:44:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:17 -0400 |
commit | d0a0a5ee7a0094231a11cfe3f86d2d8f5f994e01 (patch) | |
tree | a6118e5bf43a4e60d9e555e74bac31e764e17aef /drivers/md | |
parent | d69504325978c461b51b03cca49626026970307b (diff) |
[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.c | 2 |
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) | |||
4592 | __builtin_return_address(0),__builtin_return_address(1), | 4592 | __builtin_return_address(0),__builtin_return_address(1), |
4593 | __builtin_return_address(2),__builtin_return_address(3)); | 4593 | __builtin_return_address(2),__builtin_return_address(3)); |
4594 | */ | 4594 | */ |
4595 | if (!mddev->pers) | ||
4596 | return; | ||
4595 | if (!mddev->pers->error_handler) | 4597 | if (!mddev->pers->error_handler) |
4596 | return; | 4598 | return; |
4597 | mddev->pers->error_handler(mddev,rdev); | 4599 | mddev->pers->error_handler(mddev,rdev); |