]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit80064aa1e1f8b652c991982be959e7a760f13a1e
tree715078f8b93370133459e1a9be7b7c736916fd3d
parent5fd9ad820d9fe29439888e5061d51c0798cfe25a
samples/trace_printk: Wait for IRQ work to finish

BugLink: https://bugs.launchpad.net/bugs/1861710
commit 01f36a554e3ef32f9fc4b81a4437cf08fd0e4742 upstream.

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: af2a0750f3749 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
samples/trace_printk/trace-printk.c