[BUG] Race for nr_tasks in kernel/exit.c? (2.2.12)

Curtis Regentin (roo@inlink.com)
Wed, 8 Sep 1999 16:00:56 -0500 (CDT)


My system's nr_tasks (as shown in /proc/loadavg) was growing with time,
while the number of processes (as seen in ps -aux) remained basically
constant.

In kernel/exit.c, it apears that nr_tasks decrement isn't protected by any
locks. I moved all modifying of nr_tasks into <add|get>_free_taskslot()
in include/linux/sched.h. Here it is protected by the taskslot_lock. The
problem looks fixed.

This is the first real playing I've done in the kernel, so I'd really
apreciate some feedback from someone with more of a clue.

- Curtis

P.S. Please CC for fast response, as I read through archives.

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