netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tun: Failed to create tun sysfs files [was: mmotm 2011-03-02-16-52 uploaded]
       [not found] <201103030127.p231ReNl012841@imap1.linux-foundation.org>
@ 2011-03-04  8:56 ` Jiri Slaby
  2011-03-04  9:06   ` tun: Failed to create tun sysfs files David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2011-03-04  8:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, mm-commits, Jiri Slaby, ML netdev, maxk, vtun

On 03/03/2011 01:52 AM, akpm@linux-foundation.org wrote:
> The mm-of-the-moment snapshot 2011-03-02-16-52 has been uploaded to

Hi, I'm seeing this with tun (also with earlier versions):
WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0xb8/0xe0()
Hardware name: To Be Filled By O.E.M.
sysfs: cannot create duplicate filename '/devices/virtual/net/tun0/group'
Modules linked in: microcode dvb_usb_af9015 tda18271 af9013 dvb_usb dvb_core
Pid: 3840, comm: openvpn Not tainted 2.6.38-rc4-mm1_64+ #1390
Call Trace:
 [<ffffffff8106d61a>] ? warn_slowpath_common+0x7a/0xb0
 [<ffffffff8106d6f1>] ? warn_slowpath_fmt+0x41/0x50
 [<ffffffff81176638>] ? sysfs_add_one+0xb8/0xe0
 [<ffffffff8117570d>] ? sysfs_add_file_mode+0x5d/0xa0
 [<ffffffff8117575c>] ? sysfs_add_file+0xc/0x10
 [<ffffffff81175841>] ? sysfs_create_file+0x21/0x40
 [<ffffffff813609d4>] ? device_create_file+0x14/0x20
 [<ffffffff813e0256>] ? tun_set_iff+0x3f6/0x4a0
 [<ffffffff813e05fe>] ? __tun_chr_ioctl+0x12e/0x5d0
 [<ffffffff8126c5c2>] ? __strncpy_from_user+0x22/0x60
 [<ffffffff813e0ade>] ? tun_chr_ioctl+0xe/0x10
 [<ffffffff811274ed>] ? do_vfs_ioctl+0x8d/0x300
 [<ffffffff811277aa>] ? sys_ioctl+0x4a/0x80
 [<ffffffff81030dbb>] ? system_call_fastpath+0x16/0x1b

It's because these devices already contain 'group' in the sysfs dir.

regards,
-- 
js
suse labs

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

* Re: tun: Failed to create tun sysfs files
  2011-03-04  8:56 ` tun: Failed to create tun sysfs files [was: mmotm 2011-03-02-16-52 uploaded] Jiri Slaby
@ 2011-03-04  9:06   ` David Miller
  2011-03-04  9:37     ` Jiri Slaby
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2011-03-04  9:06 UTC (permalink / raw)
  To: jslaby; +Cc: linux-kernel, akpm, mm-commits, jirislaby, netdev, maxk, vtun

From: Jiri Slaby <jslaby@suse.cz>
Date: Fri, 04 Mar 2011 09:56:09 +0100

> On 03/03/2011 01:52 AM, akpm@linux-foundation.org wrote:
>> The mm-of-the-moment snapshot 2011-03-02-16-52 has been uploaded to
> 
> Hi, I'm seeing this with tun (also with earlier versions):

The name of the attribute was changed to netdev_group in order to
fix this problem, in fact quite some time ago.

See the last entry of the net_class_attributes array in
net/core/net-sysfs.c, if it isn't called "netdev_group"
something is awry.

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

* Re: tun: Failed to create tun sysfs files
  2011-03-04  9:06   ` tun: Failed to create tun sysfs files David Miller
@ 2011-03-04  9:37     ` Jiri Slaby
  2011-03-05  8:04       ` tun routing is broken [was: tun: Failed to create tun sysfs files] Jiri Slaby
  0 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2011-03-04  9:37 UTC (permalink / raw)
  To: David Miller; +Cc: jslaby, linux-kernel, akpm, mm-commits, netdev, maxk, vtun

On 03/04/2011 10:06 AM, David Miller wrote:
> From: Jiri Slaby <jslaby@suse.cz>
> Date: Fri, 04 Mar 2011 09:56:09 +0100
> 
>> On 03/03/2011 01:52 AM, akpm@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2011-03-02-16-52 has been uploaded to
>>
>> Hi, I'm seeing this with tun (also with earlier versions):
> 
> The name of the attribute was changed to netdev_group in order to
> fix this problem, in fact quite some time ago.
> 
> See the last entry of the net_class_attributes array in
> net/core/net-sysfs.c, if it isn't called "netdev_group"
> something is awry.

<idiocy>
Aha, sorry for the noise, I booted the old kernel.
</idiocy>

thanks,
-- 
js

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

* tun routing is broken [was: tun: Failed to create tun sysfs files]
  2011-03-04  9:37     ` Jiri Slaby
@ 2011-03-05  8:04       ` Jiri Slaby
  2011-03-05  8:10         ` tun routing is broken David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Jiri Slaby @ 2011-03-05  8:04 UTC (permalink / raw)
  To: David Miller; +Cc: Jiri Slaby, linux-kernel, akpm, mm-commits, netdev, maxk

On 03/04/2011 10:37 AM, Jiri Slaby wrote:
> On 03/04/2011 10:06 AM, David Miller wrote:
>> From: Jiri Slaby <jslaby@suse.cz>
>> Date: Fri, 04 Mar 2011 09:56:09 +0100
>>
>>> On 03/03/2011 01:52 AM, akpm@linux-foundation.org wrote:
>>>> The mm-of-the-moment snapshot 2011-03-02-16-52 has been uploaded to
>>>
>>> Hi, I'm seeing this with tun (also with earlier versions):
>>
>> The name of the attribute was changed to netdev_group in order to
>> fix this problem, in fact quite some time ago.
>>
>> See the last entry of the net_class_attributes array in
>> net/core/net-sysfs.c, if it isn't called "netdev_group"
>> something is awry.
> 
> <idiocy>
> Aha, sorry for the noise, I booted the old kernel.
> </idiocy>

Ok, so I booted the new kernel, and tun is broken there completely. If I
try to ping a vpn peer:
...
capget(0x20080522, 0, NULL)             = 0
capset(0x20080522, 0, {0, 0, 0})        = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(1025),
sin_addr=inet_addr("10.20.11.1")}, 16) = -1 EINVAL (Invalid argument)

the route is:
10.20.11.1 dev tun0  proto kernel  scope link  src 10.20.11.33

When I try to ping a router on eth0 10.0.28.10, it works as expected.

Maybe the changes in ipv4 routing cause this? But my amateur eyes can't
see any breakage there...

Now I'm back in mmotm 2011-02-10-16-26 and it works, indeed.

regards,
-- 
js
suse labs

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

* Re: tun routing is broken
  2011-03-05  8:04       ` tun routing is broken [was: tun: Failed to create tun sysfs files] Jiri Slaby
@ 2011-03-05  8:10         ` David Miller
  2011-03-05  8:17           ` Jiri Slaby
  2011-03-05 11:48           ` Valdis.Kletnieks
  0 siblings, 2 replies; 9+ messages in thread
From: David Miller @ 2011-03-05  8:10 UTC (permalink / raw)
  To: jslaby; +Cc: jirislaby, linux-kernel, akpm, mm-commits, netdev, maxk

From: Jiri Slaby <jslaby@suse.cz>
Date: Sat, 05 Mar 2011 09:04:22 +0100

> Ok, so I booted the new kernel, and tun is broken there completely. If I
> try to ping a vpn peer:

-mm tree is missing this fix which went in yesterday.  Please if
you are going to be testing networking a lot, test against net-next-2.6
instead of Andrew's tree which invariable lags behind:

--------------------
ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/devinet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 9038928..ff53860 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -111,7 +111,7 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
 
 static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa)
 {
-	unsigned int hash = inet_addr_hash(net, ifa->ifa_address);
+	unsigned int hash = inet_addr_hash(net, ifa->ifa_local);
 
 	spin_lock(&inet_addr_hash_lock);
 	hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]);
@@ -146,7 +146,7 @@ struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
 
 		if (!net_eq(dev_net(dev), net))
 			continue;
-		if (ifa->ifa_address == addr) {
+		if (ifa->ifa_local == addr) {
 			result = dev;
 			break;
 		}
-- 
1.7.4.1




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

* Re: tun routing is broken
  2011-03-05  8:10         ` tun routing is broken David Miller
@ 2011-03-05  8:17           ` Jiri Slaby
  2011-03-05  8:26             ` Jiri Slaby
  2011-03-07 12:54             ` Jiri Kosina
  2011-03-05 11:48           ` Valdis.Kletnieks
  1 sibling, 2 replies; 9+ messages in thread
From: Jiri Slaby @ 2011-03-05  8:17 UTC (permalink / raw)
  To: David Miller; +Cc: Jiri Slaby, linux-kernel, akpm, mm-commits, netdev, maxk

On 03/05/2011 09:10 AM, David Miller wrote:
> From: Jiri Slaby <jslaby@suse.cz>
> Date: Sat, 05 Mar 2011 09:04:22 +0100
> 
>> Ok, so I booted the new kernel, and tun is broken there completely. If I
>> try to ping a vpn peer:
> 
> -mm tree is missing this fix which went in yesterday.  Please if
> you are going to be testing networking a lot, test against net-next-2.6
> instead of Andrew's tree which invariable lags behind:

I'm not testing networking, I'm just using my desktop :). (And
next/master is mostly unusable for these needs. In comparison to mmotm
which is some kind of a "release".)

> --------------------
> ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.

It would be great to have a References: tag or better changelog. Then I
would give the commit a shot. The way it is I ignored it when looking at
next/master inside net/ipv4/ changes for commits to test.

Going to boot with this change.

> Reported-by: Stephen Hemminger <shemminger@vyatta.com>
> Reported-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  net/ipv4/devinet.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 9038928..ff53860 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -111,7 +111,7 @@ static inline unsigned int inet_addr_hash(struct net *net, __be32 addr)
>  
>  static void inet_hash_insert(struct net *net, struct in_ifaddr *ifa)
>  {
> -	unsigned int hash = inet_addr_hash(net, ifa->ifa_address);
> +	unsigned int hash = inet_addr_hash(net, ifa->ifa_local);
>  
>  	spin_lock(&inet_addr_hash_lock);
>  	hlist_add_head_rcu(&ifa->hash, &inet_addr_lst[hash]);
> @@ -146,7 +146,7 @@ struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref)
>  
>  		if (!net_eq(dev_net(dev), net))
>  			continue;
> -		if (ifa->ifa_address == addr) {
> +		if (ifa->ifa_local == addr) {
>  			result = dev;
>  			break;
>  		}

thanks,
-- 
js
suse labs

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

* Re: tun routing is broken
  2011-03-05  8:17           ` Jiri Slaby
@ 2011-03-05  8:26             ` Jiri Slaby
  2011-03-07 12:54             ` Jiri Kosina
  1 sibling, 0 replies; 9+ messages in thread
From: Jiri Slaby @ 2011-03-05  8:26 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: David Miller, linux-kernel, akpm, mm-commits, netdev, maxk

On 03/05/2011 09:17 AM, Jiri Slaby wrote:
>> ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.
> 
> It would be great to have a References: tag or better changelog. Then I
> would give the commit a shot. The way it is I ignored it when looking at
> next/master inside net/ipv4/ changes for commits to test.
> 
> Going to boot with this change.

Yes, it works.

thanks,
-- 
js
suse labs

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

* Re: tun routing is broken
  2011-03-05  8:10         ` tun routing is broken David Miller
  2011-03-05  8:17           ` Jiri Slaby
@ 2011-03-05 11:48           ` Valdis.Kletnieks
  1 sibling, 0 replies; 9+ messages in thread
From: Valdis.Kletnieks @ 2011-03-05 11:48 UTC (permalink / raw)
  To: David Miller
  Cc: jslaby, jirislaby, linux-kernel, akpm, mm-commits, netdev, maxk

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

On Sat, 05 Mar 2011 00:10:22 PST, David Miller said:
> --------------------
> ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.
> 
> Reported-by: Stephen Hemminger <shemminger@vyatta.com>
> Reported-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  net/ipv4/devinet.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 9038928..ff53860 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c

Confirming this fixes the problem I reported with IPv4 over PPP as well, thanks.


[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

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

* Re: tun routing is broken
  2011-03-05  8:17           ` Jiri Slaby
  2011-03-05  8:26             ` Jiri Slaby
@ 2011-03-07 12:54             ` Jiri Kosina
  1 sibling, 0 replies; 9+ messages in thread
From: Jiri Kosina @ 2011-03-07 12:54 UTC (permalink / raw)
  To: Jiri Slaby, Andrew Morton
  Cc: David Miller, Jiri Slaby, linux-kernel, mm-commits, netdev, maxk

On Sat, 5 Mar 2011, Jiri Slaby wrote:

> > Date: Sat, 05 Mar 2011 09:04:22 +0100
> > 
> >> Ok, so I booted the new kernel, and tun is broken there completely. If I
> >> try to ping a vpn peer:
> > 
> > -mm tree is missing this fix which went in yesterday.  Please if
> > you are going to be testing networking a lot, test against net-next-2.6
> > instead of Andrew's tree which invariable lags behind:
> 
> I'm not testing networking, I'm just using my desktop :). (And
> next/master is mostly unusable for these needs. In comparison to mmotm
> which is some kind of a "release".)

I have been hit by similar issues several times already as well.

I guess that question of including -mm into linux-next should be raised 
again here ... Andrew, if I remember correctly, on last kernel summit you 
were stating that you'd stop eating untill you have -mm included in -next. 
Seems like you must be quite hungry these days already :)

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.


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

end of thread, other threads:[~2011-03-07 12:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201103030127.p231ReNl012841@imap1.linux-foundation.org>
2011-03-04  8:56 ` tun: Failed to create tun sysfs files [was: mmotm 2011-03-02-16-52 uploaded] Jiri Slaby
2011-03-04  9:06   ` tun: Failed to create tun sysfs files David Miller
2011-03-04  9:37     ` Jiri Slaby
2011-03-05  8:04       ` tun routing is broken [was: tun: Failed to create tun sysfs files] Jiri Slaby
2011-03-05  8:10         ` tun routing is broken David Miller
2011-03-05  8:17           ` Jiri Slaby
2011-03-05  8:26             ` Jiri Slaby
2011-03-07 12:54             ` Jiri Kosina
2011-03-05 11:48           ` Valdis.Kletnieks

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