]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tun: Don't add sysfs attributes to devices without sysfs directories
authorBen Hutchings <ben@decadent.org.uk>
Thu, 9 Sep 2010 04:21:16 +0000 (05:21 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:55 +0000 (18:07 -0500)
commit018402a0ef1042e1d1bbc22507dad258b5402e7c
treef61cbe9512e81900a87798714ef9c5ebfa964bc6
parent0ca77ac6d65b2d2b0495fd3a8ebdeecc657d81b8
tun: Don't add sysfs attributes to devices without sysfs directories

This applies to 2.6.32 *only*.  It has not been applied upstream since
the limitation no longer exists.

Prior to Linux 2.6.35, net devices outside the initial net namespace
did not have sysfs directories.  Attempting to add attributes to
them will trigger a BUG().

Reported-and-tested-by: Russell Stuart <russell-debian@stuart.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/tun.c