netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: Tree for May 16 (net/ipv4/ping)
       [not found] <20110516151019.be338f1c.sfr@canb.auug.org.au>
@ 2011-05-16 19:35 ` Randy Dunlap
  2011-05-16 19:38   ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2011-05-16 19:35 UTC (permalink / raw)
  To: Stephen Rothwell, netdev; +Cc: linux-next, LKML

On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:

> Hi all,
> 
> Changes since 20110513:


when CONFIG_PROC_SYSCTL is not enabled:

ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: linux-next: Tree for May 16 (net/ipv4/ping)
  2011-05-16 19:35 ` linux-next: Tree for May 16 (net/ipv4/ping) Randy Dunlap
@ 2011-05-16 19:38   ` David Miller
  2011-05-17  9:54     ` Eric Dumazet
  2011-05-17 10:16     ` [PATCH] net: ping: fix build failure Vasiliy Kulikov
  0 siblings, 2 replies; 8+ messages in thread
From: David Miller @ 2011-05-16 19:38 UTC (permalink / raw)
  To: randy.dunlap; +Cc: sfr, netdev, linux-next, linux-kernel, segoon

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Mon, 16 May 2011 12:35:34 -0700

> On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
> 
>> Hi all,
>> 
>> Changes since 20110513:
> 
> 
> when CONFIG_PROC_SYSCTL is not enabled:
> 
> ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'

Vasiliy, please fix this.

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

* Re: linux-next: Tree for May 16 (net/ipv4/ping)
  2011-05-16 19:38   ` David Miller
@ 2011-05-17  9:54     ` Eric Dumazet
  2011-05-17 10:16     ` [PATCH] net: ping: fix build failure Vasiliy Kulikov
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Dumazet @ 2011-05-17  9:54 UTC (permalink / raw)
  To: David Miller; +Cc: randy.dunlap, sfr, netdev, linux-next, linux-kernel, segoon

Le lundi 16 mai 2011 à 15:38 -0400, David Miller a écrit :
> From: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Mon, 16 May 2011 12:35:34 -0700
> 
> > On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
> > 
> >> Hi all,
> >> 
> >> Changes since 20110513:
> > 
> > 
> > when CONFIG_PROC_SYSCTL is not enabled:
> > 
> > ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
> 
> Vasiliy, please fix this.

Vasily seems busy, here is a fix for this problem.

I tested new ping was working even if we could not set the group range
anymore.

Thanks

[PATCH net-next-2.6] net: ping: fix build error

Randy Dunlap reported following build error if CONFIG_PROC_SYSCTL is not
enabled:

ping.c:(.text+0x52af3): undefined reference to
`inet_get_ping_group_range_net'

Also made inet_get_ping_group_range_table() static

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Vasiliy Kulikov <segoon@openwall.com>
---
 net/ipv4/inet_connection_sock.c |   14 ++++++++++++++
 net/ipv4/sysctl_net_ipv4.c      |   14 +-------------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 3a2ba56..e5c0729 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -23,6 +23,7 @@
 #include <net/route.h>
 #include <net/tcp_states.h>
 #include <net/xfrm.h>
+#include <net/ping.h>
 
 #ifdef INET_CSK_DEBUG
 const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n";
@@ -52,6 +53,19 @@ void inet_get_local_port_range(int *low, int *high)
 }
 EXPORT_SYMBOL(inet_get_local_port_range);
 
+void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
+{
+	const gid_t *data = net->ipv4.sysctl_ping_group_range;
+	unsigned int seq;
+
+	do {
+		seq = read_seqbegin(&sysctl_local_ports.lock);
+
+		*low = data[0];
+		*high = data[1];
+	} while (read_seqretry(&sysctl_local_ports.lock, seq));
+}
+
 int inet_csk_bind_conflict(const struct sock *sk,
 			   const struct inet_bind_bucket *tb)
 {
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 28e8273..dc5d2a0 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -73,19 +73,7 @@ static int ipv4_local_port_range(ctl_table *table, int write,
 }
 
 
-void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
-{
-	gid_t *data = net->ipv4.sysctl_ping_group_range;
-	unsigned seq;
-	do {
-		seq = read_seqbegin(&sysctl_local_ports.lock);
-
-		*low = data[0];
-		*high = data[1];
-	} while (read_seqretry(&sysctl_local_ports.lock, seq));
-}
-
-void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high)
+static void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high)
 {
 	gid_t *data = table->data;
 	unsigned seq;

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

* [PATCH] net: ping: fix build failure
  2011-05-16 19:38   ` David Miller
  2011-05-17  9:54     ` Eric Dumazet
@ 2011-05-17 10:16     ` Vasiliy Kulikov
  2011-05-17 10:27       ` Eric Dumazet
                         ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Vasiliy Kulikov @ 2011-05-17 10:16 UTC (permalink / raw)
  To: David Miller; +Cc: randy.dunlap, sfr, netdev, linux-next, linux-kernel

On Mon, May 16, 2011 at 15:38 -0400, David Miller wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Mon, 16 May 2011 12:35:34 -0700
> 
> > On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
> > when CONFIG_PROC_SYSCTL is not enabled:
> > 
> > ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
> 
> Vasiliy, please fix this.

I wonder whether there is any way to test such unusual configurations?
Only randconfig or are there any (partly-)automated tools for it?


[PATCH] net: ping: fix build failure

If CONFIG_PROC_SYSCTL=n the building process fails:

    ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'

Moved inet_get_ping_group_range_net() to ping.c.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
 include/net/ping.h         |    2 --
 net/ipv4/ping.c            |   13 +++++++++++++
 net/ipv4/sysctl_net_ipv4.c |   12 ------------
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/include/net/ping.h b/include/net/ping.h
index 23062c3..682b5ae 100644
--- a/include/net/ping.h
+++ b/include/net/ping.h
@@ -44,8 +44,6 @@ extern struct proto ping_prot;
 extern void ping_rcv(struct sk_buff *);
 extern void ping_err(struct sk_buff *, u32 info);
 
-extern void inet_get_ping_group_range_net(struct net *net, unsigned int *low, unsigned int *high);
-
 #ifdef CONFIG_PROC_FS
 extern int __init ping_proc_init(void);
 extern void ping_proc_exit(void);
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 7041d09..3635975 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -188,6 +188,19 @@ exit:
 	return sk;
 }
 
+static void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
+{
+	gid_t *data = net->ipv4.sysctl_ping_group_range;
+	unsigned seq;
+	do {
+		seq = read_seqbegin(&sysctl_local_ports.lock);
+
+		*low = data[0];
+		*high = data[1];
+	} while (read_seqretry(&sysctl_local_ports.lock, seq));
+}
+
+
 static int ping_init_sock(struct sock *sk)
 {
 	struct net *net = sock_net(sk);
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 28e8273..57d0752 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -73,18 +73,6 @@ static int ipv4_local_port_range(ctl_table *table, int write,
 }
 
 
-void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
-{
-	gid_t *data = net->ipv4.sysctl_ping_group_range;
-	unsigned seq;
-	do {
-		seq = read_seqbegin(&sysctl_local_ports.lock);
-
-		*low = data[0];
-		*high = data[1];
-	} while (read_seqretry(&sysctl_local_ports.lock, seq));
-}
-
 void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high)
 {
 	gid_t *data = table->data;
-- 
1.7.0.4

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

* Re: [PATCH] net: ping: fix build failure
  2011-05-17 10:16     ` [PATCH] net: ping: fix build failure Vasiliy Kulikov
@ 2011-05-17 10:27       ` Eric Dumazet
  2011-05-17 14:58       ` Randy Dunlap
  2011-05-17 15:41       ` Randy Dunlap
  2 siblings, 0 replies; 8+ messages in thread
From: Eric Dumazet @ 2011-05-17 10:27 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: David Miller, randy.dunlap, sfr, netdev, linux-next, linux-kernel

Le mardi 17 mai 2011 à 14:16 +0400, Vasiliy Kulikov a écrit :
> On Mon, May 16, 2011 at 15:38 -0400, David Miller wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > Date: Mon, 16 May 2011 12:35:34 -0700
> > 
> > > On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
> > > when CONFIG_PROC_SYSCTL is not enabled:
> > > 
> > > ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
> > 
> > Vasiliy, please fix this.
> 
> I wonder whether there is any way to test such unusual configurations?
> Only randconfig or are there any (partly-)automated tools for it?
> 
> 
> [PATCH] net: ping: fix build failure
> 
> If CONFIG_PROC_SYSCTL=n the building process fails:
> 
>     ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
> 
> Moved inet_get_ping_group_range_net() to ping.c.
> 
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

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

* Re: [PATCH] net: ping: fix build failure
  2011-05-17 10:16     ` [PATCH] net: ping: fix build failure Vasiliy Kulikov
  2011-05-17 10:27       ` Eric Dumazet
@ 2011-05-17 14:58       ` Randy Dunlap
  2011-05-17 15:41       ` Randy Dunlap
  2 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2011-05-17 14:58 UTC (permalink / raw)
  To: Vasiliy Kulikov; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On 05/17/11 03:16, Vasiliy Kulikov wrote:
> On Mon, May 16, 2011 at 15:38 -0400, David Miller wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>> Date: Mon, 16 May 2011 12:35:34 -0700
>>
>>> On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
>>> when CONFIG_PROC_SYSCTL is not enabled:
>>>
>>> ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
>>
>> Vasiliy, please fix this.
> 
> I wonder whether there is any way to test such unusual configurations?
> Only randconfig or are there any (partly-)automated tools for it?

Hi,

I do automated (cron) randconfigs nightly and occasionally I run a script
that builds a kernel with each one of these options disabled (although
lately CONFIG_PM is not being disabled, but I'll fix that one day):

BLOCK HOTPLUG INET INPUT MAGIC_SYSRQ NET PCI PM PROC_FS SMP SYSFS

Hm, I should add SYSCTL (and/or PROC_SYSCTL) to that list.  It often has issues.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] net: ping: fix build failure
  2011-05-17 10:16     ` [PATCH] net: ping: fix build failure Vasiliy Kulikov
  2011-05-17 10:27       ` Eric Dumazet
  2011-05-17 14:58       ` Randy Dunlap
@ 2011-05-17 15:41       ` Randy Dunlap
  2011-05-17 18:00         ` David Miller
  2 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2011-05-17 15:41 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: David Miller, randy.dunlap, sfr, netdev, linux-next, linux-kernel

On Tue, 17 May 2011 14:16:56 +0400 Vasiliy Kulikov wrote:

> On Mon, May 16, 2011 at 15:38 -0400, David Miller wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > Date: Mon, 16 May 2011 12:35:34 -0700
> > 
> > > On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
> > > when CONFIG_PROC_SYSCTL is not enabled:
> > > 
> > > ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
> > 
> > Vasiliy, please fix this.
> 
> I wonder whether there is any way to test such unusual configurations?
> Only randconfig or are there any (partly-)automated tools for it?
> 
> 
> [PATCH] net: ping: fix build failure
> 
> If CONFIG_PROC_SYSCTL=n the building process fails:
> 
>     ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
> 
> Moved inet_get_ping_group_range_net() to ping.c.
> 
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Thanks.

> ---
>  include/net/ping.h         |    2 --
>  net/ipv4/ping.c            |   13 +++++++++++++
>  net/ipv4/sysctl_net_ipv4.c |   12 ------------
>  3 files changed, 13 insertions(+), 14 deletions(-)
> 
> diff --git a/include/net/ping.h b/include/net/ping.h
> index 23062c3..682b5ae 100644
> --- a/include/net/ping.h
> +++ b/include/net/ping.h
> @@ -44,8 +44,6 @@ extern struct proto ping_prot;
>  extern void ping_rcv(struct sk_buff *);
>  extern void ping_err(struct sk_buff *, u32 info);
>  
> -extern void inet_get_ping_group_range_net(struct net *net, unsigned int *low, unsigned int *high);
> -
>  #ifdef CONFIG_PROC_FS
>  extern int __init ping_proc_init(void);
>  extern void ping_proc_exit(void);
> diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
> index 7041d09..3635975 100644
> --- a/net/ipv4/ping.c
> +++ b/net/ipv4/ping.c
> @@ -188,6 +188,19 @@ exit:
>  	return sk;
>  }
>  
> +static void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
> +{
> +	gid_t *data = net->ipv4.sysctl_ping_group_range;
> +	unsigned seq;
> +	do {
> +		seq = read_seqbegin(&sysctl_local_ports.lock);
> +
> +		*low = data[0];
> +		*high = data[1];
> +	} while (read_seqretry(&sysctl_local_ports.lock, seq));
> +}
> +
> +
>  static int ping_init_sock(struct sock *sk)
>  {
>  	struct net *net = sock_net(sk);
> diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
> index 28e8273..57d0752 100644
> --- a/net/ipv4/sysctl_net_ipv4.c
> +++ b/net/ipv4/sysctl_net_ipv4.c
> @@ -73,18 +73,6 @@ static int ipv4_local_port_range(ctl_table *table, int write,
>  }
>  
>  
> -void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
> -{
> -	gid_t *data = net->ipv4.sysctl_ping_group_range;
> -	unsigned seq;
> -	do {
> -		seq = read_seqbegin(&sysctl_local_ports.lock);
> -
> -		*low = data[0];
> -		*high = data[1];
> -	} while (read_seqretry(&sysctl_local_ports.lock, seq));
> -}
> -
>  void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high)
>  {
>  	gid_t *data = table->data;
> -- 
> 1.7.0.4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-next" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] net: ping: fix build failure
  2011-05-17 15:41       ` Randy Dunlap
@ 2011-05-17 18:00         ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2011-05-17 18:00 UTC (permalink / raw)
  To: randy.dunlap; +Cc: segoon, sfr, netdev, linux-next, linux-kernel

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Tue, 17 May 2011 08:41:25 -0700

> On Tue, 17 May 2011 14:16:56 +0400 Vasiliy Kulikov wrote:
> 
>> On Mon, May 16, 2011 at 15:38 -0400, David Miller wrote:
>> > From: Randy Dunlap <randy.dunlap@oracle.com>
>> > Date: Mon, 16 May 2011 12:35:34 -0700
>> > 
>> > > On Mon, 16 May 2011 15:10:19 +1000 Stephen Rothwell wrote:
>> > > when CONFIG_PROC_SYSCTL is not enabled:
>> > > 
>> > > ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
>> > 
>> > Vasiliy, please fix this.
>> 
>> I wonder whether there is any way to test such unusual configurations?
>> Only randconfig or are there any (partly-)automated tools for it?
>> 
>> 
>> [PATCH] net: ping: fix build failure
>> 
>> If CONFIG_PROC_SYSCTL=n the building process fails:
>> 
>>     ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
>> 
>> Moved inet_get_ping_group_range_net() to ping.c.
>> 
>> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
> 
> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Applied, thanks everyone.

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

end of thread, other threads:[~2011-05-17 18:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20110516151019.be338f1c.sfr@canb.auug.org.au>
2011-05-16 19:35 ` linux-next: Tree for May 16 (net/ipv4/ping) Randy Dunlap
2011-05-16 19:38   ` David Miller
2011-05-17  9:54     ` Eric Dumazet
2011-05-17 10:16     ` [PATCH] net: ping: fix build failure Vasiliy Kulikov
2011-05-17 10:27       ` Eric Dumazet
2011-05-17 14:58       ` Randy Dunlap
2011-05-17 15:41       ` Randy Dunlap
2011-05-17 18:00         ` 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).