]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] io scheduler oops fixes
authorAndrew Morton <akpm@osdl.org>
Wed, 22 Oct 2003 01:23:26 +0000 (18:23 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 22 Oct 2003 01:23:26 +0000 (18:23 -0700)
Peter Osterlund <petero2@telia.com> notes oopses in the anticipatory
scheduler with slab poisoning enabled due to arq->rb_node.rb_right being
uninitialised.  So wipe the whole thing when we allocate it.

deadline seems to have the same problem.

drivers/block/as-iosched.c
drivers/block/deadline-iosched.c

index 532b32f353e877f99f3abc387d547b14d34ddfe9..47a7c2b098097374b93b3da6c87c97648ae67b4a 100644 (file)
@@ -1718,6 +1718,7 @@ static int as_set_request(request_queue_t *q, struct request *rq, int gfp_mask)
        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;
index 1c8ca884396fd4a52f4b2c684482debc8788de23..317e7db70489b52777b3c7d23bbbd0412477e2fb 100644 (file)
@@ -765,6 +765,7 @@ deadline_set_request(request_queue_t *q, struct request *rq, int gfp_mask)
 
        drq = mempool_alloc(dd->drq_pool, gfp_mask);
        if (drq) {
+               memset(drq, 0, sizeof(*drq));
                RB_CLEAR(&drq->rb_node);
                drq->request = rq;