This is a note to let you know that I've just added the patch titled nfp: clean mc addresses in application firmware when closing port to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nfp-clean-mc-addresses-in-application-firmware-when-closing-port.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From cc7eab25b1cf3f9594fe61142d3523ce4d14a788 Mon Sep 17 00:00:00 2001 From: Yinjun Zhang <yinjun.zhang@xxxxxxxxxxxx> Date: Wed, 5 Jul 2023 07:28:18 +0200 Subject: nfp: clean mc addresses in application firmware when closing port From: Yinjun Zhang <yinjun.zhang@xxxxxxxxxxxx> commit cc7eab25b1cf3f9594fe61142d3523ce4d14a788 upstream. When moving devices from one namespace to another, mc addresses are cleaned in software while not removed from application firmware. Thus the mc addresses are remained and will cause resource leak. Now use `__dev_mc_unsync` to clean mc addresses when closing port. Fixes: e20aa071cd95 ("nfp: fix schedule in atomic context when sync mc address") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Yinjun Zhang <yinjun.zhang@xxxxxxxxxxxx> Acked-by: Simon Horman <simon.horman@xxxxxxxxxxxx> Signed-off-by: Louis Peens <louis.peens@xxxxxxxxxxxx> Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx> Message-ID: <20230705052818.7122-1-louis.peens@xxxxxxxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 49f2f081ebb5..6b1fb5708434 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -53,6 +53,8 @@ #include "crypto/crypto.h" #include "crypto/fw.h" +static int nfp_net_mc_unsync(struct net_device *netdev, const unsigned char *addr); + /** * nfp_net_get_fw_version() - Read and parse the FW version * @fw_ver: Output fw_version structure to read to @@ -1084,6 +1086,9 @@ static int nfp_net_netdev_close(struct net_device *netdev) /* Step 2: Tell NFP */ + if (nn->cap_w1 & NFP_NET_CFG_CTRL_MCAST_FILTER) + __dev_mc_unsync(netdev, nfp_net_mc_unsync); + nfp_net_clear_config_and_disable(nn); nfp_port_configure(netdev, false); -- 2.41.0 Patches currently in stable-queue which might be from yinjun.zhang@xxxxxxxxxxxx are queue-6.4/nfp-clean-mc-addresses-in-application-firmware-when-closing-port.patch