]> git.baikalelectronics.ru Git - kernel.git/commit
samples/trace_printk: Wait for IRQ work to finish
authorSven Schnelle <svens@linux.ibm.com>
Wed, 18 Dec 2019 07:44:26 +0000 (08:44 +0100)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 21 Dec 2019 21:08:22 +0000 (16:08 -0500)
commitfcc1526064854339aaa4a951b0b8ee6402696c2e
treef0ef6325d08529b98aee0e88ff5f3612e2ec5709
parent8e879786c0e35c8974a14e0d5d32f02b4d814180
samples/trace_printk: Wait for IRQ work to finish

trace_printk schedules work via irq_work_queue(), but doesn't
wait until it was processed. The kprobe_module.tc testcase does:

:;: "Load module again, which means the event1 should be recorded";:
modprobe trace-printk
grep "event1:" trace

so the grep which checks the trace file might run before the irq work
was processed. Fix this by adding a irq_work_sync().

Link: http://lore.kernel.org/linux-trace-devel/20191218074427.96184-3-svens@linux.ibm.com
Cc: stable@vger.kernel.org
Fixes: f7c98248638ee ("selftests/ftrace: Improve kprobe on module testcase to load/unload module")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
samples/trace_printk/trace-printk.c