Patch "netfilter: nf_tables_offload: Check for the NETDEV_UNREGISTER event" has been added to the 5.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    netfilter: nf_tables_offload: Check for the NETDEV_UNREGISTER event

to the 5.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:
     netfilter-nf_tables_offload-check-for-the-netdev_unr.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7bf618360d5d818805b313d2925fede321f2ff46
Author: wenxu <wenxu@xxxxxxxxx>
Date:   Wed Nov 13 12:21:07 2019 +0800

    netfilter: nf_tables_offload: Check for the NETDEV_UNREGISTER event
    
    [ Upstream commit d1f4c966475c6dd2545c6625022cb24e878bee11 ]
    
    Check for the NETDEV_UNREGISTER event from the nft_offload_netdev_event
    function, which is the event that actually triggers the clean up.
    
    Fixes: 06d392cbe3db ("netfilter: nf_tables_offload: remove rules when the device unregisters")
    Signed-off-by: wenxu <wenxu@xxxxxxxxx>
    Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c
index 5f6037695dee..6f7eab502e65 100644
--- a/net/netfilter/nf_tables_offload.c
+++ b/net/netfilter/nf_tables_offload.c
@@ -446,6 +446,9 @@ static int nft_offload_netdev_event(struct notifier_block *this,
 	struct net *net = dev_net(dev);
 	struct nft_chain *chain;
 
+	if (event != NETDEV_UNREGISTER)
+		return NOTIFY_DONE;
+
 	mutex_lock(&net->nft.commit_mutex);
 	chain = __nft_offload_get_chain(dev);
 	if (chain)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux