Subject: Re: [PATCH] net/sched: sch_dualpi2: Add missing skb check

From: Jakub Kicinski <[email-masked]>
Date: Wed, 29 Apr 2026 18:52:48 -0700

On Tue, 28 Apr 2026 20:27:30 +0530 Manas wrote:
> A packed is dequeued using the function `dequeue_packet()` but there is
> no check to see if a packet is dequeued. The assignment is always
> considered as true resulting in null-ptr-deref
> 
> Fixes: 8f9516daedd6 ("sched: Add enqueue/dequeue of dualpi2 qdisc")
> Reported-by: Manas <[email-masked]>
> Reported-by: Rakshit Awasthi <[email-masked]>
> Signed-off-by: Manas <[email-masked]>

Sorry but the patch is nonsensical. Please don't waste our time.

> diff --git a/net/sched/sch_dualpi2.c b/net/sched/sch_dualpi2.c
> index 241e6a46bd00..e360bf16d617 100644
> --- a/net/sched/sch_dualpi2.c
> +++ b/net/sched/sch_dualpi2.c
> @@ -588,7 +588,7 @@ static struct sk_buff *dualpi2_qdisc_dequeue(struct Qdisc *sch)
>  
>  	now = ktime_get_ns();
>  
> -	while ((skb = dequeue_packet(sch, q, &credit_change, now))) {
> +	while ((skb = dequeue_packet(sch, q, &credit_change, now)) && skb) {
>  		if (!q->drop_early && must_drop(sch, q, skb)) {
>  			drop_and_retry(q, skb, sch, QDISC_DROP_CONGESTED);
>  			continue;
-- 
pw-bot: cr