public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Paul Blakey <paulb@mellanox.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Saeed Mahameed <saeedm@mellanox.com>,
	Mark Bloch <markb@mellanox.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1555 dest_is_valid() error: we previously assumed 'dest' could be null (see line 1545)
Date: Fri, 14 Aug 2020 09:06:33 +0800	[thread overview]
Message-ID: <202008140929.LmL8Twx2%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dddcbc139e96bd18d8c65ef7b7e440f0d32457c2
commit: ff189b43568216c6211e9e7ddd9026cb8295e744 net/mlx5: Add ignore level support fwd to table rules
date:   7 months ago
config: ia64-randconfig-m031-20200811 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1555 dest_is_valid() error: we previously assumed 'dest' could be null (see line 1545)

Old smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1818 _mlx5_add_flow_rules() error: double unlocked 'ft->node.lock' (orig line 1810)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1834 _mlx5_add_flow_rules() error: double unlocked 'ft->node.lock' (orig line 1810)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1840 _mlx5_add_flow_rules() error: double unlocked 'ft->node.lock' (orig line 1810)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1846 _mlx5_add_flow_rules() error: double unlocked 'ft->node.lock' (orig line 1810)
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1859 _mlx5_add_flow_rules() error: double unlocked 'fte->node.lock' (orig line 1857)

vim +/dest +1555 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

  1537	
  1538	static bool dest_is_valid(struct mlx5_flow_destination *dest,
  1539				  struct mlx5_flow_act *flow_act,
  1540				  struct mlx5_flow_table *ft)
  1541	{
  1542		bool ignore_level = flow_act->flags & FLOW_ACT_IGNORE_FLOW_LEVEL;
  1543		u32 action = flow_act->action;
  1544	
> 1545		if (dest && (dest->type == MLX5_FLOW_DESTINATION_TYPE_COUNTER))
  1546			return counter_is_valid(action);
  1547	
  1548		if (!(action & MLX5_FLOW_CONTEXT_ACTION_FWD_DEST))
  1549			return true;
  1550	
  1551		if (ignore_level) {
  1552			if (ft->type != FS_FT_FDB)
  1553				return false;
  1554	
> 1555			if (dest->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE &&
  1556			    dest->ft->type != FS_FT_FDB)
  1557				return false;
  1558		}
  1559	
  1560		if (!dest || ((dest->type ==
  1561		    MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE) &&
  1562		    (dest->ft->level <= ft->level && !ignore_level)))
  1563			return false;
  1564		return true;
  1565	}
  1566	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31727 bytes --]

             reply	other threads:[~2020-08-14  1:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14  1:06 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-11 10:34 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1555 dest_is_valid() error: we previously assumed 'dest' could be null (see line 1545) Dan Carpenter

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=202008140929.LmL8Twx2%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markb@mellanox.com \
    --cc=paulb@mellanox.com \
    --cc=saeedm@mellanox.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