]> git.baikalelectronics.ru Git - kernel.git/commit
blk-throttle: fix potential NULL pointer dereference in throtl_select_dispatch
authorLiu Bo <bo.liu@linux.alibaba.com>
Tue, 29 May 2018 08:29:12 +0000 (16:29 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 30 May 2018 16:54:33 +0000 (10:54 -0600)
commitd10dd6ba37900298af0e5ac06b3ad6cd1b01506c
tree16058bed4d103d7202f997b2d4e511a185e0c8e5
parent13ee8a8637cf86fbed07907277c7e2cb5765305e
blk-throttle: fix potential NULL pointer dereference in throtl_select_dispatch

tg in throtl_select_dispatch is used first and then do check. Since tg
may be NULL, it has potential NULL pointer dereference risk. So fix
it.

Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c