From: Santosh Shukla <sshukla@mvista.com>
To: fche@redhat.com, dsmith@redhat.com, jistone@redhat.com
Cc: systemtap@sourceware.org, Santosh Shukla <sshukla@mvista.com>
Subject: [SYSTEMTAP/PATCH v3 9/9] stp: rt: fix preemptible bug_on for STAT_GET_CPU
Date: Mon, 22 Sep 2014 07:27:00 -0000 [thread overview]
Message-ID: <1411370822-8707-10-git-send-email-sshukla@mvista.com> (raw)
In-Reply-To: <1411370822-8707-1-git-send-email-sshukla@mvista.com>
STAT_GET_CPU to use raw_smp_xxx api in -rt fixes below bug on
BUG: using smp_processor_id() in preemptible [00000000 00000000] code: rmmod/56155
caller is _stp_stat_add+0x1d/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
CPU: 6 PID: 56155 Comm: rmmod Tainted: GF O 3.14.12-rt-rt9+ #2
Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.0002.082220131453 08/22/2013
ffff88040819ae80 ffff8803d86c7dc8 ffffffff81602b13 0000000000000006
ffff8803d86c7de0 ffffffff812e5575 000000006426532c ffff8803d86c7e08
ffffffffa0877c1d ffffffffa0883c00 ffffffffa0823118 00008fd170541a19
Call Trace:
[<ffffffff81602b13>] dump_stack+0x4e/0x7a
[<ffffffff812e5575>] debug_smp_processor_id+0x105/0x120
[<ffffffffa0877c1d>] _stp_stat_add+0x1d/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
[<ffffffffa087ad0f>] systemtap_module_refresh+0x10f/0x1d0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
[<ffffffffa087c8a1>] _stp_module_notifier+0x41/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
[<ffffffff8160d4ed>] ? kprobes_module_callback+0x12d/0x140
[<ffffffff8160c75c>] notifier_call_chain+0x4c/0x70
[<ffffffff8109805d>] __blocking_notifier_call_chain+0x4d/0x70
[<ffffffff81098096>] blocking_notifier_call_chain+0x16/0x20
[<ffffffff810eb006>] SyS_delete_module+0x146/0x1c0
[<ffffffff81611166>] ? int_signal+0x12/0x17
[<ffffffff81610ea9>] system_call_fastpath+0x16/0x1b
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
---
runtime/linux/stat_runtime.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/runtime/linux/stat_runtime.h b/runtime/linux/stat_runtime.h
index 56152c9..5e27026 100644
--- a/runtime/linux/stat_runtime.h
+++ b/runtime/linux/stat_runtime.h
@@ -21,7 +21,11 @@
#define STAT_LOCK(sd) do {} while (0)
#define STAT_UNLOCK(sd) do {} while (0)
/* get/put_cpu wrappers. Unnecessary if caller is already atomic. */
+#ifdef CONFIG_PREEMPT_RT_FULL
+#define STAT_GET_CPU() raw_smp_processor_id()
+#else
#define STAT_GET_CPU() smp_processor_id()
+#endif
#define STAT_PUT_CPU() do {} while (0)
#endif
--
1.8.3.1
next prev parent reply other threads:[~2014-09-22 7:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 7:27 [SYSTEMTAP/PATCH v3 0/9] RT aware systemtap patch set Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 5/9] stp: rt: replace utrace_struct lock to stp style raw lock Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 6/9] stp: rt: replace __stp_tf_task_work_list_lock to stp raw Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 4/9] stp: rt: replace utrace->lock with stp style raw lock Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 2/9] stp: rt: replace __stp_tf_map_lock rd/wr lock " Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 8/9] stp: rt: replace stp_print lock with stp style lock Santosh Shukla
2014-09-22 7:27 ` Santosh Shukla [this message]
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 3/9] stp: rt: replace __stp_tf_vma_lock rd/wr lock with stp style of raw lock Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 7/9] stp: rt: replace addr_map_lock rd/wr lock with stp type " Santosh Shukla
2014-09-22 7:27 ` [SYSTEMTAP/PATCH v3 1/9] stp: rt: locking helper api Santosh Shukla
2014-09-25 18:14 ` [SYSTEMTAP/PATCH v3 0/9] RT aware systemtap patch set Frank Ch. Eigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411370822-8707-10-git-send-email-sshukla@mvista.com \
--to=sshukla@mvista.com \
--cc=dsmith@redhat.com \
--cc=fche@redhat.com \
--cc=jistone@redhat.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).