lkml.org 
[lkml]   [2015]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: lock-up with module: Optimize __module_address() using a latched RB-tree


Peter Zijlstra wrote on 08/07/15 18:34:
> On Wed, Jul 08, 2015 at 06:01:29PM +0930, Arthur Marsh wrote:
>>
>>
>> Peter Zijlstra wrote on 08/07/15 07:41:
>>> On Tue, Jul 07, 2015 at 11:56:20PM +0200, Peter Zijlstra wrote:
>>
>>> Could you try the below? It appears there was a spot freeing modules
>>> that forgot to take them out of the tree.
>>>
>>> If that fails, try and disable CONFIG_MODULE_UNLOAD.
>>
>> I tried the patch below, re-built and installed and booted the kernel and
>> saw:
>>
>> http://www.users.on.net/~arthur.marsh/20150708471.jpg
>> http://www.users.on.net/~arthur.marsh/20150708472.jpg
>
> Ah, that's a lockdep splat, caused by Mathieu's patch. Did the system
> boot otherwise?
>
> Maybe take that patch from Mathieu out again.
>

OK, I removed Mathieu's
0001-TESTING-add-spinlock-to-module.c-rb-latch-tree.patch
but left in the the patch Peter wrote:

---
kernel/module.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/module.c b/kernel/module.c
index 3e0e19763d24..4d2b82e610e2 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3557,6 +3557,7 @@ static int load_module(struct load_info *info,
const char __user *uargs,
mutex_lock(&module_mutex);
/* Unlink carefully: kallsyms could be walking list. */
list_del_rcu(&mod->list);
+ mod_tree_remove(mod);
wake_up_all(&module_wq);
/* Wait for RCU-sched synchronizing before releasing mod->list. */
synchronize_sched();
and disabled CONFIG_MODULE_UNLOAD and the resulting kernel booted fine.

I rebuilt again with CONFIG_MODULE_UNLOAD enabled and Peter's patch
above and the resulting kernel also booted fine.

Thanks for everyone's help!

Arthur.


\
 
 \ /
  Last update: 2015-07-08 14:01    [W:0.065 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site