]> git.baikalelectronics.ru Git - kernel.git/commit
block, bfq: don't dereference bic before null checking it
authorColin Ian King <colin.king@canonical.com>
Thu, 20 Apr 2017 14:07:18 +0000 (15:07 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 20 Apr 2017 14:19:23 +0000 (08:19 -0600)
commit3b2dd3052b463f3c80f4550b9162d928f9b25523
tree9c4727a695f1f8f0e92fa5c94de94b1478fd318a
parent401aa62ab0ba335a261d38f38ce8e0066d5c4e76
block, bfq: don't dereference bic before null checking it

The call to bfq_check_ioprio_change will dereference bic, however,
the null check for bic is after this call.  Move the the null
check on bic to before the call to avoid any potential null
pointer dereference issues.

Detected by CoverityScan, CID#1430138 ("Dereference before null check")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bfq-iosched.c