From: Jakub Kicinski <kuba@kernel.org>
To: Victor Nogueira <victor@mojatatu.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
netdev@vger.kernel.org, pctammela@mojatatu.com,
syzbot+d8b58d7b0ad89a678a16@syzkaller.appspotmail.com,
syzbot+5eccb463fa89309d8bdc@syzkaller.appspotmail.com,
syzbot+1261670bbdefc5485a06@syzkaller.appspotmail.com,
syzbot+4dadc5aecf80324d5a51@syzkaller.appspotmail.com,
syzbot+15b96fc3aac35468fe77@syzkaller.appspotmail.com
Subject: Re: [PATCH net] net/sched: Abort __tc_modify_qdisc if parent class does not exist
Date: Mon, 7 Jul 2025 06:59:19 -0700 [thread overview]
Message-ID: <20250707065919.73364a06@kernel.org> (raw)
In-Reply-To: <20250704163422.160424-1-victor@mojatatu.com>
On Fri, 4 Jul 2025 13:34:22 -0300 Victor Nogueira wrote:
> - if (!q) {
> - NL_SET_ERR_MSG(extack, "Cannot find specified qdisc on specified device");
> - return -ENOENT;
> + if (IS_ERR_OR_NULL(q)) {
> + if (!q) {
> + NL_SET_ERR_MSG(extack,
> + "Cannot find specified qdisc on specified device");
> + return -ENOENT;
> + }
> + return PTR_ERR(q);
> }
nit: could you leave the existing handling as is?
if (!q) {
NL_SET_ERR_MSG(extack, "Cannot find specified qdisc on specified device");
return -ENOENT;
}
if (IS_ERR(q))
return PTR_ERR(q);
the double conditions increase indentation and confuse static analyzers
--
pw-bot: cr
prev parent reply other threads:[~2025-07-07 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 16:34 [PATCH net] net/sched: Abort __tc_modify_qdisc if parent class does not exist Victor Nogueira
2025-07-04 23:54 ` Cong Wang
2025-07-05 14:03 ` Jamal Hadi Salim
2025-07-07 13:59 ` Jakub Kicinski [this message]
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=20250707065919.73364a06@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pctammela@mojatatu.com \
--cc=syzbot+1261670bbdefc5485a06@syzkaller.appspotmail.com \
--cc=syzbot+15b96fc3aac35468fe77@syzkaller.appspotmail.com \
--cc=syzbot+4dadc5aecf80324d5a51@syzkaller.appspotmail.com \
--cc=syzbot+5eccb463fa89309d8bdc@syzkaller.appspotmail.com \
--cc=syzbot+d8b58d7b0ad89a678a16@syzkaller.appspotmail.com \
--cc=victor@mojatatu.com \
--cc=xiyou.wangcong@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.