Re: 2.6.0-test8, DEBUG_SLAB, oops in as_latter_request()

From: Andrew Morton
Date: Sun Oct 19 2003 - 16:21:28 EST


Peter Osterlund <petero2@xxxxxxxxx> wrote:
>
> I was running 2.6.0-test8 compiled with CONFIG_DEBUG_SLAB=y. When
> testing the CDRW packet writing driver, I got an oops in
> as_latter_request. (Full oops at the end of this message.) It is
> repeatable and happens because arq->rb_node.rb_right is uninitialized.

deadline seems to have the same problem.

We may as well squish this with the big hammer?

drivers/block/as-iosched.c | 1 +
drivers/block/deadline-iosched.c | 1 +
2 files changed, 2 insertions(+)

diff -puN drivers/block/as-iosched.c~iosched-oops-fixes drivers/block/as-iosched.c
--- 25/drivers/block/as-iosched.c~iosched-oops-fixes 2003-10-19 14:17:39.000000000 -0700
+++ 25-akpm/drivers/block/as-iosched.c 2003-10-19 14:18:09.000000000 -0700
@@ -1718,6 +1718,7 @@ static int as_set_request(request_queue_
struct as_rq *arq = mempool_alloc(ad->arq_pool, gfp_mask);

if (arq) {
+ memset(arq, 0, sizeof(*arq));
RB_CLEAR(&arq->rb_node);
arq->request = rq;
arq->state = AS_RQ_NEW;
diff -puN drivers/block/deadline-iosched.c~iosched-oops-fixes drivers/block/deadline-iosched.c
--- 25/drivers/block/deadline-iosched.c~iosched-oops-fixes 2003-10-19 14:17:39.000000000 -0700
+++ 25-akpm/drivers/block/deadline-iosched.c 2003-10-19 14:17:39.000000000 -0700
@@ -775,6 +775,7 @@ deadline_set_request(request_queue_t *q,

drq = mempool_alloc(dd->drq_pool, gfp_mask);
if (drq) {
+ memset(drq, 0, sizeof(*drq));
RB_CLEAR(&drq->rb_node);
drq->request = rq;


_

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