summaryrefslogtreecommitdiff
path: root/kernel/module/main.c
diff options
context:
space:
mode:
authorAaron Tomlin <atomlin@redhat.com>2022-05-02 21:51:04 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2022-05-12 10:29:41 -0700
commit6fb0538d0121ffab770a505b183968d93466ad59 (patch)
treee4d104d7f43375d7a2142d162644d2a68e12cd9d /kernel/module/main.c
parentc14e522bc76efed6e947cd0ab83a1fac7a7a3ec9 (diff)
downloadlinux-6fb0538d0121ffab770a505b183968d93466ad59.tar.gz
linux-6fb0538d0121ffab770a505b183968d93466ad59.tar.bz2
linux-6fb0538d0121ffab770a505b183968d93466ad59.zip
module: Move module_assert_mutex_or_preempt() to internal.h
No functional change. This patch migrates module_assert_mutex_or_preempt() to internal.h. So, the aforementiond function can be used outside of main/or core module code yet will remain restricted for internal use only. Signed-off-by: Aaron Tomlin <atomlin@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/main.c')
-rw-r--r--kernel/module/main.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 7dbdd098b995..7a0484900320 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -118,17 +118,6 @@ static void mod_update_bounds(struct module *mod)
#endif
}
-static void module_assert_mutex_or_preempt(void)
-{
-#ifdef CONFIG_LOCKDEP
- if (unlikely(!debug_locks))
- return;
-
- WARN_ON_ONCE(!rcu_read_lock_sched_held() &&
- !lockdep_is_held(&module_mutex));
-#endif
-}
-
/* Block module loading/unloading? */
int modules_disabled = 0;
core_param(nomodule, modules_disabled, bint, 0);