[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#594845: Acknowledgement (linux-image-2.6.32-5-amd64: kernel BUG at /build/buildd-linux-2.6_2.6.32-20-amd64-lNUT1p/..../fs/sysfs/file.c:539)

On Sun, 2010-09-05 at 01:45 +0100, Ben Hutchings wrote:
> Are you quite sure you used the modified kernel?


> 'cat /proc/version' will tell you for sure which version you are
> running.

$ cat /proc/version 
Linux version 2.6.32-5-amd64 (Debian 2.6.32-20.2) (russell-debian@stuart.id.au) (gcc version 4.3.5 (Debian 4.3.5-2) ) #1 SMP Mon Sep 6 09:14:09 EST 2010

So that looks like I am running the right kernel.  But because the
symptoms didn't change overly I had my doubts from the beginning, and
thus have been trying to prove I was running the kernel with your patch
applied.  Doing that in various ways is why it took me a while to
respond to your request to test the patch.

One way I tried to confirm it by adding trace:

--- x/linux-2.6-2.6.32/drivers/net/tun.c	2009-12-03 13:51:21.000000000 +1000
+++ linux-2.6-2.6.32/drivers/net/tun.c	2010-09-06 08:09:44.068458190 +1000
@@ -36,7 +36,7 @@
 #define DRV_NAME	"tun"
 #define DRV_VERSION	"1.6"
-#define DRV_DESCRIPTION	"Universal TUN/TAP device driver"
+#define DRV_DESCRIPTION	"Universal TUN/TAP device driver + 0001-tun-Don-t-add-sysfs-attributes-to-devices-without-sy.patch applied"
 #define DRV_COPYRIGHT	"(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>"
 #include <linux/module.h>
@@ -1006,7 +1006,9 @@
 		if (err < 0)
 			goto err_free_sk;
-		if (device_create_file(&tun->dev->dev, &dev_attr_tun_flags) ||
+		printk(KERN_INFO "0001-tun-Don-t-add-sysfs-attributes-to-devices-without-sy.patch\n");
+		if (!net_eq(dev_net(tun->dev), &init_net) ||
+		    device_create_file(&tun->dev->dev, &dev_attr_tun_flags) ||
 		    device_create_file(&tun->dev->dev, &dev_attr_owner) ||
 		    device_create_file(&tun->dev->dev, &dev_attr_group))
 			printk(KERN_ERR "Failed to create tun sysfs files\n");

None of the trace is ever appears in /var/log/kern.log, which is to say
"grep 0001-tun /var/log/kern.log" prints nothing. Yet I am evidently
running a different kernel as I don't ever hit the BUG the buildd kernel
generates.  I don't have a clue what is going on.

The steps I used to generate the kernel are:

  $ apt-get source linux-2.6
  $ cd linux-2.6-2.6.32
  $ fakeroot debian/rules source
  $ fakeroot debian/rules setup
  $ patch -p1 <.../0001-tun-Don-t-add-sysfs-attributes-to-devices-without-sy.patch
  $ ed drivers/net/tun.c          # add trace
  $ ed debian/changelog           # add rev 2.6.30-20.2
  $ fakeroot debian/rules binary
  $ sudo dpkg -i ../linux-image-2.6.32-5-amd64_2.6.32-20.2_amd64.deb
  $ sudo ed /boot/grub/grub.cfg   # set the default kernel
  $ sudo reboot -f

Reply to: