From: Jiri Slaby <jslaby@suse.cz>
To: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, Jiri Slaby <jslaby@suse.cz>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org
Subject: [PATCH 2/2] x86: text_poke, check if text_mutex is held
Date: Tue, 6 Oct 2015 14:29:38 +0200 [thread overview]
Message-ID: <1444134578-3790-2-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1444134578-3790-1-git-send-email-jslaby@suse.cz>
This is required by the function, su use lockdep (if available) to
check the dependency.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
---
arch/x86/kernel/alternative.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 25f909362b7a..3985c2517a93 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -693,6 +693,8 @@ void *text_poke(void *addr, const void *opcode, size_t len)
struct page *pages[2];
int i;
+ lockdep_assert_held(&text_mutex);
+
if (!core_kernel_text((unsigned long)addr)) {
pages[0] = vmalloc_to_page(addr);
pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
--
2.6.1
next prev parent reply other threads:[~2015-10-06 12:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 12:29 [PATCH 1/2] x86: dumpstack, use pr_cont Jiri Slaby
2015-10-06 12:29 ` Jiri Slaby [this message]
2015-10-06 16:00 ` Rasmus Villemoes
2015-10-06 16:16 ` Jiri Slaby
2015-10-06 21:05 ` [PATCH 1/2] linux/kconfig.h: generalize IS_ENABLED logic Rasmus Villemoes
2015-10-06 21:05 ` [PATCH 2/2] x86: dumpstack: eliminate some #ifdefs Rasmus Villemoes
2015-10-07 7:03 ` Ingo Molnar
2016-03-26 20:40 ` [PATCH] x86: dumpstack: combine some printks Rasmus Villemoes
2016-04-01 6:37 ` [tip:x86/debug] x86/dumpstack: Combine some printk()s tip-bot for Rasmus Villemoes
2015-10-07 6:57 ` [PATCH 1/2] linux/kconfig.h: generalize IS_ENABLED logic Ingo Molnar
2015-10-07 8:15 ` Michal Marek
2015-10-07 21:33 ` Rasmus Villemoes
2015-10-08 11:40 ` Michal Marek
2015-11-16 8:00 ` using IS_ENABLED(CONFIG_xyz) effectively Vineet Gupta
2015-11-16 8:28 ` Geert Uytterhoeven
2015-11-16 8:35 ` Vineet Gupta
2015-11-16 8:52 ` Arnd Bergmann
2015-11-16 10:03 ` Vineet Gupta
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=1444134578-3790-2-git-send-email-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 NNTP newsgroup(s).