Re: [PATCH] block: deal with stale req count of plug list

From: Jens Axboe
Date: Wed Nov 16 2016 - 10:11:24 EST


On 11/16/2016 03:07 AM, Ming Lei wrote:
In both legacy and mq path, req count of plug list is computed
before allocating request, so the number can be stale when falling
back to slept allocation, also the new introduced wbt can sleep
too.

This patch deals with the case by checking if plug list becomes
empty, and fixes the KASAN report of 'BUG: KASAN: stack-out-of-bounds'
which is introduced by Shaohua's patches of dispatching big request.

Thanks Ming, added for 4.10.

--
Jens Axboe