netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Xiang Mei <xmei5@asu.edu>
Cc: xiyou.wangcong@gmail.com, netdev@vger.kernel.org,
	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 07:40:58 +0200	[thread overview]
Message-ID: <2025070231-unrented-sulfate-8b6f@gregkh> (raw)
In-Reply-To: <20250702040228.8002-1-xmei5@asu.edu>

On Tue, Jul 01, 2025 at 09:02:28PM -0700, Xiang Mei wrote:
> From: n132 <xmei5@asu.edu>
> 
> 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: n132 <xmei5@asu.edu>

We need a real name, sorry.  Please read the documentation for why.

thanks,

greg k-h

  reply	other threads:[~2025-07-02  5:41 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 [this message]
2025-07-02  7:18     ` Xiang Mei
2025-07-02  7:20       ` Xiang Mei
2025-07-02  7:32       ` Greg KH
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=2025070231-unrented-sulfate-8b6f@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).