Re: [PATCH v3] kprobes, x86/alternatives: use text_mutex to protect smp_alt_modules

2017-11-01 Thread Steven Rostedt
On Wed, 1 Nov 2017 19:00:34 +0800 Zhou Chengming wrote: > diff --git a/kernel/extable.c b/kernel/extable.c > index 9aa1cc4..ec64cf5 100644 > --- a/kernel/extable.c > +++ b/kernel/extable.c > @@ -31,6 +31,8 @@ > * mutex protecting text section modification (dynamic code patching). > * some use

[PATCH v3] kprobes, x86/alternatives: use text_mutex to protect smp_alt_modules

2017-11-01 Thread Zhou Chengming
Changes: - Add a comment about text_mutex protecting this on x86. - Add a lockdep_assert_held() check. Fixes: 2cfa197 "ftrace/alternatives: Introducing *_text_reserved functions" We use alternatives_text_reserved() to check if the address is in the fixed pieces of alternative reserved, but the pr