public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.14.3 - sysfs duplicated dentry bug
@ 2005-12-09 17:48 Blaisorblade
  2005-12-09 17:55 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Blaisorblade @ 2005-12-09 17:48 UTC (permalink / raw)
  To: LKML, Greg Kroah-Hartman

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

Q: Since when is a directory entry allowed to be duplicate?
A: Since Linux 2.6.14!

$ uname -r
2.6.14.3-bs2-mroute

The only sysfs-related change is the use of a custom DSDT, which is new to 
this kernel.

$ ls -li  /sys/devices/system/
totale 0
425 drwxr-xr-x  3 root root 0  7 dic 03:57 acpi
 17 drwxr-xr-x  3 root root 0  7 dic 03:57 cpu
197 drwxr-xr-x  3 root root 0  7 dic 03:57 i8237
195 drwxr-xr-x  3 root root 0  7 dic 03:57 i8259
204 drwxr-xr-x  3 root root 0  7 dic 03:57 ioapic
242 drwxr-xr-x  3 root root 0  7 dic 03:57 irqrouter
202 drwxr-xr-x  3 root root 0  7 dic 03:57 lapic
421 drwxr-xr-x  3 root root 0  7 dic 03:57 lapic_nmi
199 drwxr-xr-x  3 root root 0  7 dic 03:57 machinecheck
193 drwxr-xr-x  3 root root 0  7 dic 03:57 timer
193 drwxr-xr-x  3 root root 0  7 dic 03:57 timer

$ ls -li  /sys/devices/system/ -d
16 drwxr-xr-x  12 root root 0  7 dic 03:57 /sys/devices/system/

From the hard link count you can also verify (tested with find -noleaf, output 
below) that 
the duplicate "timer" dentry is not counted again in the hard link count.

(perfectly reproducible, it's not a race condition on "ls" time - and it 
duplicates always the same dentry. I've not tested rebooting though).

lsmod output and .config attached. Additionally, "strace -v" output attached 
(SysfsRootBugreport.bz2) - the relevant line is the getdents call 
on /sys/devices/system:

getdents(3, {{d_ino=16, d_off=1, d_reclen=24, d_name="."} {d_ino=7, d_off=2, 
d_reclen=24, d_name=".."} {d_ino=425, d_off=3, d_reclen=24, d_name="acpi"} 
{d_ino=421, d_off=4, d_reclen=32, d_name="lapic_nmi"} {d_ino=242, d_off=5, 
d_reclen=32, d_name="irqrouter"} {d_ino=204, d_off=6, d_reclen=32, 
d_name="ioapic"} {d_ino=202, d_off=7, d_reclen=32, d_name="lapic"} 
{d_ino=199, d_off=8, d_reclen=32, d_name="machinecheck"} {d_ino=197, d_off=9, 
d_reclen=32, d_name="i8237"} {d_ino=195, d_off=10, d_reclen=32, 
d_name="i8259"}

/*The dentry*/
{d_ino=193, d_off=11, d_reclen=32, d_name="timer"}
/*Again*/
{d_ino=193, d_off=12, d_reclen=32, d_name="timer"}

{d_ino=17, d_off=13, d_reclen=24, d_name="cpu"}}, 4096) = 384

I have not tested if this bug is new to this kernel.

Finally:

# find /sys/devices/system/ -noleaf
/sys/devices/system/
/sys/devices/system/acpi
/sys/devices/system/acpi/acpi0
/sys/devices/system/lapic_nmi
/sys/devices/system/lapic_nmi/lapic_nmi0
/sys/devices/system/irqrouter
/sys/devices/system/irqrouter/irqrouter0
/sys/devices/system/ioapic
/sys/devices/system/ioapic/ioapic0
/sys/devices/system/lapic
/sys/devices/system/lapic/lapic0
/sys/devices/system/machinecheck
/sys/devices/system/machinecheck/machinecheck0
/sys/devices/system/machinecheck/machinecheck0/check_interval
/sys/devices/system/machinecheck/machinecheck0/tolerant
/sys/devices/system/machinecheck/machinecheck0/bank4ctl
/sys/devices/system/machinecheck/machinecheck0/bank3ctl
/sys/devices/system/machinecheck/machinecheck0/bank2ctl
/sys/devices/system/machinecheck/machinecheck0/bank1ctl
/sys/devices/system/machinecheck/machinecheck0/bank0ctl
/sys/devices/system/i8237
/sys/devices/system/i8237/i82370
/sys/devices/system/i8259
/sys/devices/system/i8259/i82590
/sys/devices/system/timer
/sys/devices/system/timer
/sys/devices/system/cpu
/sys/devices/system/cpu/cpu0
/sys/devices/system/cpu/cpu0/cpufreq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu0/cpufreq/affected_cpus
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq

(and -noleaf is indeed needed, because otherwise find does not recurse inbto 
cpu0/)
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

[-- Attachment #2: lsmod --]
[-- Type: text/plain, Size: 2175 bytes --]

Module                  Size  Used by
sd_mod                 18200  0 
cifs                  221852  1 
nls_iso8859_1           5504  0 
nls_cp437               7232  0 
isofs                  37964  0 
zlib_inflate           17728  1 isofs
cpufreq_powersave       2176  0 
af_packet              25100  2 
cpufreq_ondemand        7532  1 
ipt_REJECT              5888  2 
ipt_LOG                 7168  1 
ipt_length              2048  2 
ipt_state               2304  5 
iptable_filter          3584  1 
ipt_MASQUERADE          4032  3 
iptable_nat             9028  1 
ip_nat                 21628  2 ipt_MASQUERADE,iptable_nat
ip_conntrack           56080  4 ipt_state,ipt_MASQUERADE,iptable_nat,ip_nat
ipt_TOS                 2816  6 
ipt_MARK                3008  2 
ipt_multiport           2944  6 
iptable_mangle          3392  1 
ip_tables              22784  11 ipt_REJECT,ipt_LOG,ipt_length,ipt_state,iptable_filter,ipt_MASQUERADE,iptable_nat,ipt_TOS,ipt_MARK,ipt_multiport,iptable_mangle
uhci_hcd               34208  0 
parport_pc             38440  0 
parport                42252  1 parport_pc
yenta_socket           27724  0 
rsrc_nonstatic         13312  1 yenta_socket
pcmcia_core            45212  2 yenta_socket,rsrc_nonstatic
i810_audio             39320  0 
ac97_codec             21720  1 i810_audio
ehci_hcd               34056  0 
usb_storage            46916  0 
scsi_mod              113328  2 sd_mod,usb_storage
ohci_hcd               22532  0 
snd_pcm_oss            55904  0 
snd_mixer_oss          19008  1 snd_pcm_oss
snd_seq_oss            36224  0 
snd_seq_midi_event      8704  1 snd_seq_oss
snd_seq                59776  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          9808  2 snd_seq_oss,snd_seq
snd_intel8x0           37472  5 
snd_ac97_codec        107416  1 snd_intel8x0
snd_ac97_bus            2880  1 snd_ac97_codec
snd_pcm               102796  5 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer              27400  4 snd_seq,snd_pcm
snd_page_alloc         11984  2 snd_intel8x0,snd_pcm
nls_iso8859_15          6144  2 
nls_cp850               6400  1 
vfat                   15296  1 
fat                    55472  1 vfat

[-- Attachment #3: config-2.6.14.3-bs2-mroute.bz2 --]
[-- Type: application/x-bzip2, Size: 7311 bytes --]

[-- Attachment #4: SysfsRootBugReport.bz2 --]
[-- Type: application/x-bzip2, Size: 4628 bytes --]

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

* Re: 2.6.14.3 - sysfs duplicated dentry bug
  2005-12-09 17:48 2.6.14.3 - sysfs duplicated dentry bug Blaisorblade
@ 2005-12-09 17:55 ` Greg KH
  2005-12-23 22:25   ` Blaisorblade
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2005-12-09 17:55 UTC (permalink / raw)
  To: Blaisorblade; +Cc: LKML

On Fri, Dec 09, 2005 at 06:48:41PM +0100, Blaisorblade wrote:
> Q: Since when is a directory entry allowed to be duplicate?
> A: Since Linux 2.6.14!
> 
> $ uname -r
> 2.6.14.3-bs2-mroute
> 
> The only sysfs-related change is the use of a custom DSDT, which is new to 
> this kernel.

Known bug, fixed in the 2.6.15-rc kernel tree.  It was a timer
registering with the same name in two places :(

And yes, we should have more sysfs checks for stuff like this, any
patches in this area would be greatly appreciated.

thanks,

greg k-h

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

* Re: 2.6.14.3 - sysfs duplicated dentry bug
  2005-12-09 17:55 ` Greg KH
@ 2005-12-23 22:25   ` Blaisorblade
  2005-12-23 22:44     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Blaisorblade @ 2005-12-23 22:25 UTC (permalink / raw)
  To: Greg KH; +Cc: LKML

On Friday 09 December 2005 18:55, Greg KH wrote:
> On Fri, Dec 09, 2005 at 06:48:41PM +0100, Blaisorblade wrote:
> > Q: Since when is a directory entry allowed to be duplicate?
> > A: Since Linux 2.6.14!
> >
> > $ uname -r
> > 2.6.14.3-bs2-mroute
> >
> > The only sysfs-related change is the use of a custom DSDT, which is new
> > to this kernel.

> Known bug, fixed in the 2.6.15-rc kernel tree.  It was a timer
> registering with the same name in two places :(

Sorry for answering so late (my latency in checking "spam" false positives is 
big) but shouldn't this have been backported to -stable? Also is this known 
to cause hangs at unmount time (I experience them at times and they're not 
network FSs-related) ?

> And yes, we should have more sysfs checks for stuff like this, any
> patches in this area would be greatly appreciated.
No idea about all kfoo stuff at the present moment^H^H^H year, sorry. Can't 
help.

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

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

* Re: 2.6.14.3 - sysfs duplicated dentry bug
  2005-12-23 22:25   ` Blaisorblade
@ 2005-12-23 22:44     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2005-12-23 22:44 UTC (permalink / raw)
  To: Blaisorblade; +Cc: LKML

On Fri, Dec 23, 2005 at 11:25:11PM +0100, Blaisorblade wrote:
> On Friday 09 December 2005 18:55, Greg KH wrote:
> > On Fri, Dec 09, 2005 at 06:48:41PM +0100, Blaisorblade wrote:
> > > Q: Since when is a directory entry allowed to be duplicate?
> > > A: Since Linux 2.6.14!
> > >
> > > $ uname -r
> > > 2.6.14.3-bs2-mroute
> > >
> > > The only sysfs-related change is the use of a custom DSDT, which is new
> > > to this kernel.
> 
> > Known bug, fixed in the 2.6.15-rc kernel tree.  It was a timer
> > registering with the same name in two places :(
> 
> Sorry for answering so late (my latency in checking "spam" false positives is 
> big) but shouldn't this have been backported to -stable?

It should, if someone sends the patch to do so to the stable@ email
address :)

> Also is this known to cause hangs at unmount time (I experience them
> at times and they're not network FSs-related) ?

Not that I have heard about, but you never know...

thanks,

greg k-h

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

end of thread, other threads:[~2005-12-23 22:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-09 17:48 2.6.14.3 - sysfs duplicated dentry bug Blaisorblade
2005-12-09 17:55 ` Greg KH
2005-12-23 22:25   ` Blaisorblade
2005-12-23 22:44     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox