netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: don't use INIT_RCU_HEAD()
@ 2010-02-11 19:49 Alexey Dobriyan
  2010-02-11 22:46 ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2010-02-11 19:49 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel

call_rcu() will unconditionally reinitialize RCU head anyway.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 net/netfilter/nf_conntrack_expect.c |    1 -
 net/netfilter/nf_conntrack_extend.c |    1 -
 net/netfilter/nfnetlink_queue.c     |    1 -
 3 files changed, 3 deletions(-)

--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -232,7 +232,6 @@ struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me)
 
 	new->master = me;
 	atomic_set(&new->use, 1);
-	INIT_RCU_HEAD(&new->rcu);
 	return new;
 }
 EXPORT_SYMBOL_GPL(nf_ct_expect_alloc);
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -59,7 +59,6 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
 	if (!*ext)
 		return NULL;
 
-	INIT_RCU_HEAD(&(*ext)->rcu);
 	(*ext)->offset[id] = off;
 	(*ext)->len = len;
 
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -112,7 +112,6 @@ instance_create(u_int16_t queue_num, int pid)
 	inst->copy_mode = NFQNL_COPY_NONE;
 	spin_lock_init(&inst->lock);
 	INIT_LIST_HEAD(&inst->queue_list);
-	INIT_RCU_HEAD(&inst->rcu);
 
 	if (!try_module_get(THIS_MODULE)) {
 		err = -EAGAIN;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netfilter: don't use INIT_RCU_HEAD()
  2010-02-11 19:49 [PATCH] netfilter: don't use INIT_RCU_HEAD() Alexey Dobriyan
@ 2010-02-11 22:46 ` Paul E. McKenney
  2010-02-12  5:26   ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2010-02-11 22:46 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: kaber, netfilter-devel

On Thu, Feb 11, 2010 at 09:49:11PM +0200, Alexey Dobriyan wrote:
> call_rcu() will unconditionally reinitialize RCU head anyway.

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  net/netfilter/nf_conntrack_expect.c |    1 -
>  net/netfilter/nf_conntrack_extend.c |    1 -
>  net/netfilter/nfnetlink_queue.c     |    1 -
>  3 files changed, 3 deletions(-)
> 
> --- a/net/netfilter/nf_conntrack_expect.c
> +++ b/net/netfilter/nf_conntrack_expect.c
> @@ -232,7 +232,6 @@ struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me)
> 
>  	new->master = me;
>  	atomic_set(&new->use, 1);
> -	INIT_RCU_HEAD(&new->rcu);
>  	return new;
>  }
>  EXPORT_SYMBOL_GPL(nf_ct_expect_alloc);
> --- a/net/netfilter/nf_conntrack_extend.c
> +++ b/net/netfilter/nf_conntrack_extend.c
> @@ -59,7 +59,6 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
>  	if (!*ext)
>  		return NULL;
> 
> -	INIT_RCU_HEAD(&(*ext)->rcu);
>  	(*ext)->offset[id] = off;
>  	(*ext)->len = len;
> 
> --- a/net/netfilter/nfnetlink_queue.c
> +++ b/net/netfilter/nfnetlink_queue.c
> @@ -112,7 +112,6 @@ instance_create(u_int16_t queue_num, int pid)
>  	inst->copy_mode = NFQNL_COPY_NONE;
>  	spin_lock_init(&inst->lock);
>  	INIT_LIST_HEAD(&inst->queue_list);
> -	INIT_RCU_HEAD(&inst->rcu);
> 
>  	if (!try_module_get(THIS_MODULE)) {
>  		err = -EAGAIN;
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netfilter: don't use INIT_RCU_HEAD()
  2010-02-11 22:46 ` Paul E. McKenney
@ 2010-02-12  5:26   ` Patrick McHardy
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2010-02-12  5:26 UTC (permalink / raw)
  To: paulmck; +Cc: Alexey Dobriyan, netfilter-devel

Paul E. McKenney wrote:
> On Thu, Feb 11, 2010 at 09:49:11PM +0200, Alexey Dobriyan wrote:
>> call_rcu() will unconditionally reinitialize RCU head anyway.
> 
> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> 
>> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-12  5:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 19:49 [PATCH] netfilter: don't use INIT_RCU_HEAD() Alexey Dobriyan
2010-02-11 22:46 ` Paul E. McKenney
2010-02-12  5:26   ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).