From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Segaud Date: Sat, 10 Jan 2004 22:55:02 +0000 Subject: Re: Deadlocks with 2.6.1 + -mm sysfs patches Message-Id: <877jzzs9bt.fsf@minas-morgul.org> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Fr=E9d=E9ric L. W. Meunier <1@pervalidus.net> writes: > Well, maybe one of those caused it. It doesn't happen with > plain 2.6.1-rc2. Patches taken from > http://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.1/2.6.= 1-mm2/broken-out/ > . I didn't apply sysfs-add-video-class.patch because I use > matroxfb-2.6.0.gz. > > I also didn't apply CONFIG_SYSFS-boot-from-disk-fix.patch and > sysfs-pin-kobject.patch. Am I missing other patches ? Using > latest hotplug and udev. I think you should apply sysfs-pin-kobject.patch It fixes some use-after-free races in sysfs code (however, still got one of those ealier today when unloading alsa snd_powermac driver on my iBo= ok) [snip] In fact, without this patch, code hits a BUG() in dget() and with it, it oopses a little later in sysfs_remove_dir(), just before dput()-ing the dentry (it oopses when putting d pointer in r3 register just before calling dput(), so seems d is still freed to early) I am not sure about my interpretation; here are the oopses (with and without this patch) 1) without sysfs-pin-kobjetc.patch Jan 8 23:48:30 rivendell kernel: kernel BUG in dget at include/linux/dcach= e.h:2 74! Jan 8 23:48:30 rivendell kernel: Oops: Exception in kernel mode, sig: 5 [#= 1] Jan 8 23:48:30 rivendell kernel: NIP: C008E318 LR: C00C14B0 SP: C76A1D00 R= EGS:=20 c76a1c50 TRAP: 0700 Not tainted Jan 8 23:48:30 rivendell kernel: MSR: 00029032 EE: 1 PR: 0 FP: 0 ME: 1 IR/= DR: 1 1 Jan 8 23:48:30 rivendell kernel: TASK =3D d72adca0[926] 'modprobe' Last sy= scall:=20 129=20 Jan 8 23:48:30 rivendell kernel: GPR00: 00000000 C76A1D00 D72ADCA0 D5F9EF7= 4 D7F FC400 00C4899F 00000000 00000000=20 Jan 8 23:48:30 rivendell kernel: GPR08: 00000015 00000014 D7FFC410 0000005= 0 60B A5D56 1001D4C8 00000000 10016078=20 Jan 8 23:48:30 rivendell kernel: GPR16: 00000000 00000000 00000000 1000000= 0 000 00001 10010000 00000000 00000000=20 Jan 8 23:48:30 rivendell kernel: GPR24: 00000002 10001118 00000000 DB0B7FC= C DB0 B8018 DB0B802C D6AEA080 D5F9EF74=20 Jan 8 23:48:30 rivendell kernel: Call trace: Jan 8 23:48:30 rivendell kernel: [c00c14b0] kobject_del+0x70/0x9c Jan 8 23:48:30 rivendell kernel: [c00e7558] class_device_del+0xe0/0x140 Jan 8 23:48:30 rivendell kernel: [c00e75d0] class_device_unregister+0x18/= 0x34 Jan 8 23:48:30 rivendell kernel: [c00e7ad0] simple_remove_class_device+0x= 8c/0x9c Jan 8 23:48:30 rivendell kernel: [db0b6260] sound_remove_unit+0x2c/0x48 [= soundcore] Jan 8 23:48:30 rivendell kernel: [db0d1098] snd_unregister_oss_device+0x6= 0/0x154 [snd] Jan 8 23:48:30 rivendell kernel: [db3baa30] snd_mixer_oss_notify_handler+= 0x88/0x244 [snd_mixer_oss] Jan 8 23:48:30 rivendell kernel: [db3bac4c] alsa_mixer_oss_exit+0x60/0xa8= 4 [snd_mixer_oss] Jan 8 23:48:30 rivendell kernel: [c002f958] sys_delete_module+0x1a0/0x234 Jan 8 23:48:30 rivendell kernel: [c0005e7c] ret_from_syscall+0x0/0x44 2)with sysfs-pin-kobject.patch Jan 10 15:23:05 rivendell kernel: Oops: kernel access of bad area, sig: 11 = [#1] Jan 10 15:23:05 rivendell kernel: NIP: C0072034 LR: C008CF90 SP: D7201DB0 R= EGS:=20 d7201d00 TRAP: 0301 Not tainted Jan 10 15:23:05 rivendell kernel: MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/= DR: 1 1 Jan 10 15:23:05 rivendell kernel: DAR: 0000002C, DSISR: 40000000 Jan 10 15:23:05 rivendell kernel: TASK =3D d5614e40[1183] 'modprobe' Last s= yscall: 129=20 Jan 10 15:23:05 rivendell kernel: GPR00: C008CF90 D7201DB0 D5614E40 D6212BC= 0 D62 12BC0 00000000 C02B0000 D7FF8400=20 Jan 10 15:23:05 rivendell kernel: GPR08: 0000002F 0000002E D7FFDC70 0000000= 0 695 687AE=20 Jan 10 15:23:05 rivendell kernel: Call trace: Jan 10 15:23:05 rivendell kernel: [c008cf90] sysfs_remove_dir+0xf0/0x104 Jan 10 15:23:05 rivendell kernel: [c00bf554] kobject_del+0x70/0x9c Jan 10 15:23:05 rivendell kernel: [c00e58a8] class_device_del+0xe0/0x140 Jan 10 15:23:05 rivendell kernel: [c00e5920] class_device_unregister+0x18/= 0x34 Jan 10 15:23:05 rivendell kernel: [c00e5e20] simple_remove_class_device+0x= 8c/0x9c Jan 10 15:23:05 rivendell kernel: [db0b6260] sound_remove_unit+0x2c/0x48 [= soundcore] Jan 10 15:23:05 rivendell kernel: [db0d2be8] snd_unregister_oss_device+0x6= 0/0x154 [snd] Jan 10 15:23:05 rivendell kernel: [db58a244] unregister_device+0x68/0x104 = [snd_seq_oss] Jan 10 15:23:05 rivendell kernel: [c002f840] sys_delete_module+0x1a0/0x234 Jan 10 15:23:05 rivendell kernel: [c0005e7c] ret_from_syscall+0x0/0x44 Was not able to track where or when it is freed (this crash does not occur each time I unload snd-powermac, it seems quite random) --=20 Mathieu Segaud HP LaserJetIII wrote: > How to turn off faucet? >=20 Now that's a good one! Somebody's mucking with my print-server. Sorry. I'm gonna get my gun.... - Richard Johnson on linux-kernel ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel