[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025070255-overdress-relight-21bf@gregkh>
Date: Wed, 2 Jul 2025 09:32:16 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Xiang Mei <xmei5@....edu>
Cc: netdev@...r.kernel.org, xiyou.wangcong@...il.com, jhs@...atatu.com,
jiri@...nulli.us, security@...nel.org
Subject: Re: [PATCH] net/sched: sch_qfq: Fix null-deref in agg_dequeue
On Wed, Jul 02, 2025 at 12:18:18AM -0700, Xiang Mei wrote:
> To prevent a potential crash in agg_dequeue (net/sched/sch_qfq.c)
> when cl->qdisc->ops->peek(cl->qdisc) returns NULL, we check the return
> value before using it, similar to the existing approach in sch_hfsc.c.
>
> To avoid code duplication, the following changes are made:
>
> 1. Moved qdisc_warn_nonwc to include/net/sch_generic.h and removed
> its EXPORT_SYMBOL declaration, since all users include the header.
>
> 2. Moved qdisc_peek_len from net/sched/sch_hfsc.c to
> include/net/sch_generic.h so that sch_qfq can reuse it.
>
> 3. Applied qdisc_peek_len in agg_dequeue to avoid crashing.
>
> Signed-off-by: Xiang Mei <xmei5@....edu>
> ---
> include/net/sch_generic.h | 24 ++++++++++++++++++++++++
> net/sched/sch_api.c | 10 ----------
> net/sched/sch_hfsc.c | 16 ----------------
> net/sched/sch_qfq.c | 2 +-
> 4 files changed, 25 insertions(+), 27 deletions(-)
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- This looks like a new version of a previously submitted patch, but you
did not list below the --- line any changes from the previous version.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/process/submitting-patches.rst for what
needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
Powered by blists - more mailing lists