kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] net/mlx5e: Add MACsec offload Rx command support
@ 2022-09-12 10:57 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-09-12 10:57 UTC (permalink / raw)
  To: liorna; +Cc: kernel-janitors

Hello Lior Nahmanson,

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

The patch aae3454e4d4c: "net/mlx5e: Add MACsec offload Rx command 
support" from Sep 5, 2022, leads to the following Smatch complaint:

    drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c:827 mlx5e_macsec_upd_rxsa()
    error: we previously assumed 'rx_sa' could be null (see line 819)

drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
   818		rx_sa = rx_sc->rx_sa[assoc_num];
   819		if (rx_sa) {
                    ^^^^^
Check for NULL.

   820			netdev_err(ctx->netdev,
   821				   "MACsec offload rx_sc sci %lld rx_sa %d already exist\n",
   822				   sci, assoc_num);
   823			err = -EEXIST;
   824			goto out;
   825		}
   826	
   827		if (rx_sa->next_pn != ctx_rx_sa->next_pn_halves.lower) {
                    ^^^^^^^^
This will crash on the success path.  Should have been caught in testing
which suggests it's a bad merge or something...

   828			netdev_err(ctx->netdev,
   829				   "MACsec offload update RX sa %d PN isn't supported\n",

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-12 10:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 10:57 [bug report] net/mlx5e: Add MACsec offload Rx command support Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).