All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR
@ 2021-02-25  7:17 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-02-25  7:17 UTC (permalink / raw
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4392 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sven Auhagen <sven.auhagen@voleatech.de>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   29c395c77a9a514c5857c45ceae2665e9bd99ac7
commit: 9cbc948b5a20c9c054d9631099c0426c16da546b igb: add XDP support
date:   5 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 5 months ago
config: i386-randconfig-m021-20210225 (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>

New smatch warnings:
drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR

Old smatch warnings:
drivers/net/ethernet/intel/igb/igb_main.c:8755 igb_clean_rx_irq() error: 'skb' dereferencing possible ERR_PTR()

vim +8425 drivers/net/ethernet/intel/igb/igb_main.c

b1bb2eb0a0deb0 Alexander Duyck 2017-02-06  8382  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8383  static struct sk_buff *igb_run_xdp(struct igb_adapter *adapter,
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8384  				   struct igb_ring *rx_ring,
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8385  				   struct xdp_buff *xdp)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8386  {
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8387  	int err, result = IGB_XDP_PASS;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8388  	struct bpf_prog *xdp_prog;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8389  	u32 act;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8390  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8391  	rcu_read_lock();
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8392  	xdp_prog = READ_ONCE(rx_ring->xdp_prog);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8393  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8394  	if (!xdp_prog)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8395  		goto xdp_out;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8396  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8397  	prefetchw(xdp->data_hard_start); /* xdp_frame write */
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8398  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8399  	act = bpf_prog_run_xdp(xdp_prog, xdp);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8400  	switch (act) {
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8401  	case XDP_PASS:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8402  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8403  	case XDP_TX:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8404  		result = igb_xdp_xmit_back(adapter, xdp);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8405  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8406  	case XDP_REDIRECT:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8407  		err = xdp_do_redirect(adapter->netdev, xdp, xdp_prog);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8408  		if (!err)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8409  			result = IGB_XDP_REDIR;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8410  		else
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8411  			result = IGB_XDP_CONSUMED;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8412  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8413  	default:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8414  		bpf_warn_invalid_xdp_action(act);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8415  		fallthrough;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8416  	case XDP_ABORTED:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8417  		trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8418  		fallthrough;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8419  	case XDP_DROP:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8420  		result = IGB_XDP_CONSUMED;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8421  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8422  	}
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8423  xdp_out:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8424  	rcu_read_unlock();
9cbc948b5a20c9 Sven Auhagen    2020-09-02 @8425  	return ERR_PTR(-result);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8426  }
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8427  

---
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: 36677 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR
@ 2021-03-31 22:53 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-03-31 22:53 UTC (permalink / raw
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4364 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sven Auhagen <sven.auhagen@voleatech.de>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d19cc4bfbff1ae72c3505a00fb8ce0d3fa519e6c
commit: 9cbc948b5a20c9c054d9631099c0426c16da546b igb: add XDP support
date:   6 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 6 months ago
config: i386-randconfig-m021-20210401 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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:
drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR
drivers/net/ethernet/intel/igb/igb_main.c:8755 igb_clean_rx_irq() error: 'skb' dereferencing possible ERR_PTR()

vim +8425 drivers/net/ethernet/intel/igb/igb_main.c

b1bb2eb0a0deb0 Alexander Duyck 2017-02-06  8382  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8383  static struct sk_buff *igb_run_xdp(struct igb_adapter *adapter,
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8384  				   struct igb_ring *rx_ring,
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8385  				   struct xdp_buff *xdp)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8386  {
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8387  	int err, result = IGB_XDP_PASS;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8388  	struct bpf_prog *xdp_prog;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8389  	u32 act;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8390  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8391  	rcu_read_lock();
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8392  	xdp_prog = READ_ONCE(rx_ring->xdp_prog);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8393  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8394  	if (!xdp_prog)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8395  		goto xdp_out;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8396  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8397  	prefetchw(xdp->data_hard_start); /* xdp_frame write */
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8398  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8399  	act = bpf_prog_run_xdp(xdp_prog, xdp);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8400  	switch (act) {
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8401  	case XDP_PASS:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8402  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8403  	case XDP_TX:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8404  		result = igb_xdp_xmit_back(adapter, xdp);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8405  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8406  	case XDP_REDIRECT:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8407  		err = xdp_do_redirect(adapter->netdev, xdp, xdp_prog);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8408  		if (!err)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8409  			result = IGB_XDP_REDIR;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8410  		else
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8411  			result = IGB_XDP_CONSUMED;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8412  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8413  	default:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8414  		bpf_warn_invalid_xdp_action(act);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8415  		fallthrough;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8416  	case XDP_ABORTED:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8417  		trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8418  		fallthrough;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8419  	case XDP_DROP:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8420  		result = IGB_XDP_CONSUMED;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8421  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8422  	}
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8423  xdp_out:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8424  	rcu_read_unlock();
9cbc948b5a20c9 Sven Auhagen    2020-09-02 @8425  	return ERR_PTR(-result);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8426  }
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8427  

---
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: 36115 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR
@ 2021-06-15 15:22 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-06-15 15:22 UTC (permalink / raw
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4363 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Sven Auhagen <sven.auhagen@voleatech.de>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06af8679449d4ed282df13191fc52d5ba28ec536
commit: 9cbc948b5a20c9c054d9631099c0426c16da546b igb: add XDP support
date:   9 months ago
:::::: branch date: 5 days ago
:::::: commit date: 9 months ago
config: i386-randconfig-m021-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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:
drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR
drivers/net/ethernet/intel/igb/igb_main.c:8755 igb_clean_rx_irq() error: 'skb' dereferencing possible ERR_PTR()

vim +8425 drivers/net/ethernet/intel/igb/igb_main.c

b1bb2eb0a0deb0 Alexander Duyck 2017-02-06  8382  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8383  static struct sk_buff *igb_run_xdp(struct igb_adapter *adapter,
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8384  				   struct igb_ring *rx_ring,
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8385  				   struct xdp_buff *xdp)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8386  {
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8387  	int err, result = IGB_XDP_PASS;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8388  	struct bpf_prog *xdp_prog;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8389  	u32 act;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8390  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8391  	rcu_read_lock();
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8392  	xdp_prog = READ_ONCE(rx_ring->xdp_prog);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8393  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8394  	if (!xdp_prog)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8395  		goto xdp_out;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8396  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8397  	prefetchw(xdp->data_hard_start); /* xdp_frame write */
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8398  
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8399  	act = bpf_prog_run_xdp(xdp_prog, xdp);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8400  	switch (act) {
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8401  	case XDP_PASS:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8402  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8403  	case XDP_TX:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8404  		result = igb_xdp_xmit_back(adapter, xdp);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8405  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8406  	case XDP_REDIRECT:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8407  		err = xdp_do_redirect(adapter->netdev, xdp, xdp_prog);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8408  		if (!err)
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8409  			result = IGB_XDP_REDIR;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8410  		else
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8411  			result = IGB_XDP_CONSUMED;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8412  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8413  	default:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8414  		bpf_warn_invalid_xdp_action(act);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8415  		fallthrough;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8416  	case XDP_ABORTED:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8417  		trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8418  		fallthrough;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8419  	case XDP_DROP:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8420  		result = IGB_XDP_CONSUMED;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8421  		break;
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8422  	}
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8423  xdp_out:
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8424  	rcu_read_unlock();
9cbc948b5a20c9 Sven Auhagen    2020-09-02 @8425  	return ERR_PTR(-result);
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8426  }
9cbc948b5a20c9 Sven Auhagen    2020-09-02  8427  

---
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: 32905 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-15 15:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-15 15:22 drivers/net/ethernet/intel/igb/igb_main.c:8425 igb_run_xdp() error: (-2147483647) too low for ERR_PTR kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-31 22:53 kernel test robot
2021-02-25  7:17 kernel test robot

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.