All of lore.kernel.org
 help / color / mirror / Atom feed
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: Fri, 19 Nov 2021 03:58:02 +0800	[thread overview]
Message-ID: <202111190353.Nf4XcosQ-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3922 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:   42eb8fdac2fc5d62392dcfcf0253753e821a97b0
commit: be8b38a722e68ffa069b7dfa887369c33d6ea886 net: stmmac: Add support for XDP_TX action
date:   8 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 8 months ago
config: arm-randconfig-m031-20211116 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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: 36261 bytes --]

             reply	other threads:[~2021-11-18 19:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 19:58 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-22 13:53 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4388 stmmac_xdp_run_prog() error: (-2147483647) too low for ERR_PTR kernel test robot
2021-08-03  5:34 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=202111190353.Nf4XcosQ-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.