From: Dan Carpenter <dan.carpenter@oracle.com>
To: Maxim Mikityanskiy <maximmi@nvidia.com>
Cc: kbuild@lists.01.org, Maxim Mikityanskiy <maximmi@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
lkp@intel.com, kbuild-all@lists.01.org, netdev@vger.kernel.org,
Saeed Mahameed <saeedm@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>,
Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [PATCH net-next 3/4] sch_htb: Stats for offloaded HTB
Date: Fri, 11 Dec 2020 11:41:41 +0300 [thread overview]
Message-ID: <20201211084141.GQ2789@kadam> (raw)
In-Reply-To: <7d1a6afe-d084-bdbd-168a-3bcb88910e2d@nvidia.com>
On Thu, Dec 10, 2020 at 05:07:28PM +0200, Maxim Mikityanskiy wrote:
> On 2020-12-10 10:28, Dan Carpenter wrote:
> > Hi Maxim,
> >
> >
> > url: https://github.com/0day-ci/linux/commits/Maxim-Mikityanskiy/HTB-offload/20201210-000703
> > base:
> > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
> > afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5
> > config: i386-randconfig-m021-20201209 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > smatch warnings:
> > net/sched/sch_htb.c:1310 htb_dump_class_stats() error: we previously assumed 'cl->leaf.q' could be null (see line 1300)
> >
> > vim +1310 net/sched/sch_htb.c
> >
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1289 static int
> > 87990467d387f92 Stephen Hemminger 2006-08-10 1290 htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, struct gnet_dump *d)
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1291 {
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1292 struct htb_class *cl = (struct htb_class *)arg;
> > 1e0ac0107df684e Maxim Mikityanskiy 2020-12-09 1293 struct htb_sched *q = qdisc_priv(sch);
> > 338ed9b4de57c4b Eric Dumazet 2016-06-21 1294 struct gnet_stats_queue qs = {
> > 338ed9b4de57c4b Eric Dumazet 2016-06-21 1295 .drops = cl->drops,
> > 3c75f6ee139d464 Eric Dumazet 2017-09-18 1296 .overlimits = cl->overlimits,
> > 338ed9b4de57c4b Eric Dumazet 2016-06-21 1297 };
> > 6401585366326fc John Fastabend 2014-09-28 1298 __u32 qlen = 0;
> > ^1da177e4c3f415 Linus Torvalds 2005-04-16 1299
> > 5dd431b6b92c0db Paolo Abeni 2019-03-28 @1300 if (!cl->level && cl->leaf.q)
> > ^^^^^^^^^^
> > Check for NULL
>
> Well, I don't think this is real... I don't see any possibility how
> cl->leaf.q can be NULL for a leaf class. However, I'll add a similar check
> below anyway.
>
Another option is to remove this check if it's really impossible.
regards,
dan carpenter
next prev parent reply other threads:[~2020-12-11 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 16:02 [PATCH net-next 0/4] HTB offload Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 1/4] net: sched: Add multi-queue support to sch_tree_lock Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 2/4] sch_htb: Hierarchical QoS hardware offload Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 3/4] sch_htb: Stats for offloaded HTB Maxim Mikityanskiy
2020-12-10 8:28 ` Dan Carpenter
2020-12-10 15:07 ` Maxim Mikityanskiy
2020-12-11 8:41 ` Dan Carpenter [this message]
2020-12-11 15:25 ` Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 4/4] net/mlx5e: Support HTB offload Maxim Mikityanskiy
2020-12-09 23:54 ` kernel test robot
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=20201211084141.GQ2789@kadam \
--to=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kuba@kernel.org \
--cc=lkp@intel.com \
--cc=maximmi@mellanox.com \
--cc=maximmi@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@mellanox.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 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).