Re: [PATCH] net/sched: sch_dualpi2: Add missing skb check
From: Jakub Kicinski
Date: Wed Apr 29 2026 - 21:53:01 EST
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 <ghandatmanas@xxxxxxxxx>
> Reported-by: Rakshit Awasthi <rakshitawasthi17@xxxxxxxxx>
> Signed-off-by: Manas <ghandatmanas@xxxxxxxxx>
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