Re: [PATCH net] netfilter: nfnetlink_queue: acquire rcu_read_lock() in instance_destroy_rcu()

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

 



Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
> diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
> index 00f4bd21c59b419e96794127693c21ccb05e45b0..f1c31757e4969e8f975c7a1ebbc3b96148ec9724 100644
> --- a/net/netfilter/nfnetlink_queue.c
> +++ b/net/netfilter/nfnetlink_queue.c
> @@ -169,7 +169,9 @@ instance_destroy_rcu(struct rcu_head *head)
>  	struct nfqnl_instance *inst = container_of(head, struct nfqnl_instance,
>  						   rcu);
>  
> +	rcu_read_lock();
>  	nfqnl_flush(inst, NULL, 0);
> +	rcu_read_unlock();

That works too.  I sent a different patch for the same issue yesterday:

https://patchwork.ozlabs.org/project/netfilter-devel/patch/20240514103133.2784-1-fw@xxxxxxxxx/

If you prefer Erics patch thats absolutely fine with me, I'll rebase in
that case to keep the selftest around.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux