回复: Re: [PATCH] block: bic maybe null pointer dereference
From: 晏龙龙
Date: Wed May 06 2026 - 03:22:13 EST
ok, Thank you for your feedback
主 题:Re: [PATCH] block: bic maybe null pointer dereference
日 期:2026年05月6日15:09
发件人:Jens Axboe
收件人:yukuai,Jens Axboe
抄送人:linux-block,linux-kernel
日 期:2026年05月6日15:09
发件人:Jens Axboe
收件人:yukuai,Jens Axboe
抄送人:linux-block,linux-kernel
On 5/5/26 11:56 PM, yanlonglong wrote: > Signed-off-by: yanlonglong <yanlonglong@xxxxxxxxxx> Your subject line is incomplete, and your commit message is even more incomplete. > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c > index 141c602d5e85..27ef736085b1 100644 > --- a/block/bfq-iosched.c > +++ b/block/bfq-iosched.c > @@ -3035,9 +3035,6 @@ bfq_setup_cooperator(struct bfq_data *bfqd, struct bfq_queue *bfqq, > static void bfq_bfqq_save_state(struct bfq_queue *bfqq) > { > struct bfq_io_cq *bic = bfqq->bic; > - unsigned int a_idx = bfqq->actuator_idx; > - struct bfq_iocq_bfqq_data *bfqq_data = &bic->bfqq_data[a_idx]; > - > /* > * If !bfqq->bic, the queue is already shared or its requests > * have already been redirected to a shared queue; both idle window > @@ -3046,6 +3043,9 @@ static void bfq_bfqq_save_state(struct bfq_queue *bfqq) > if (!bic) > return; > > + unsigned int a_idx = bfqq->actuator_idx; > + struct bfq_iocq_bfqq_data *bfqq_data = &bic->bfqq_data[a_idx]; > + > bfqq_data->saved_last_serv_time_ns = bfqq->last_serv_time_ns; > bfqq_data->saved_inject_limit = bfqq->inject_limit; > bfqq_data->saved_decrease_time_jif = bfqq->decrease_time_jif; Ehm no, variable declarations go at the top. Please try again, correcting the title/subject and ACTUALLY write a commit message. See: Documentation/process/submitting-patches.rst -- Jens Axboe </yanlonglong@xxxxxxxxxx>
---