netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c
       [not found] <alpine.DEB.1.10.0812101314460.11805@gandalf.stny.rr.com>
@ 2008-12-10 18:33 ` Eric Dumazet
  2008-12-10 19:00   ` Steven Rostedt
  2008-12-10 20:06   ` [PATCH] update rwlock initialization for nat_table Steven Rostedt
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2008-12-10 18:33 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Ingo Molnar, Linus Torvalds, Andrew Morton,
	Arnaldo Carvalho de Melo, David S. Miller, Linux Netdev List

cced netdev

Steven Rostedt a écrit :
> The following patch is in:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> 
>     branch: cleanups
> 
> 
> Steven Rostedt (1):
>       replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c
> 
> ----
>  net/dccp/proto.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> ---------------------------
> commit 3e1de819261b68a48b09719694c7e3579a8e4186
> Author: Steven Rostedt <srostedt@redhat.com>
> Date:   Wed Dec 10 12:49:47 2008 -0500
> 
>     replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c
>     
>     Impact: clean up
>     
>     RW_LOCK_UNLOCKED has been deprecated and superseded by
>     __RW_LOCK_UNLOCKED(name).  This patch removes one of the last
>     remaining users of it.
>     
>     Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> 
> diff --git a/net/dccp/proto.c b/net/dccp/proto.c
> index d0bd348..e6e54a7 100644
> --- a/net/dccp/proto.c
> +++ b/net/dccp/proto.c
> @@ -45,7 +45,7 @@ atomic_t dccp_orphan_count = ATOMIC_INIT(0);
>  EXPORT_SYMBOL_GPL(dccp_orphan_count);
>  
>  struct inet_hashinfo __cacheline_aligned dccp_hashinfo = {
> -	.lhash_lock	= RW_LOCK_UNLOCKED,
> +	.lhash_lock	= __RW_LOCK_UNLOCKED(dccp_hashinfo.lhash_lock),
>  	.lhash_users	= ATOMIC_INIT(0),
>  	.lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.lhash_wait),
>  };
> --

Hum... this rwlock doesnt exist anymore on net-next-2.6, all this stuff
was converted to RCU for upcoming 2.6.29

struct inet_hashinfo dccp_hashinfo;
EXPORT_SYMBOL_GPL(dccp_hashinfo);

I guess such a patch wont ease David job when 2.6.29 merge window opens



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

* Re: [PATCH] replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c
  2008-12-10 18:33 ` [PATCH] replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c Eric Dumazet
@ 2008-12-10 19:00   ` Steven Rostedt
  2008-12-10 20:06   ` [PATCH] update rwlock initialization for nat_table Steven Rostedt
  1 sibling, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-12-10 19:00 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: LKML, Ingo Molnar, Linus Torvalds, Andrew Morton,
	Arnaldo Carvalho de Melo, David S. Miller, Linux Netdev List


On Wed, 10 Dec 2008, Eric Dumazet wrote:

> cced netdev

Thanks,

> 
> Steven Rostedt a ?crit :
> >  
> >  struct inet_hashinfo __cacheline_aligned dccp_hashinfo = {
> > -	.lhash_lock	= RW_LOCK_UNLOCKED,
> > +	.lhash_lock	= __RW_LOCK_UNLOCKED(dccp_hashinfo.lhash_lock),
> >  	.lhash_users	= ATOMIC_INIT(0),
> >  	.lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.lhash_wait),
> >  };
> > --
> 
> Hum... this rwlock doesnt exist anymore on net-next-2.6, all this stuff
> was converted to RCU for upcoming 2.6.29
> 
> struct inet_hashinfo dccp_hashinfo;
> EXPORT_SYMBOL_GPL(dccp_hashinfo);
> 
> I guess such a patch wont ease David job when 2.6.29 merge window opens

One of the requirements in the new rt git tree is that all rwlocks must 
use the __RW_LOCK_UNLOCK(lock) macro. I had to fix it in our tree, but 
whenever I do a clean up patch, I like to share it ;-)

-- Steve


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

* [PATCH] update rwlock initialization for nat_table
  2008-12-10 18:33 ` [PATCH] replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c Eric Dumazet
  2008-12-10 19:00   ` Steven Rostedt
@ 2008-12-10 20:06   ` Steven Rostedt
  2008-12-11 22:18     ` Andrew Morton
  2008-12-15  8:20     ` David Miller
  1 sibling, 2 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-12-10 20:06 UTC (permalink / raw)
  To: Linux Netdev List, LKML
  Cc: Eric Dumazet, Ingo Molnar, Andrew Morton,
	Arnaldo Carvalho de Melo, David S. Miller


The following patch is in:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git

    branch: cleanups


Steven Rostedt (1):
      update rwlock initialization for nat_table

----
 net/ipv4/netfilter/nf_nat_rule.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---------------------------
commit d4175059c8f95e4cd58e0efaa85610ca59469fbd
Author: Steven Rostedt <srostedt@redhat.com>
Date:   Wed Dec 10 15:00:09 2008 -0500

    update rwlock initialization for nat_table
    
    Impact: clean up
    
    The commit e099a173573ce1ba171092aee7bb3c72ea686e59
    (netfilter: netns nat: per-netns NAT table) renamed the
    nat_table from __nat_table to nat_table without updating the
    __RW_LOCK_UNLOCKED(__nat_table.lock).
    
    Signed-off-by: Steven Rostedt <srostedt@redhat.com>

diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c
index bea54a6..8d489e7 100644
--- a/net/ipv4/netfilter/nf_nat_rule.c
+++ b/net/ipv4/netfilter/nf_nat_rule.c
@@ -61,7 +61,7 @@ static struct
 static struct xt_table nat_table = {
 	.name		= "nat",
 	.valid_hooks	= NAT_VALID_HOOKS,
-	.lock		= __RW_LOCK_UNLOCKED(__nat_table.lock),
+	.lock		= __RW_LOCK_UNLOCKED(nat_table.lock),
 	.me		= THIS_MODULE,
 	.af		= AF_INET,
 };



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

* Re: [PATCH] update rwlock initialization for nat_table
  2008-12-10 20:06   ` [PATCH] update rwlock initialization for nat_table Steven Rostedt
@ 2008-12-11 22:18     ` Andrew Morton
  2008-12-11 22:24       ` Steven Rostedt
  2008-12-15  8:20     ` David Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2008-12-11 22:18 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: netdev, linux-kernel, dada1, mingo, acme, davem

On Wed, 10 Dec 2008 15:06:00 -0500 (EST)
Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> The following patch is in:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> 
>     branch: cleanups
> 
> 
> Steven Rostedt (1):
>       update rwlock initialization for nat_table
> 
> ----
>  net/ipv4/netfilter/nf_nat_rule.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> ---------------------------
> commit d4175059c8f95e4cd58e0efaa85610ca59469fbd
> Author: Steven Rostedt <srostedt@redhat.com>
> Date:   Wed Dec 10 15:00:09 2008 -0500
> 
>     update rwlock initialization for nat_table
>     
>     Impact: clean up

It's more than a "cleanup"?

>     The commit e099a173573ce1ba171092aee7bb3c72ea686e59
>     (netfilter: netns nat: per-netns NAT table) renamed the
>     nat_table from __nat_table to nat_table without updating the
>     __RW_LOCK_UNLOCKED(__nat_table.lock).
>     
>     Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> 
> diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c
> index bea54a6..8d489e7 100644
> --- a/net/ipv4/netfilter/nf_nat_rule.c
> +++ b/net/ipv4/netfilter/nf_nat_rule.c
> @@ -61,7 +61,7 @@ static struct
>  static struct xt_table nat_table = {
>  	.name		= "nat",
>  	.valid_hooks	= NAT_VALID_HOOKS,
> -	.lock		= __RW_LOCK_UNLOCKED(__nat_table.lock),
> +	.lock		= __RW_LOCK_UNLOCKED(nat_table.lock),
>  	.me		= THIS_MODULE,
>  	.af		= AF_INET,
>  };

At present any lockdep messages relating to this lock will print the
wrong name.  So it's a nanobug, I think?


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

* Re: [PATCH] update rwlock initialization for nat_table
  2008-12-11 22:18     ` Andrew Morton
@ 2008-12-11 22:24       ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-12-11 22:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: netdev, linux-kernel, dada1, mingo, acme, davem



On Thu, 11 Dec 2008, Andrew Morton wrote:

> On Wed, 10 Dec 2008 15:06:00 -0500 (EST)
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > ---------------------------
> > commit d4175059c8f95e4cd58e0efaa85610ca59469fbd
> > Author: Steven Rostedt <srostedt@redhat.com>
> > Date:   Wed Dec 10 15:00:09 2008 -0500
> > 
> >     update rwlock initialization for nat_table
> >     
> >     Impact: clean up
> 
> It's more than a "cleanup"?
> 
> >     The commit e099a173573ce1ba171092aee7bb3c72ea686e59
> >     (netfilter: netns nat: per-netns NAT table) renamed the
> >     nat_table from __nat_table to nat_table without updating the
> >     __RW_LOCK_UNLOCKED(__nat_table.lock).
> >     
> >     Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> > 
> > diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c
> > index bea54a6..8d489e7 100644
> > --- a/net/ipv4/netfilter/nf_nat_rule.c
> > +++ b/net/ipv4/netfilter/nf_nat_rule.c
> > @@ -61,7 +61,7 @@ static struct
> >  static struct xt_table nat_table = {
> >  	.name		= "nat",
> >  	.valid_hooks	= NAT_VALID_HOOKS,
> > -	.lock		= __RW_LOCK_UNLOCKED(__nat_table.lock),
> > +	.lock		= __RW_LOCK_UNLOCKED(nat_table.lock),
> >  	.me		= THIS_MODULE,
> >  	.af		= AF_INET,
> >  };
> 
> At present any lockdep messages relating to this lock will print the
> wrong name.  So it's a nanobug, I think?

Well, I'm now working on the RT git tree, and it has a much stronger 
requirement on __RW_LOCK_UNLOCK. It actually uses the variable inside.

For mainline, it is a nanobug, but for -rt it is a compiler error. Since 
it is still a clean up, it would be nice to have it in mainline ;-)

-- Steve

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

* Re: [PATCH] update rwlock initialization for nat_table
  2008-12-10 20:06   ` [PATCH] update rwlock initialization for nat_table Steven Rostedt
  2008-12-11 22:18     ` Andrew Morton
@ 2008-12-15  8:20     ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2008-12-15  8:20 UTC (permalink / raw)
  To: rostedt; +Cc: netdev, linux-kernel, dada1, mingo, akpm, acme

From: Steven Rostedt <rostedt@goodmis.org>
Date: Wed, 10 Dec 2008 15:06:00 -0500 (EST)

>     update rwlock initialization for nat_table
>     
>     Impact: clean up
>     
>     The commit e099a173573ce1ba171092aee7bb3c72ea686e59
>     (netfilter: netns nat: per-netns NAT table) renamed the
>     nat_table from __nat_table to nat_table without updating the
>     __RW_LOCK_UNLOCKED(__nat_table.lock).
>     
>     Signed-off-by: Steven Rostedt <srostedt@redhat.com>

Applied to net-2.6, thanks Steven.

As Andrew mentioned this is a bug (albeit a "nano-bug" as you
called it :-) so I removed the Impact line in the commit
message when applying this.

Thanks!

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

end of thread, other threads:[~2008-12-15  8:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.DEB.1.10.0812101314460.11805@gandalf.stny.rr.com>
2008-12-10 18:33 ` [PATCH] replace deprecated RW_LOCK_UNLOCKED in net/dccp/proto.c Eric Dumazet
2008-12-10 19:00   ` Steven Rostedt
2008-12-10 20:06   ` [PATCH] update rwlock initialization for nat_table Steven Rostedt
2008-12-11 22:18     ` Andrew Morton
2008-12-11 22:24       ` Steven Rostedt
2008-12-15  8:20     ` David Miller

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).