From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4388 stmmac_xdp_run_prog() error: (-2147483647) too low for ERR_PTR
Date: Tue, 03 Aug 2021 13:34:51 +0800 [thread overview]
Message-ID: <202108031343.GfRP684f-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3920 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ong Boon Leong <boon.leong.ong@intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c500bee1c5b2f1d59b1081ac879d73268ab0ff17
commit: be8b38a722e68ffa069b7dfa887369c33d6ea886 net: stmmac: Add support for XDP_TX action
date: 4 months ago
:::::: branch date: 30 hours ago
:::::: commit date: 4 months ago
config: openrisc-randconfig-m031-20210803 (attached as .config)
compiler: or1k-linux-gcc (GCC) 10.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:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4388 stmmac_xdp_run_prog() error: (-2147483647) too low for ERR_PTR
vim +4388 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
be8b38a722e68f Ong Boon Leong 2021-04-01 4351
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4352 static struct sk_buff *stmmac_xdp_run_prog(struct stmmac_priv *priv,
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4353 struct xdp_buff *xdp)
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4354 {
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4355 struct bpf_prog *prog;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4356 int res;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4357 u32 act;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4358
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4359 rcu_read_lock();
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4360
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4361 prog = READ_ONCE(priv->xdp_prog);
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4362 if (!prog) {
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4363 res = STMMAC_XDP_PASS;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4364 goto unlock;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4365 }
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4366
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4367 act = bpf_prog_run_xdp(prog, xdp);
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4368 switch (act) {
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4369 case XDP_PASS:
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4370 res = STMMAC_XDP_PASS;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4371 break;
be8b38a722e68f Ong Boon Leong 2021-04-01 4372 case XDP_TX:
be8b38a722e68f Ong Boon Leong 2021-04-01 4373 res = stmmac_xdp_xmit_back(priv, xdp);
be8b38a722e68f Ong Boon Leong 2021-04-01 4374 break;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4375 default:
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4376 bpf_warn_invalid_xdp_action(act);
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4377 fallthrough;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4378 case XDP_ABORTED:
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4379 trace_xdp_exception(priv->dev, prog, act);
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4380 fallthrough;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4381 case XDP_DROP:
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4382 res = STMMAC_XDP_CONSUMED;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4383 break;
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4384 }
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4385
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4386 unlock:
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4387 rcu_read_unlock();
5fabb01207a2d3 Ong Boon Leong 2021-04-01 @4388 return ERR_PTR(-res);
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4389 }
5fabb01207a2d3 Ong Boon Leong 2021-04-01 4390
:::::: The code at line 4388 was first introduced by commit
:::::: 5fabb01207a2d3439a6abe1d08640de9c942945f net: stmmac: Add initial XDP support
:::::: TO: Ong Boon Leong <boon.leong.ong@intel.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34448 bytes --]
next reply other threads:[~2021-08-03 5:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 5:34 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-18 19:58 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4388 stmmac_xdp_run_prog() error: (-2147483647) too low for ERR_PTR kernel test robot
2021-11-22 13:53 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=202108031343.GfRP684f-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.