[bug report] net/mlx5e: Create advanced steering operation (ASO) object for MACsec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Emeel Hakim,

This is a semi-automatic email about new static checker warnings.

The patch 1f53da676439: "net/mlx5e: Create advanced steering
operation (ASO) object for MACsec" from Sep 21, 2022, leads to the
following Smatch complaint:

    drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c:1851 mlx5e_macsec_cleanup()
    warn: variable dereferenced before check 'macsec' (see line 1849)

drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
  1848		struct mlx5e_macsec *macsec = priv->macsec;
  1849		struct mlx5_core_dev *mdev = macsec->mdev;
                                             ^^^^^^^^^^^^
The patch adds a dereference

  1850	
  1851		if (!macsec)
                     ^^^^^^
But the old code assumed "macsec" could be NULL

  1852			return;
  1853	

regards,
dan carpenter



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux