Re: [PATCH] fix kernel oops in generic_unplug_device() for md

From: Andrew Morton (akpm@digeo.com)
Date: Tue Mar 11 2003 - 20:28:15 EST


Luben Tuikov <luben@splentec.com> wrote:
>
> The following patch fixes a kernel oops when doing
> blk_unplug_work() (oopses in generic_unplug_device()) for md.
>
> The oops and the original report are here:
> http://MARC.10East.com/?l=linux-kernel&m=104706400705154&w=2
>

Yup, is a bug. I received the below fix from Neil today which looks
simpler.

diff -puN drivers/block/ll_rw_blk.c~auto-unplugging-fix drivers/block/ll_rw_blk.c
--- 25/drivers/block/ll_rw_blk.c~auto-unplugging-fix Tue Mar 11 15:04:00 2003
+++ 25-akpm/drivers/block/ll_rw_blk.c Tue Mar 11 15:04:00 2003
@@ -1004,7 +1004,8 @@ void generic_unplug_device(void *data)
 
 static void blk_unplug_work(void *data)
 {
- generic_unplug_device(data);
+ request_queue_t *q = data;
+ q->unplug_fn(q);
 }
 
 static void blk_unplug_timeout(unsigned long data)

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:28 EST