• M
    block: deal with stale req count of plug list · 0a6219a9
    Ming Lei 提交于
    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.
    
    Fixes: 600271d9(blk-mq: immediately dispatch big size request)
    Fixes: 50d24c34(block: immediately dispatch big size request)
    Cc: Shaohua Li <shli@fb.com>
    Signed-off-by: NMing Lei <ming.lei@canonical.com>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    0a6219a9
blk-core.c 92.7 KB