]> git.baikalelectronics.ru Git - kernel.git/commit
um: convert count_lock to mutex, fix a race in line_open()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Sep 2011 21:36:37 +0000 (17:36 -0400)
committerRichard Weinberger <richard@nod.at>
Sat, 24 Mar 2012 23:29:53 +0000 (00:29 +0100)
commitd86e6991346c34de247b2bc1d55b1ca66828c60c
tree88f7f49abb5944725f3b60d8f28a41580e7f915f
parent25460e47719a8317789c4038a3b0edc2f1ca675d
um: convert count_lock to mutex, fix a race in line_open()

If two processes are opening the same line, the second to get
into line_open() will decide that it doesn't need to do anything
(correctly) or wait for anything.  The latter, unfortunately,
is incorrect - the first opener might not be through yet.  We
need to have exclusion covering the entire line_init(), including
the blocking parts.  Moreover, the next patch will need to
widen the exclusion on mconsole side of things, also including
the blocking bits, so let's just convert that sucker to mutex...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/line.c
arch/um/drivers/line.h
arch/um/drivers/ssl.c
arch/um/drivers/stdio_console.c