]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Move mutex to protect against resetting of seq data
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Sat, 24 Sep 2016 02:57:13 +0000 (22:57 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Sun, 25 Sep 2016 14:27:08 +0000 (10:27 -0400)
commit32265913528989f7d82cb4e864a2be744b6bc0cc
treec945fb377258b480d806786d33fbd0f6ce118022
parent6b9d76f2bfd770d2f66c4bc87746d19378b1243a
tracing: Move mutex to protect against resetting of seq data

The iter->seq can be reset outside the protection of the mutex. So can
reading of user data. Move the mutex up to the beginning of the function.

Fixes: cf6aa25bdbe63 ("tracing/core: make the read callbacks reentrants")
Cc: stable@vger.kernel.org # 2.6.30+
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c