]> git.hungrycats.org Git - linux/commit
[PATCH] migration_thread() race fix
authorAndrew Morton <akpm@osdl.org>
Mon, 10 May 2004 06:30:22 +0000 (23:30 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 10 May 2004 06:30:22 +0000 (23:30 -0700)
commit74499d325f9072130c0e4754e914f0f6e597a815
treef87bf3b00e9419cd126e0bdfcec3b58bc51a849f
parent870d3c0a86538c98d81849fa58d13f443d30ca2c
[PATCH] migration_thread() race fix

From: Srivatsa Vaddagiri <vatsa@in.ibm.com>

Noticed that migration_thread can examine "kthread_should_stop()?" without
setting its state to TASK_INTERRUPTIBLE first.  This can cause kthread_stop
on that thread to block forever ...

P.S  - I assumed that having the task state set to TASK_INTERRUTIBLE
  while it is doing active_load_balance is fine. It seemed to be
  the case earlier also.
kernel/sched.c