All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
@ 2011-03-09 15:39 Steven Rostedt
  2011-03-09 15:53   ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Steven Rostedt @ 2011-03-09 15:39 UTC (permalink / raw)
  To: LKML; +Cc: Greg Kroah-Hartman, Andrew Morton

Not sure who to send this to, but last night on v2.6.38-rc8 ktest
triggered this warning:


[   32.062538] YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
[   32.071305] PM: Adding info for No Bus:timer
[   32.075864] PM: Adding info for platform:snd_dummy.0^M
[   32.081232] PM: Adding info for No Bus:card0
[   32.085853] PM: Adding info for No Bus:pcmC0D0p
[   32.090650] PM: Adding info for No Bus:pcmC0D0c
[   32.095667] PM: Adding info for No Bus:dsp
[   32.099918] ------------[ cut here ]------------
[   32.104531] WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95()
[   32.115379] Hardware name:         
[   32.118859] sysfs: cannot create duplicate filename '/dev/char/14:4'
[   32.125197] Modules linked in:
[   32.128255] Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
[   32.134247] Call Trace:^M
[   32.136693]  [<c044d095>] ? warn_slowpath_common+0x7c/0x91
[   32.142168]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
[   32.147036]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
[   32.151904]  [<c044d135>] ? warn_slowpath_fmt+0x33/0x35
[   32.157120]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
[   32.161989]  [<c055393d>] ? sysfs_do_create_link+0xdf/0x181^M
[   32.167550]  [<c073637f>] ? vsnprintf+0x22c/0x266
[   32.172246]  [<c0553a0f>] ? sysfs_create_link+0x17/0x1c
[   32.177462]  [<c0950ce4>] ? device_add+0x183/0x573
[   32.182245]  [<c0958474>] ? device_pm_init+0x5d/0x61
[   32.187200]  [<c09510eb>] ? device_register+0x17/0x1a
[   32.192243]  [<c0951165>] ? device_create_vargs+0x77/0x98
[   32.197631]  [<c09511b3>] ? device_create+0x2d/0x2f
[   32.202501]  [<c0dc5caa>] ? sound_insert_unit+0x1ba/0x1d5
[   32.207891]  [<c0dc5e8e>] ? register_sound_special_device+0x103/0x11c
[   32.214319]  [<c0dd7875>] ? snd_register_oss_device+0x10a/0x169
[   32.220229]  [<c0de6cd6>] ? register_oss_dsp+0x62/0xb5
[   32.225358]  [<c046b95c>] ? sched_clock_cpu+0x16a/0x17a
[   32.230575]  [<c04778f2>] ? mark_held_locks+0x43/0x5b
[   32.235616]  [<c0fa124c>] ? __mutex_lock_common+0x39f/0x3c7
[   32.241177]  [<c04776d2>] ? mark_lock+0x1e/0x1fb
[   32.245787]  [<c04778f2>] ? mark_held_locks+0x43/0x5b
[   32.250838]  [<c0fa0cff>] ? __mutex_unlock_slowpath+0x137/0x153
[   32.256745]  [<c0de6d69>] ? snd_pcm_oss_register_minor+0x40/0xe3
[   32.262737]  [<c0fa0d28>] ? mutex_unlock+0xd/0xf
[   32.267345]  [<c0dd96b7>] ? snd_timer_dev_register+0x10d/0x117
[   32.273165]  [<c0dd6db9>] ? snd_device_register+0x67/0xd2
[   32.278551]  [<c07363d5>] ? sprintf+0x1c/0x1e^M
[   32.282900]  [<c0de2db7>] ? snd_pcm_timer_init+0xba/0xef
[   32.288201]  [<c0ddb426>] ? snd_pcm_dev_register+0x1e8/0x224
[   32.293848]  [<c0951000>] ? device_add+0x49f/0x573
[   32.298630]  [<c0dd6d32>] ? snd_device_register_all+0x5e/0x7e
[   32.304363]  [<c09511b3>] ? device_create+0x2d/0x2f
[   32.309230]  [<c0dd32d3>] ? snd_card_register+0x92/0x1af
[   32.314531]  [<c0f87b9b>] ? snd_dummy_probe+0x322/0x3b2
[   32.319745]  [<c0953f57>] ? platform_drv_probe+0x14/0x16
[   32.325046]  [<c0953154>] ? driver_probe_device+0x116/0x1ed
[   32.330606]  [<c073b414>] ? do_raw_spin_unlock+0x8f/0x94
[   32.335906]  [<c09532c5>] ? __device_attach+0x2f/0x33^M
[   32.340946]  [<c09524ab>] ? bus_for_each_drv+0x44/0x6e
[   32.346073]  [<c095334e>] ? device_attach+0x61/0x7e^M
[   32.350941]  [<c0953296>] ? __device_attach+0x0/0x33
[   32.355895]  [<c09522e8>] ? bus_probe_device+0x23/0x38
[   32.361023]  [<c0950f61>] ? device_add+0x400/0x573
[   32.365805]  [<c0730ac4>] ? kobject_set_name_vargs+0x46/0x4c
[   32.371453]  [<c0954624>] ? platform_device_add+0x139/0x182
[   32.377015]  [<c095487d>] ? platform_device_register_resndata+0x4f/0x65
[   32.383616]  [<c17e2210>] ? alsa_card_dummy_init+0xcc/0x121
[   32.389177]  [<c0403096>] ? do_one_initcall+0x8c/0x161
[   32.394305]  [<c17e2144>] ? alsa_card_dummy_init+0x0/0x121
[   32.399780]  [<c17843cf>] ? kernel_init+0x12c/0x1c2
[   32.404646]  [<c17842a3>] ? kernel_init+0x0/0x1c2
[   32.409340]  [<c040a8c2>] ? kernel_thread_helper+0x6/0x10
[   32.414782] ---[ end trace 5d9e7ab86ca08fa1 ]---
[   32.419772] PM: Adding info for No Bus:controlC0
[   32.424867] PM: Adding info for isa:es18xx.0
[   32.429167] PM: Removing info for isa:es18xx.0


This was for a 386 build. I could give a .config and full dmesg if
needed.

Thanks,

-- Steve




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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 15:39 [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95 Steven Rostedt
@ 2011-03-09 15:53   ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2011-03-09 15:53 UTC (permalink / raw)
  To: Steven Rostedt, Takashi Iwai, Jaroslav Kysela
  Cc: Andrew Morton, LKML, alsa-devel

On Wed, Mar 09, 2011 at 10:39:49AM -0500, Steven Rostedt wrote:
> Not sure who to send this to, but last night on v2.6.38-rc8 ktest
> triggered this warning:
> 
> 
> [   32.062538] YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
> [   32.071305] PM: Adding info for No Bus:timer
> [   32.075864] PM: Adding info for platform:snd_dummy.0^M
> [   32.081232] PM: Adding info for No Bus:card0
> [   32.085853] PM: Adding info for No Bus:pcmC0D0p
> [   32.090650] PM: Adding info for No Bus:pcmC0D0c
> [   32.095667] PM: Adding info for No Bus:dsp
> [   32.099918] ------------[ cut here ]------------
> [   32.104531] WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95()
> [   32.115379] Hardware name:         
> [   32.118859] sysfs: cannot create duplicate filename '/dev/char/14:4'

Two modules wanted to create the same minor number, that's not good.

14:4 is the OSS /dev/audio node.

> [   32.125197] Modules linked in:
> [   32.128255] Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
> [   32.134247] Call Trace:^M
> [   32.136693]  [<c044d095>] ? warn_slowpath_common+0x7c/0x91
> [   32.142168]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> [   32.147036]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> [   32.151904]  [<c044d135>] ? warn_slowpath_fmt+0x33/0x35
> [   32.157120]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> [   32.161989]  [<c055393d>] ? sysfs_do_create_link+0xdf/0x181^M
> [   32.167550]  [<c073637f>] ? vsnprintf+0x22c/0x266
> [   32.172246]  [<c0553a0f>] ? sysfs_create_link+0x17/0x1c
> [   32.177462]  [<c0950ce4>] ? device_add+0x183/0x573
> [   32.182245]  [<c0958474>] ? device_pm_init+0x5d/0x61
> [   32.187200]  [<c09510eb>] ? device_register+0x17/0x1a
> [   32.192243]  [<c0951165>] ? device_create_vargs+0x77/0x98
> [   32.197631]  [<c09511b3>] ? device_create+0x2d/0x2f
> [   32.202501]  [<c0dc5caa>] ? sound_insert_unit+0x1ba/0x1d5
> [   32.207891]  [<c0dc5e8e>] ? register_sound_special_device+0x103/0x11c
> [   32.214319]  [<c0dd7875>] ? snd_register_oss_device+0x10a/0x169
> [   32.220229]  [<c0de6cd6>] ? register_oss_dsp+0x62/0xb5

Yup, sound subsystem...


> [   32.225358]  [<c046b95c>] ? sched_clock_cpu+0x16a/0x17a
> [   32.230575]  [<c04778f2>] ? mark_held_locks+0x43/0x5b
> [   32.235616]  [<c0fa124c>] ? __mutex_lock_common+0x39f/0x3c7
> [   32.241177]  [<c04776d2>] ? mark_lock+0x1e/0x1fb
> [   32.245787]  [<c04778f2>] ? mark_held_locks+0x43/0x5b
> [   32.250838]  [<c0fa0cff>] ? __mutex_unlock_slowpath+0x137/0x153
> [   32.256745]  [<c0de6d69>] ? snd_pcm_oss_register_minor+0x40/0xe3
> [   32.262737]  [<c0fa0d28>] ? mutex_unlock+0xd/0xf
> [   32.267345]  [<c0dd96b7>] ? snd_timer_dev_register+0x10d/0x117
> [   32.273165]  [<c0dd6db9>] ? snd_device_register+0x67/0xd2
> [   32.278551]  [<c07363d5>] ? sprintf+0x1c/0x1e^M
> [   32.282900]  [<c0de2db7>] ? snd_pcm_timer_init+0xba/0xef
> [   32.288201]  [<c0ddb426>] ? snd_pcm_dev_register+0x1e8/0x224
> [   32.293848]  [<c0951000>] ? device_add+0x49f/0x573
> [   32.298630]  [<c0dd6d32>] ? snd_device_register_all+0x5e/0x7e
> [   32.304363]  [<c09511b3>] ? device_create+0x2d/0x2f
> [   32.309230]  [<c0dd32d3>] ? snd_card_register+0x92/0x1af
> [   32.314531]  [<c0f87b9b>] ? snd_dummy_probe+0x322/0x3b2
> [   32.319745]  [<c0953f57>] ? platform_drv_probe+0x14/0x16
> [   32.325046]  [<c0953154>] ? driver_probe_device+0x116/0x1ed
> [   32.330606]  [<c073b414>] ? do_raw_spin_unlock+0x8f/0x94
> [   32.335906]  [<c09532c5>] ? __device_attach+0x2f/0x33^M
> [   32.340946]  [<c09524ab>] ? bus_for_each_drv+0x44/0x6e
> [   32.346073]  [<c095334e>] ? device_attach+0x61/0x7e^M
> [   32.350941]  [<c0953296>] ? __device_attach+0x0/0x33
> [   32.355895]  [<c09522e8>] ? bus_probe_device+0x23/0x38
> [   32.361023]  [<c0950f61>] ? device_add+0x400/0x573
> [   32.365805]  [<c0730ac4>] ? kobject_set_name_vargs+0x46/0x4c
> [   32.371453]  [<c0954624>] ? platform_device_add+0x139/0x182
> [   32.377015]  [<c095487d>] ? platform_device_register_resndata+0x4f/0x65
> [   32.383616]  [<c17e2210>] ? alsa_card_dummy_init+0xcc/0x121
> [   32.389177]  [<c0403096>] ? do_one_initcall+0x8c/0x161
> [   32.394305]  [<c17e2144>] ? alsa_card_dummy_init+0x0/0x121
> [   32.399780]  [<c17843cf>] ? kernel_init+0x12c/0x1c2
> [   32.404646]  [<c17842a3>] ? kernel_init+0x0/0x1c2
> [   32.409340]  [<c040a8c2>] ? kernel_thread_helper+0x6/0x10
> [   32.414782] ---[ end trace 5d9e7ab86ca08fa1 ]---
> [   32.419772] PM: Adding info for No Bus:controlC0
> [   32.424867] PM: Adding info for isa:es18xx.0
> [   32.429167] PM: Removing info for isa:es18xx.0
> 
> 
> This was for a 386 build. I could give a .config and full dmesg if
> needed.

I think the sound developers (now on CC: would probably like to see
that.)

thanks,

greg k-h

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
@ 2011-03-09 15:53   ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2011-03-09 15:53 UTC (permalink / raw)
  To: Steven Rostedt, Takashi Iwai, Jaroslav Kysela
  Cc: LKML, Andrew Morton, alsa-devel

On Wed, Mar 09, 2011 at 10:39:49AM -0500, Steven Rostedt wrote:
> Not sure who to send this to, but last night on v2.6.38-rc8 ktest
> triggered this warning:
> 
> 
> [   32.062538] YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
> [   32.071305] PM: Adding info for No Bus:timer
> [   32.075864] PM: Adding info for platform:snd_dummy.0^M
> [   32.081232] PM: Adding info for No Bus:card0
> [   32.085853] PM: Adding info for No Bus:pcmC0D0p
> [   32.090650] PM: Adding info for No Bus:pcmC0D0c
> [   32.095667] PM: Adding info for No Bus:dsp
> [   32.099918] ------------[ cut here ]------------
> [   32.104531] WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95()
> [   32.115379] Hardware name:         
> [   32.118859] sysfs: cannot create duplicate filename '/dev/char/14:4'

Two modules wanted to create the same minor number, that's not good.

14:4 is the OSS /dev/audio node.

> [   32.125197] Modules linked in:
> [   32.128255] Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
> [   32.134247] Call Trace:^M
> [   32.136693]  [<c044d095>] ? warn_slowpath_common+0x7c/0x91
> [   32.142168]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> [   32.147036]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> [   32.151904]  [<c044d135>] ? warn_slowpath_fmt+0x33/0x35
> [   32.157120]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> [   32.161989]  [<c055393d>] ? sysfs_do_create_link+0xdf/0x181^M
> [   32.167550]  [<c073637f>] ? vsnprintf+0x22c/0x266
> [   32.172246]  [<c0553a0f>] ? sysfs_create_link+0x17/0x1c
> [   32.177462]  [<c0950ce4>] ? device_add+0x183/0x573
> [   32.182245]  [<c0958474>] ? device_pm_init+0x5d/0x61
> [   32.187200]  [<c09510eb>] ? device_register+0x17/0x1a
> [   32.192243]  [<c0951165>] ? device_create_vargs+0x77/0x98
> [   32.197631]  [<c09511b3>] ? device_create+0x2d/0x2f
> [   32.202501]  [<c0dc5caa>] ? sound_insert_unit+0x1ba/0x1d5
> [   32.207891]  [<c0dc5e8e>] ? register_sound_special_device+0x103/0x11c
> [   32.214319]  [<c0dd7875>] ? snd_register_oss_device+0x10a/0x169
> [   32.220229]  [<c0de6cd6>] ? register_oss_dsp+0x62/0xb5

Yup, sound subsystem...


> [   32.225358]  [<c046b95c>] ? sched_clock_cpu+0x16a/0x17a
> [   32.230575]  [<c04778f2>] ? mark_held_locks+0x43/0x5b
> [   32.235616]  [<c0fa124c>] ? __mutex_lock_common+0x39f/0x3c7
> [   32.241177]  [<c04776d2>] ? mark_lock+0x1e/0x1fb
> [   32.245787]  [<c04778f2>] ? mark_held_locks+0x43/0x5b
> [   32.250838]  [<c0fa0cff>] ? __mutex_unlock_slowpath+0x137/0x153
> [   32.256745]  [<c0de6d69>] ? snd_pcm_oss_register_minor+0x40/0xe3
> [   32.262737]  [<c0fa0d28>] ? mutex_unlock+0xd/0xf
> [   32.267345]  [<c0dd96b7>] ? snd_timer_dev_register+0x10d/0x117
> [   32.273165]  [<c0dd6db9>] ? snd_device_register+0x67/0xd2
> [   32.278551]  [<c07363d5>] ? sprintf+0x1c/0x1e^M
> [   32.282900]  [<c0de2db7>] ? snd_pcm_timer_init+0xba/0xef
> [   32.288201]  [<c0ddb426>] ? snd_pcm_dev_register+0x1e8/0x224
> [   32.293848]  [<c0951000>] ? device_add+0x49f/0x573
> [   32.298630]  [<c0dd6d32>] ? snd_device_register_all+0x5e/0x7e
> [   32.304363]  [<c09511b3>] ? device_create+0x2d/0x2f
> [   32.309230]  [<c0dd32d3>] ? snd_card_register+0x92/0x1af
> [   32.314531]  [<c0f87b9b>] ? snd_dummy_probe+0x322/0x3b2
> [   32.319745]  [<c0953f57>] ? platform_drv_probe+0x14/0x16
> [   32.325046]  [<c0953154>] ? driver_probe_device+0x116/0x1ed
> [   32.330606]  [<c073b414>] ? do_raw_spin_unlock+0x8f/0x94
> [   32.335906]  [<c09532c5>] ? __device_attach+0x2f/0x33^M
> [   32.340946]  [<c09524ab>] ? bus_for_each_drv+0x44/0x6e
> [   32.346073]  [<c095334e>] ? device_attach+0x61/0x7e^M
> [   32.350941]  [<c0953296>] ? __device_attach+0x0/0x33
> [   32.355895]  [<c09522e8>] ? bus_probe_device+0x23/0x38
> [   32.361023]  [<c0950f61>] ? device_add+0x400/0x573
> [   32.365805]  [<c0730ac4>] ? kobject_set_name_vargs+0x46/0x4c
> [   32.371453]  [<c0954624>] ? platform_device_add+0x139/0x182
> [   32.377015]  [<c095487d>] ? platform_device_register_resndata+0x4f/0x65
> [   32.383616]  [<c17e2210>] ? alsa_card_dummy_init+0xcc/0x121
> [   32.389177]  [<c0403096>] ? do_one_initcall+0x8c/0x161
> [   32.394305]  [<c17e2144>] ? alsa_card_dummy_init+0x0/0x121
> [   32.399780]  [<c17843cf>] ? kernel_init+0x12c/0x1c2
> [   32.404646]  [<c17842a3>] ? kernel_init+0x0/0x1c2
> [   32.409340]  [<c040a8c2>] ? kernel_thread_helper+0x6/0x10
> [   32.414782] ---[ end trace 5d9e7ab86ca08fa1 ]---
> [   32.419772] PM: Adding info for No Bus:controlC0
> [   32.424867] PM: Adding info for isa:es18xx.0
> [   32.429167] PM: Removing info for isa:es18xx.0
> 
> 
> This was for a 386 build. I could give a .config and full dmesg if
> needed.

I think the sound developers (now on CC: would probably like to see
that.)

thanks,

greg k-h

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 15:53   ` Greg KH
@ 2011-03-09 16:09     ` Takashi Iwai
  -1 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2011-03-09 16:09 UTC (permalink / raw)
  To: Greg KH; +Cc: Andrew Morton, alsa-devel, LKML, Steven Rostedt

At Wed, 9 Mar 2011 07:53:09 -0800,
Greg KH wrote:
> 
> On Wed, Mar 09, 2011 at 10:39:49AM -0500, Steven Rostedt wrote:
> > Not sure who to send this to, but last night on v2.6.38-rc8 ktest
> > triggered this warning:
> > 
> > 
> > [   32.062538] YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
> > [   32.071305] PM: Adding info for No Bus:timer
> > [   32.075864] PM: Adding info for platform:snd_dummy.0^M
> > [   32.081232] PM: Adding info for No Bus:card0
> > [   32.085853] PM: Adding info for No Bus:pcmC0D0p
> > [   32.090650] PM: Adding info for No Bus:pcmC0D0c
> > [   32.095667] PM: Adding info for No Bus:dsp
> > [   32.099918] ------------[ cut here ]------------
> > [   32.104531] WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95()
> > [   32.115379] Hardware name:         
> > [   32.118859] sysfs: cannot create duplicate filename '/dev/char/14:4'
> 
> Two modules wanted to create the same minor number, that's not good.
> 
> 14:4 is the OSS /dev/audio node.

Are they modules or built-in?

> > [   32.125197] Modules linked in:
> > [   32.128255] Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
> > [   32.134247] Call Trace:^M
> > [   32.136693]  [<c044d095>] ? warn_slowpath_common+0x7c/0x91
> > [   32.142168]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> > [   32.147036]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> > [   32.151904]  [<c044d135>] ? warn_slowpath_fmt+0x33/0x35
> > [   32.157120]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> > [   32.161989]  [<c055393d>] ? sysfs_do_create_link+0xdf/0x181^M
> > [   32.167550]  [<c073637f>] ? vsnprintf+0x22c/0x266
> > [   32.172246]  [<c0553a0f>] ? sysfs_create_link+0x17/0x1c
> > [   32.177462]  [<c0950ce4>] ? device_add+0x183/0x573
> > [   32.182245]  [<c0958474>] ? device_pm_init+0x5d/0x61
> > [   32.187200]  [<c09510eb>] ? device_register+0x17/0x1a
> > [   32.192243]  [<c0951165>] ? device_create_vargs+0x77/0x98
> > [   32.197631]  [<c09511b3>] ? device_create+0x2d/0x2f
> > [   32.202501]  [<c0dc5caa>] ? sound_insert_unit+0x1ba/0x1d5
> > [   32.207891]  [<c0dc5e8e>] ? register_sound_special_device+0x103/0x11c
> > [   32.214319]  [<c0dd7875>] ? snd_register_oss_device+0x10a/0x169
> > [   32.220229]  [<c0de6cd6>] ? register_oss_dsp+0x62/0xb5
> 
> Yup, sound subsystem...

Yep ;)

> > This was for a 386 build. I could give a .config and full dmesg if
> > needed.
> 
> I think the sound developers (now on CC: would probably like to see
> that.)

I guess it's a long-standing issue.  The dead old OSS driver creates
/dev/audio and /dev/dspW by itself without coping with sound_core
module.


Takashi

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
@ 2011-03-09 16:09     ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2011-03-09 16:09 UTC (permalink / raw)
  To: Greg KH; +Cc: Steven Rostedt, Jaroslav Kysela, LKML, Andrew Morton, alsa-devel

At Wed, 9 Mar 2011 07:53:09 -0800,
Greg KH wrote:
> 
> On Wed, Mar 09, 2011 at 10:39:49AM -0500, Steven Rostedt wrote:
> > Not sure who to send this to, but last night on v2.6.38-rc8 ktest
> > triggered this warning:
> > 
> > 
> > [   32.062538] YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
> > [   32.071305] PM: Adding info for No Bus:timer
> > [   32.075864] PM: Adding info for platform:snd_dummy.0^M
> > [   32.081232] PM: Adding info for No Bus:card0
> > [   32.085853] PM: Adding info for No Bus:pcmC0D0p
> > [   32.090650] PM: Adding info for No Bus:pcmC0D0c
> > [   32.095667] PM: Adding info for No Bus:dsp
> > [   32.099918] ------------[ cut here ]------------
> > [   32.104531] WARNING: at /home/rostedt/work/autotest/nobackup/linux-test.git/fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95()
> > [   32.115379] Hardware name:         
> > [   32.118859] sysfs: cannot create duplicate filename '/dev/char/14:4'
> 
> Two modules wanted to create the same minor number, that's not good.
> 
> 14:4 is the OSS /dev/audio node.

Are they modules or built-in?

> > [   32.125197] Modules linked in:
> > [   32.128255] Pid: 1, comm: swapper Not tainted 2.6.38-rc8-test #1
> > [   32.134247] Call Trace:^M
> > [   32.136693]  [<c044d095>] ? warn_slowpath_common+0x7c/0x91
> > [   32.142168]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> > [   32.147036]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> > [   32.151904]  [<c044d135>] ? warn_slowpath_fmt+0x33/0x35
> > [   32.157120]  [<c0552d35>] ? sysfs_add_one+0x83/0x95
> > [   32.161989]  [<c055393d>] ? sysfs_do_create_link+0xdf/0x181^M
> > [   32.167550]  [<c073637f>] ? vsnprintf+0x22c/0x266
> > [   32.172246]  [<c0553a0f>] ? sysfs_create_link+0x17/0x1c
> > [   32.177462]  [<c0950ce4>] ? device_add+0x183/0x573
> > [   32.182245]  [<c0958474>] ? device_pm_init+0x5d/0x61
> > [   32.187200]  [<c09510eb>] ? device_register+0x17/0x1a
> > [   32.192243]  [<c0951165>] ? device_create_vargs+0x77/0x98
> > [   32.197631]  [<c09511b3>] ? device_create+0x2d/0x2f
> > [   32.202501]  [<c0dc5caa>] ? sound_insert_unit+0x1ba/0x1d5
> > [   32.207891]  [<c0dc5e8e>] ? register_sound_special_device+0x103/0x11c
> > [   32.214319]  [<c0dd7875>] ? snd_register_oss_device+0x10a/0x169
> > [   32.220229]  [<c0de6cd6>] ? register_oss_dsp+0x62/0xb5
> 
> Yup, sound subsystem...

Yep ;)

> > This was for a 386 build. I could give a .config and full dmesg if
> > needed.
> 
> I think the sound developers (now on CC: would probably like to see
> that.)

I guess it's a long-standing issue.  The dead old OSS driver creates
/dev/audio and /dev/dspW by itself without coping with sound_core
module.


Takashi

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 15:53   ` Greg KH
  (?)
  (?)
@ 2011-03-09 16:20   ` Steven Rostedt
  2011-03-09 16:38       ` Takashi Iwai
  -1 siblings, 1 reply; 12+ messages in thread
From: Steven Rostedt @ 2011-03-09 16:20 UTC (permalink / raw)
  To: Greg KH; +Cc: Takashi Iwai, Jaroslav Kysela, LKML, Andrew Morton, alsa-devel

On Wed, 2011-03-09 at 07:53 -0800, Greg KH wrote:

> > This was for a 386 build. I could give a .config and full dmesg if
> > needed.
> 
> I think the sound developers (now on CC: would probably like to see
> that.)

http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/config

http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/dmesg

-- Steve

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 16:20   ` Steven Rostedt
@ 2011-03-09 16:38       ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2011-03-09 16:38 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andrew Morton, Greg KH, LKML, alsa-devel

At Wed, 09 Mar 2011 11:20:58 -0500,
Steven Rostedt wrote:
> 
> On Wed, 2011-03-09 at 07:53 -0800, Greg KH wrote:
> 
> > > This was for a 386 build. I could give a .config and full dmesg if
> > > needed.
> > 
> > I think the sound developers (now on CC: would probably like to see
> > that.)
> 
> http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/config
> 
> http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/dmesg

Could you try the patch below?  Totally untested.


Takashi

---
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] sound: Use sound_register_*() for additional OSS minor devices

Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.

This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/oss/soundcard.c |   56 +++++++++++++++++-------------------------------
 sound/sound_core.c    |    3 ++
 2 files changed, 23 insertions(+), 36 deletions(-)

diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index fcb14a09..7c7793a 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -526,31 +526,21 @@ bad:
 }
 
 
-/* These device names follow the official Linux device list,
- * Documentation/devices.txt.  Let us know if there are other
- * common names we should support for compatibility.
- * Only those devices not created by the generic code in sound_core.c are
- * registered here.
- */
-static const struct {
-	unsigned short minor;
-	char *name;
-	umode_t mode;
-	int *num;
-} dev_list[] = { /* list of minor devices */
-/* seems to be some confusion here -- this device is not in the device list */
-	{SND_DEV_DSP16,     "dspW",	 S_IWUGO | S_IRUSR | S_IRGRP,
-	 &num_audiodevs},
-	{SND_DEV_AUDIO,     "audio",	 S_IWUGO | S_IRUSR | S_IRGRP,
-	 &num_audiodevs},
-};
-
 static int dmabuf;
 static int dmabug;
 
 module_param(dmabuf, int, 0444);
 module_param(dmabug, int, 0444);
 
+/* additional minors for compatibility */
+struct oss_minor_dev {
+	unsigned short minor;
+	unsigned int enabled;
+} dev_list[] = {
+	{ SND_DEV_DSP16 },
+	{ SND_DEV_AUDIO },
+};
+
 static int __init oss_init(void)
 {
 	int             err;
@@ -571,18 +561,12 @@ static int __init oss_init(void)
 	sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
 
 	for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
-		device_create(sound_class, NULL,
-			      MKDEV(SOUND_MAJOR, dev_list[i].minor), NULL,
-			      "%s", dev_list[i].name);
-
-		if (!dev_list[i].num)
-			continue;
-
-		for (j = 1; j < *dev_list[i].num; j++)
-			device_create(sound_class, NULL,
-				      MKDEV(SOUND_MAJOR,
-					    dev_list[i].minor + (j*0x10)),
-				      NULL, "%s%d", dev_list[i].name, j);
+		j = 0;
+		do {
+			unsigned short minor = dev_list[i].minor + j * 0x10;
+			if (!register_sound_special(&oss_sound_fops, minor))
+				dev_list[i].enabled = (1 << j);
+		} while (++j < num_audiodevs);
 	}
 
 	if (sound_nblocks >= MAX_MEM_BLOCKS - 1)
@@ -596,11 +580,11 @@ static void __exit oss_cleanup(void)
 	int i, j;
 
 	for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
-		device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
-		if (!dev_list[i].num)
-			continue;
-		for (j = 1; j < *dev_list[i].num; j++)
-			device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
+		j = 0;
+		do {
+			if (dev_list[i].enabled & (1 << j))
+				unregister_sound_special(dev_list[i].minor);
+		} while (++j < num_audiodevs);
 	}
 	
 	unregister_sound_special(1);
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 5580ace..6ce2778 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -384,6 +384,9 @@ int register_sound_special_device(const struct file_operations *fops, int unit,
 	    case 4:
 		name = "audio";
 		break;
+	    case 5:
+		name = "dspW";
+		break;
 	    case 8:
 		name = "sequencer2";
 		if (unit >= SOUND_STEP)
-- 
1.7.4.1

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
@ 2011-03-09 16:38       ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2011-03-09 16:38 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Greg KH, Jaroslav Kysela, LKML, Andrew Morton, alsa-devel

At Wed, 09 Mar 2011 11:20:58 -0500,
Steven Rostedt wrote:
> 
> On Wed, 2011-03-09 at 07:53 -0800, Greg KH wrote:
> 
> > > This was for a 386 build. I could give a .config and full dmesg if
> > > needed.
> > 
> > I think the sound developers (now on CC: would probably like to see
> > that.)
> 
> http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/config
> 
> http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/dmesg

Could you try the patch below?  Totally untested.


Takashi

---
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] sound: Use sound_register_*() for additional OSS minor devices

Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.

This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/oss/soundcard.c |   56 +++++++++++++++++-------------------------------
 sound/sound_core.c    |    3 ++
 2 files changed, 23 insertions(+), 36 deletions(-)

diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index fcb14a09..7c7793a 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -526,31 +526,21 @@ bad:
 }
 
 
-/* These device names follow the official Linux device list,
- * Documentation/devices.txt.  Let us know if there are other
- * common names we should support for compatibility.
- * Only those devices not created by the generic code in sound_core.c are
- * registered here.
- */
-static const struct {
-	unsigned short minor;
-	char *name;
-	umode_t mode;
-	int *num;
-} dev_list[] = { /* list of minor devices */
-/* seems to be some confusion here -- this device is not in the device list */
-	{SND_DEV_DSP16,     "dspW",	 S_IWUGO | S_IRUSR | S_IRGRP,
-	 &num_audiodevs},
-	{SND_DEV_AUDIO,     "audio",	 S_IWUGO | S_IRUSR | S_IRGRP,
-	 &num_audiodevs},
-};
-
 static int dmabuf;
 static int dmabug;
 
 module_param(dmabuf, int, 0444);
 module_param(dmabug, int, 0444);
 
+/* additional minors for compatibility */
+struct oss_minor_dev {
+	unsigned short minor;
+	unsigned int enabled;
+} dev_list[] = {
+	{ SND_DEV_DSP16 },
+	{ SND_DEV_AUDIO },
+};
+
 static int __init oss_init(void)
 {
 	int             err;
@@ -571,18 +561,12 @@ static int __init oss_init(void)
 	sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
 
 	for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
-		device_create(sound_class, NULL,
-			      MKDEV(SOUND_MAJOR, dev_list[i].minor), NULL,
-			      "%s", dev_list[i].name);
-
-		if (!dev_list[i].num)
-			continue;
-
-		for (j = 1; j < *dev_list[i].num; j++)
-			device_create(sound_class, NULL,
-				      MKDEV(SOUND_MAJOR,
-					    dev_list[i].minor + (j*0x10)),
-				      NULL, "%s%d", dev_list[i].name, j);
+		j = 0;
+		do {
+			unsigned short minor = dev_list[i].minor + j * 0x10;
+			if (!register_sound_special(&oss_sound_fops, minor))
+				dev_list[i].enabled = (1 << j);
+		} while (++j < num_audiodevs);
 	}
 
 	if (sound_nblocks >= MAX_MEM_BLOCKS - 1)
@@ -596,11 +580,11 @@ static void __exit oss_cleanup(void)
 	int i, j;
 
 	for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
-		device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor));
-		if (!dev_list[i].num)
-			continue;
-		for (j = 1; j < *dev_list[i].num; j++)
-			device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)));
+		j = 0;
+		do {
+			if (dev_list[i].enabled & (1 << j))
+				unregister_sound_special(dev_list[i].minor);
+		} while (++j < num_audiodevs);
 	}
 	
 	unregister_sound_special(1);
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 5580ace..6ce2778 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -384,6 +384,9 @@ int register_sound_special_device(const struct file_operations *fops, int unit,
 	    case 4:
 		name = "audio";
 		break;
+	    case 5:
+		name = "dspW";
+		break;
 	    case 8:
 		name = "sequencer2";
 		if (unit >= SOUND_STEP)
-- 
1.7.4.1


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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 16:38       ` Takashi Iwai
  (?)
@ 2011-03-09 16:44       ` Steven Rostedt
  -1 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2011-03-09 16:44 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Greg KH, Jaroslav Kysela, LKML, Andrew Morton, alsa-devel

On Wed, 2011-03-09 at 17:38 +0100, Takashi Iwai wrote:
> At Wed, 09 Mar 2011 11:20:58 -0500,
> Steven Rostedt wrote:
> > 
> > On Wed, 2011-03-09 at 07:53 -0800, Greg KH wrote:
> > 
> > > > This was for a 386 build. I could give a .config and full dmesg if
> > > > needed.
> > > 
> > > I think the sound developers (now on CC: would probably like to see
> > > that.)
> > 
> > http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/config
> > 
> > http://rostedt.homelinux.com/private/mitest-boot-randconfig-fail-20110209042837/dmesg
> 
> Could you try the patch below?  Totally untested.
> 

Will do, but first I'll make sure that this is reproducible on every
boot.

Thanks,

-- Steve

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 16:38       ` Takashi Iwai
  (?)
  (?)
@ 2011-03-09 17:21       ` Steven Rostedt
  2011-03-09 19:12           ` Takashi Iwai
  -1 siblings, 1 reply; 12+ messages in thread
From: Steven Rostedt @ 2011-03-09 17:21 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Greg KH, Jaroslav Kysela, LKML, Andrew Morton, alsa-devel

On Wed, 2011-03-09 at 17:38 +0100, Takashi Iwai wrote:

> Could you try the patch below?  Totally untested.

It seems to work. I added the patch and the warning is gone, and removed
it, and it reappeared. Now, I don't have and speakers attached to this
test box, so I never tested if sound works ;)

> 
> 
> Takashi
> 
> ---
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] sound: Use sound_register_*() for additional OSS minor devices
> 
> Since OSS driver creates the device entries for /dev/audio* and
> /dev/dspW* by itself without coping with sound_core, it leads to
> conflicts with others and let sysfs spewing warnings.
> 
> This patch rewrites the registration part of OSS driver to use
> the standard method also for additional minor devices.

Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)

-- Steve

> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
  2011-03-09 17:21       ` Steven Rostedt
@ 2011-03-09 19:12           ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2011-03-09 19:12 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andrew Morton, Greg KH, LKML, alsa-devel

At Wed, 09 Mar 2011 12:21:53 -0500,
Steven Rostedt wrote:
> 
> On Wed, 2011-03-09 at 17:38 +0100, Takashi Iwai wrote:
> 
> > Could you try the patch below?  Totally untested.
> 
> It seems to work. I added the patch and the warning is gone, and removed
> it, and it reappeared. Now, I don't have and speakers attached to this
> test box, so I never tested if sound works ;)
> 
> > 
> > 
> > Takashi
> > 
> > ---
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] sound: Use sound_register_*() for additional OSS minor devices
> > 
> > Since OSS driver creates the device entries for /dev/audio* and
> > /dev/dspW* by itself without coping with sound_core, it leads to
> > conflicts with others and let sysfs spewing warnings.
> > 
> > This patch rewrites the registration part of OSS driver to use
> > the standard method also for additional minor devices.
> 
> Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
> Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)

Thanks for a quick check!
I merged the patch now.


Takashi

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

* Re: [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95
@ 2011-03-09 19:12           ` Takashi Iwai
  0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2011-03-09 19:12 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Greg KH, Jaroslav Kysela, LKML, Andrew Morton, alsa-devel

At Wed, 09 Mar 2011 12:21:53 -0500,
Steven Rostedt wrote:
> 
> On Wed, 2011-03-09 at 17:38 +0100, Takashi Iwai wrote:
> 
> > Could you try the patch below?  Totally untested.
> 
> It seems to work. I added the patch and the warning is gone, and removed
> it, and it reappeared. Now, I don't have and speakers attached to this
> test box, so I never tested if sound works ;)
> 
> > 
> > 
> > Takashi
> > 
> > ---
> > From: Takashi Iwai <tiwai@suse.de>
> > Subject: [PATCH] sound: Use sound_register_*() for additional OSS minor devices
> > 
> > Since OSS driver creates the device entries for /dev/audio* and
> > /dev/dspW* by itself without coping with sound_core, it leads to
> > conflicts with others and let sysfs spewing warnings.
> > 
> > This patch rewrites the registration part of OSS driver to use
> > the standard method also for additional minor devices.
> 
> Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
> Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)

Thanks for a quick check!
I merged the patch now.


Takashi

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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 15:39 [BUG] WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x83/0x95 Steven Rostedt
2011-03-09 15:53 ` Greg KH
2011-03-09 15:53   ` Greg KH
2011-03-09 16:09   ` Takashi Iwai
2011-03-09 16:09     ` Takashi Iwai
2011-03-09 16:20   ` Steven Rostedt
2011-03-09 16:38     ` Takashi Iwai
2011-03-09 16:38       ` Takashi Iwai
2011-03-09 16:44       ` Steven Rostedt
2011-03-09 17:21       ` Steven Rostedt
2011-03-09 19:12         ` Takashi Iwai
2011-03-09 19:12           ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.