mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
percpu, module: implement and use is_kernel/module_percpu_address()
lockdep has custom code to check whether a pointer belongs to static percpu area which is somewhat broken. Implement proper is_kernel/module_percpu_address() and replace the custom code. On UP, percpu variables are regular static variables and can't be distinguished from them. Always return %false on UP. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@redhat.com>
This commit is contained in:
parent
259354deaa
commit
10fad5e46f
5 changed files with 77 additions and 16 deletions
|
@ -395,6 +395,7 @@ static inline int module_is_live(struct module *mod)
|
|||
struct module *__module_text_address(unsigned long addr);
|
||||
struct module *__module_address(unsigned long addr);
|
||||
bool is_module_address(unsigned long addr);
|
||||
bool is_module_percpu_address(unsigned long addr);
|
||||
bool is_module_text_address(unsigned long addr);
|
||||
|
||||
static inline int within_module_core(unsigned long addr, struct module *mod)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue