]> git.baikalelectronics.ru Git - kernel.git/commit
module: weaken locking assertion for oops path.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 28 Jul 2015 20:22:14 +0000 (05:52 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 28 Jul 2015 20:43:22 +0000 (06:13 +0930)
commit581bb292f582fe95a9b413334052a39d43ae647e
treea6e1fcef9810938b32af5079207143fe72bdbd5e
parent4e8c5c638f8c328fb55cc7b77a53688922975f84
module: weaken locking assertion for oops path.

We don't actually hold the module_mutex when calling find_module_all
from module_kallsyms_lookup_name: that's because it's used by the oops
code and we don't want to deadlock.

However, access to the list read-only is safe if preempt is disabled,
so we can weaken the assertion.  Keep a strong version for external
callers though.

Fixes: ac8207ad591f ("module: Sanitize RCU usage and locking")
Reported-by: He Kuang <hekuang@huawei.com>
Cc: stable@kernel.org
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c