public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Leon Romanovsky <[email protected]>
Cc: [email protected], [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected], Raed Salem <[email protected]>
Subject: [ammarfaizi2-block:mellanox/linux/queue-next 58/75] drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c:133:38: warning: variable 'ft' is uninitialized when used here
Date: Wed, 30 Mar 2022 06:02:00 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block mellanox/linux/queue-next
head:   e38dcd0822f6663f12798eb3b0273a0a77f3c286
commit: 75f668fca4309df2dd7c1bf49d9489fbb7b049f6 [58/75] net/mlx5: Make sure that no dangling IPsec FS pointers exist
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220330/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/75f668fca4309df2dd7c1bf49d9489fbb7b049f6
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block mellanox/linux/queue-next
        git checkout 75f668fca4309df2dd7c1bf49d9489fbb7b049f6
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/mellanox/mlx5/core/ net/netfilter/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c:133:38: warning: variable 'ft' is uninitialized when used here [-Wuninitialized]
           miss_group = mlx5_create_flow_group(ft, flow_group_in);
                                               ^~
   drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c:119:28: note: initialize the variable 'ft' to silence this warning
           struct mlx5_flow_table *ft;
                                     ^
                                      = NULL
   1 warning generated.


vim +/ft +133 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c

5e466345291a91 Huy Nguyen      2020-06-05  110  
5e466345291a91 Huy Nguyen      2020-06-05  111  static int rx_fs_create(struct mlx5e_priv *priv,
5e466345291a91 Huy Nguyen      2020-06-05  112  			struct mlx5e_accel_fs_esp_prot *fs_prot)
5e466345291a91 Huy Nguyen      2020-06-05  113  {
5e466345291a91 Huy Nguyen      2020-06-05  114  	int inlen = MLX5_ST_SZ_BYTES(create_flow_group_in);
5e466345291a91 Huy Nguyen      2020-06-05  115  	struct mlx5_flow_group *miss_group;
5e466345291a91 Huy Nguyen      2020-06-05  116  	struct mlx5_flow_handle *miss_rule;
5e466345291a91 Huy Nguyen      2020-06-05  117  	MLX5_DECLARE_FLOW_ACT(flow_act);
5e466345291a91 Huy Nguyen      2020-06-05  118  	struct mlx5_flow_spec *spec;
5e466345291a91 Huy Nguyen      2020-06-05  119  	struct mlx5_flow_table *ft;
5e466345291a91 Huy Nguyen      2020-06-05  120  	u32 *flow_group_in;
75f668fca4309d Leon Romanovsky 2022-03-10  121  	int err;
5e466345291a91 Huy Nguyen      2020-06-05  122  
5e466345291a91 Huy Nguyen      2020-06-05  123  	flow_group_in = kvzalloc(inlen, GFP_KERNEL);
5e466345291a91 Huy Nguyen      2020-06-05  124  	spec = kvzalloc(sizeof(*spec), GFP_KERNEL);
5e466345291a91 Huy Nguyen      2020-06-05  125  	if (!flow_group_in || !spec) {
5e466345291a91 Huy Nguyen      2020-06-05  126  		err = -ENOMEM;
75f668fca4309d Leon Romanovsky 2022-03-10  127  		goto err_alloc;
5e466345291a91 Huy Nguyen      2020-06-05  128  	}
5e466345291a91 Huy Nguyen      2020-06-05  129  
5e466345291a91 Huy Nguyen      2020-06-05  130  	/* Create miss_group */
5e466345291a91 Huy Nguyen      2020-06-05  131  	MLX5_SET(create_flow_group_in, flow_group_in, start_flow_index, ft->max_fte - 1);
5e466345291a91 Huy Nguyen      2020-06-05  132  	MLX5_SET(create_flow_group_in, flow_group_in, end_flow_index, ft->max_fte - 1);
5e466345291a91 Huy Nguyen      2020-06-05 @133  	miss_group = mlx5_create_flow_group(ft, flow_group_in);
5e466345291a91 Huy Nguyen      2020-06-05  134  	if (IS_ERR(miss_group)) {
5e466345291a91 Huy Nguyen      2020-06-05  135  		err = PTR_ERR(miss_group);
5e466345291a91 Huy Nguyen      2020-06-05  136  		netdev_err(priv->netdev, "fail to create ipsec rx miss_group err=%d\n", err);
75f668fca4309d Leon Romanovsky 2022-03-10  137  		goto err_alloc;
5e466345291a91 Huy Nguyen      2020-06-05  138  	}
5e466345291a91 Huy Nguyen      2020-06-05  139  	fs_prot->miss_group = miss_group;
5e466345291a91 Huy Nguyen      2020-06-05  140  
5e466345291a91 Huy Nguyen      2020-06-05  141  	/* Create miss rule */
5e466345291a91 Huy Nguyen      2020-06-05  142  	miss_rule = mlx5_add_flow_rules(ft, spec, &flow_act, &fs_prot->default_dest, 1);
5e466345291a91 Huy Nguyen      2020-06-05  143  	if (IS_ERR(miss_rule)) {
5e466345291a91 Huy Nguyen      2020-06-05  144  		err = PTR_ERR(miss_rule);
5e466345291a91 Huy Nguyen      2020-06-05  145  		netdev_err(priv->netdev, "fail to create ipsec rx miss_rule err=%d\n", err);
75f668fca4309d Leon Romanovsky 2022-03-10  146  		goto err_add_rule;
5e466345291a91 Huy Nguyen      2020-06-05  147  	}
5e466345291a91 Huy Nguyen      2020-06-05  148  	fs_prot->miss_rule = miss_rule;
75f668fca4309d Leon Romanovsky 2022-03-10  149  	return 0;
5e466345291a91 Huy Nguyen      2020-06-05  150  
75f668fca4309d Leon Romanovsky 2022-03-10  151  err_add_rule:
75f668fca4309d Leon Romanovsky 2022-03-10  152  	mlx5_destroy_flow_group(fs_prot->miss_group);
75f668fca4309d Leon Romanovsky 2022-03-10  153  err_alloc:
22db4c24452a66 Denis Efremov   2020-09-21  154  	kvfree(flow_group_in);
22db4c24452a66 Denis Efremov   2020-09-21  155  	kvfree(spec);
5e466345291a91 Huy Nguyen      2020-06-05  156  	return err;
5e466345291a91 Huy Nguyen      2020-06-05  157  }
5e466345291a91 Huy Nguyen      2020-06-05  158  

:::::: The code at line 133 was first introduced by commit
:::::: 5e466345291a91d1722e7198497198becda29e22 net/mlx5e: IPsec: Add IPsec steering in local NIC RX

:::::: TO: Huy Nguyen <[email protected]>
:::::: CC: Saeed Mahameed <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-03-29 22:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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