From: Greg KH <gregkh@linuxfoundation.org>
To: Xiang Mei <xmei5@asu.edu>
Cc: netdev@vger.kernel.org, xiyou.wangcong@gmail.com,
jhs@mojatatu.com, jiri@resnulli.us, security@kernel.org
Subject: Re: [PATCH] net/sched: sch_qfq: Fix null-deref in agg_dequeue
Date: Wed, 2 Jul 2025 09:32:16 +0200 [thread overview]
Message-ID: <2025070255-overdress-relight-21bf@gregkh> (raw)
In-Reply-To: <20250702071818.10161-1-xmei5@asu.edu>
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@asu.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
next prev parent reply other threads:[~2025-07-02 7:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAM_iQpWkQd_1BdP+4cA2uQ5HP2wrb5dh8ZUgGWY7v3enLq_7Fg@mail.gmail.com>
2025-07-02 4:02 ` [PATCH] net/sched: sch_qfq: Fix null-deref in agg_dequeue Xiang Mei
2025-07-02 5:40 ` Greg KH
2025-07-02 7:18 ` Xiang Mei
2025-07-02 7:20 ` Xiang Mei
2025-07-02 7:32 ` Greg KH [this message]
2025-07-02 8:30 ` [PATCH v2] " Xiang Mei
2025-07-04 4:45 ` Cong Wang
2025-07-05 21:21 ` [PATCH v3] " Xiang Mei
2025-07-06 3:07 ` Cong Wang
2025-07-10 9:20 ` patchwork-bot+netdevbpf
2025-07-05 21:24 ` [PATCH v2] " Xiang Mei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025070255-overdress-relight-21bf@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=xmei5@asu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).