--- zzzz-none-000/linux-2.6.39.4/block/blk-core.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/block/blk-core.c 2021-11-10 13:23:10.000000000 +0000 @@ -841,6 +841,11 @@ { struct request *rq; + /*== 20161123 AVM/WKR don't access dead queues ==*/ + if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) { + return NULL; + } + BUG_ON(rw != READ && rw != WRITE); spin_lock_irq(q->queue_lock); @@ -1067,7 +1072,14 @@ void blk_put_request(struct request *req) { unsigned long flags; - struct request_queue *q = req->q; + struct request_queue *q; + + /*== 20161124 AVM/WKR don't access empty req ==*/ + if (unlikely(!req)) { + return; + } + + q = req->q; spin_lock_irqsave(q->queue_lock, flags); __blk_put_request(q, req); @@ -1141,7 +1153,7 @@ struct request *req, struct bio *bio) { const int ff = bio->bi_rw & REQ_FAILFAST_MASK; - sector_t sector; +/*--- sector_t sector; ---*/ /* * Debug stuff, kill later @@ -1159,7 +1171,7 @@ if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) blk_rq_set_mixed_merge(req); - sector = bio->bi_sector; +/*--- sector = bio->bi_sector; ---*/ bio->bi_next = req->bio; req->bio = bio;