]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] md: close a small race in md thread deregistration
authorNeilBrown <neilb@cse.unsw.edu.au>
Sat, 16 Apr 2005 22:26:41 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:26:41 +0000 (15:26 -0700)
commit395f3b8887904880529b16c118438191b2e36743
tree394fd07638bb54d9d7beb42bad62e1fb79691261
parentf062f7826eafdd5c663c987b5a400cd3e0364ca3
[PATCH] md: close a small race in md thread deregistration

There is a tiny race when de-registering an MD thread, in that the thread
could disappear before it is set a SIGKILL, causing send_sig to have
problems.

This is most easily closed by holding tasklist_lock between enabling the
thread to exit (setting ->run to NULL) and telling it to exit.

(akpm: ick.  Needs to use kthread API and stop using signals)

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/md.c