netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] net: ping: small changes
@ 2011-05-14  8:59 Eric Dumazet
  2011-05-14 14:34 ` Vasiliy Kulikov
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2011-05-14  8:59 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Vasiliy Kulikov

ping_table is not __read_mostly, since it contains one rwlock,
and is static to ping.c

ping_port_rover & ping_v4_lookup are static

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Vasiliy Kulikov <segoon@openwall.com>
---
 net/ipv4/ping.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index a77e2d7..7041d09 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -49,9 +49,9 @@
 #include <net/checksum.h>
 
 
-struct ping_table ping_table __read_mostly;
+static struct ping_table ping_table;
 
-u16 ping_port_rover;
+static u16 ping_port_rover;
 
 static inline int ping_hashfn(struct net *net, unsigned num, unsigned mask)
 {
@@ -150,8 +150,8 @@ static void ping_v4_unhash(struct sock *sk)
 	}
 }
 
-struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr,
-	 u16 ident, int dif)
+static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr,
+				   u16 ident, int dif)
 {
 	struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident);
 	struct sock *sk = NULL;



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

* Re: [PATCH net-next-2.6] net: ping: small changes
  2011-05-14  8:59 [PATCH net-next-2.6] net: ping: small changes Eric Dumazet
@ 2011-05-14 14:34 ` Vasiliy Kulikov
  2011-05-15  5:22   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Vasiliy Kulikov @ 2011-05-14 14:34 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

On Sat, May 14, 2011 at 10:59 +0200, Eric Dumazet wrote:
> ping_table is not __read_mostly, since it contains one rwlock,
> and is static to ping.c
> 
> ping_port_rover & ping_v4_lookup are static
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Acked-by: Vasiliy Kulikov <segoon@openwall.com>

Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

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

* Re: [PATCH net-next-2.6] net: ping: small changes
  2011-05-14 14:34 ` Vasiliy Kulikov
@ 2011-05-15  5:22   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-05-15  5:22 UTC (permalink / raw)
  To: segoon; +Cc: eric.dumazet, netdev

From: Vasiliy Kulikov <segoon@openwall.com>
Date: Sat, 14 May 2011 18:34:05 +0400

> On Sat, May 14, 2011 at 10:59 +0200, Eric Dumazet wrote:
>> ping_table is not __read_mostly, since it contains one rwlock,
>> and is static to ping.c
>> 
>> ping_port_rover & ping_v4_lookup are static
>> 
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Acked-by: Vasiliy Kulikov <segoon@openwall.com>

Applied, thanks.

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

end of thread, other threads:[~2011-05-15  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-14  8:59 [PATCH net-next-2.6] net: ping: small changes Eric Dumazet
2011-05-14 14:34 ` Vasiliy Kulikov
2011-05-15  5:22   ` 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).