mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
75ba4ada82
commit
8c9ff1adda
1 changed files with 2 additions and 2 deletions
|
|
@ -4401,11 +4401,11 @@ static int bfq_get_rq_private(struct request_queue *q, struct request *rq,
|
|||
|
||||
spin_lock_irq(&bfqd->lock);
|
||||
|
||||
bfq_check_ioprio_change(bic, bio);
|
||||
|
||||
if (!bic)
|
||||
goto queue_fail;
|
||||
|
||||
bfq_check_ioprio_change(bic, bio);
|
||||
|
||||
bfq_bic_update_cgroup(bic, bio);
|
||||
|
||||
bfqq = bfq_get_bfqq_handle_split(bfqd, bic, bio, false, is_sync,
|
||||
|
|
|
|||
Loading…
Reference in a new issue