Re: [PATCH nf] netfilter: x_tables: Switch synchronization to RCU

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

 



Subash Abhinov Kasiviswanathan <subashab@xxxxxxxxxxxxxx> wrote:
> diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
> index af22dbe..416a617 100644
> --- a/net/netfilter/x_tables.c
> +++ b/net/netfilter/x_tables.c
> @@ -1349,6 +1349,14 @@ struct xt_counters *xt_counters_alloc(unsigned int counters)
>  }
>  EXPORT_SYMBOL(xt_counters_alloc);
[..]

>  	/* Do the substitution. */
> -	local_bh_disable();
> -	private = table->private;
> +	private = xt_table_get_private_protected(table);
>  
>  	/* Check inside lock: is the old number correct? */
>  	if (num_counters != private->number) {

There is a local_bh_enable() here that needs removal.

Did you test it with PROVE_LOCKING enabled?

The placement/use of rcu_dereference and the _protected version
looks correct, I would not expect splats.



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

  Powered by Linux