public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] procfs bug exposed by cdev changes
@ 2003-05-28 18:06 Olivier NICOLAS
  2003-05-28 18:18 ` Stian Jordet
  0 siblings, 1 reply; 4+ messages in thread
From: Olivier NICOLAS @ 2003-05-28 18:06 UTC (permalink / raw)
  To: linux-kernel

 >       fs/inode.c assumes that any ->delete_inode() will call 
 >clear_inode().
 >procfs instance doesn't. It had passed unpunished for a while; cdev 
 >changes
 >combined with ALSA creating character devices in procfs made it fatal.
 >
 >        Patch follows. It had fixed ALSA-triggered memory corruption 
 >here -
 >what happens in vanilla 2.5.70 is that clear_inode() is not called when
 >procfs character device inodes are freed. That leaves a freed inode on
 >a cyclic list, with obvious unpleasantness following when we try to 
 >traverse
 >it (e.g. when unregistering a device).
 >
 >        Please, apply. Folks who'd seen oopsen/memory corruption after
 >ALSA access - please, check if that fixes all problems.


modprobe snd-intel8x0
rmmod snd-intel8x0

ALSA works for me,

Thanks
Olivier




^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] procfs bug exposed by cdev changes
@ 2003-05-28  0:31 viro
  2003-05-28  4:35 ` Florin Iucha
  0 siblings, 1 reply; 4+ messages in thread
From: viro @ 2003-05-28  0:31 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

	fs/inode.c assumes that any ->delete_inode() will call clear_inode().
procfs instance doesn't.  It had passed unpunished for a while; cdev changes
combined with ALSA creating character devices in procfs made it fatal.

	Patch follows.  It had fixed ALSA-triggered memory corruption here -
what happens in vanilla 2.5.70 is that clear_inode() is not called when
procfs character device inodes are freed.  That leaves a freed inode on
a cyclic list, with obvious unpleasantness following when we try to traverse
it (e.g. when unregistering a device).

	Please, apply.  Folks who'd seen oopsen/memory corruption after
ALSA access - please, check if that fixes all problems.

--- C70/fs/proc/inode.c	Mon May 26 22:21:40 2003
+++ C70-current/fs/proc/inode.c	Tue May 27 20:07:01 2003
@@ -61,8 +61,6 @@
 	struct proc_dir_entry *de;
 	struct task_struct *tsk;
 
-	inode->i_state = I_CLEAR;
-
 	/* Let go of any associated process */
 	tsk = PROC_I(inode)->task;
 	if (tsk)
@@ -75,6 +73,7 @@
 			module_put(de->owner);
 		de_put(de);
 	}
+	clear_inode(inode);
 }
 
 struct vfsmount *proc_mnt;

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

end of thread, other threads:[~2003-05-28 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-28 18:06 [PATCH] procfs bug exposed by cdev changes Olivier NICOLAS
2003-05-28 18:18 ` Stian Jordet
  -- strict thread matches above, loose matches on Subject: below --
2003-05-28  0:31 viro
2003-05-28  4:35 ` Florin Iucha

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