Re: [PATCH nf-next-2.6] netfilter: add __rcu annotations

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

 



On 15.11.2010 17:46, Eric Dumazet wrote:
> @@ -49,11 +52,15 @@ EXPORT_SYMBOL(nf_register_queue_handler);
>  /* The caller must flush their queue before this */
>  int nf_unregister_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh)
>  {
> +	const struct nf_queue_handler *old;
> +
>  	if (pf >= ARRAY_SIZE(queue_handler))
>  		return -EINVAL;
>  
>  	mutex_lock(&queue_handler_mutex);
> -	if (queue_handler[pf] && queue_handler[pf] != qh) {
> +	old = rcu_dereference_protected(queue_handler[pf],
> +					lockdep_is_held(&queue_handler_mutex));
> +	if (old && old) {

This doesn't look like it was intended :)

if (old && old != qh)?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux