Commit e9cfdad8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] io scheduler oops fixes

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.
parent 5ec371b7
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment