Re: Kernel BUG at fs/sysfs/file.c:552

From: Greg KH
Date: Sat Apr 12 2008 - 01:15:51 EST


On Wed, Apr 09, 2008 at 04:07:51PM +0200, Marcus Nutzinger wrote:
> Hi!
>
> I wrote a little kernel module (a "virtual char-device") and wanted to
> create a sysfs entry for my device under /sys/devices. When using
> "device_register" and "device_create_file", I get the following kernel
> BUG message (and the module stops loading): (Kernel is 2.6.24.4)
>
>
> ------------[ cut here ]------------
> kernel BUG at fs/sysfs/file.c:552!
> invalid opcode: 0000 [#1] SMP
> Modules linked in: vdd nvidia(P) fuse kqemu snd_hda_intel snd_pcm_oss
> snd_mixer_oss snd_pcm i2c_i801 snd_timer snd_page_alloc snd_hwdep
> i2c_core usb_storage rtc snd intel_agp agpgart evdev
>
> Pid: 22769, comm: modprobe Tainted: P (2.6.24.4 #1)

With the nvidia driver, you're not going to get much help on this list
:(

> EIP: 0060:[<c0195c9d>] EFLAGS: 00010246 CPU: 0
> EIP is at sysfs_create_file+0xf/0x1d

Hm, did you create two files with the same name?

Care to post your code?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/