[PATCH] Re: Oops with kernel 2.4.5 on heavy disk traffic

Alexander Viro (viro@math.psu.edu)
Sun, 10 Jun 2001 11:36:35 -0400 (EDT)


Please, apply. What's happing here is simple - we set i_ino by
PID and get something out of range of per-process inode. Confusion
follows... Fix: move initializing ->u.proc_i.task past the check.
Then proc_delete_inode() will be happy with it.
Alois, Bryce - that ought to fix the oopsen you see.

--- linux/fs/proc/base.c.old Sun Jun 10 11:15:55 2001
+++ linux/fs/proc/base.c Sun Jun 10 11:21:51 2001
@@ -635,15 +635,14 @@
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_ino = fake_ino(task->pid, ino);

- inode->u.proc_i.file = NULL;
+ if (!task->pid)
+ goto out_unlock;
+
/*
* grab the reference to task.
*/
- inode->u.proc_i.task = task;
get_task_struct(task);
- if (!task->pid)
- goto out_unlock;
-
+ inode->u.proc_i.task = task;
inode->i_uid = 0;
inode->i_gid = 0;
if (ino == PROC_PID_INO || task->dumpable) {

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