projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab92ebb
)
module: Annotate nested sleep in resolve_symbol()
author
Peter Zijlstra
<
[email protected]
>
Wed, 11 Feb 2015 04:31:13 +0000
(15:01 +1030)
committer
Rusty Russell
<
[email protected]
>
Wed, 11 Feb 2015 04:32:04 +0000
(15:02 +1030)
Because wait_event() loops are safe vs spurious wakeups we can allow the
occasional sleep -- which ends up being very similar.
Reported-by: Dave Jones <
[email protected]
>
Signed-off-by: Peter Zijlstra (Intel) <
[email protected]
>
Tested-by: Dave Jones <
[email protected]
>
Signed-off-by: Rusty Russell <
[email protected]
>
kernel/module.c
patch
|
blob
|
history
diff --git
a/kernel/module.c
b/kernel/module.c
index 2461370813b31e8a02a103af27579ca69357245b..d7a92682fba366605161a06ffb1b4f8790b00e56 100644
(file)
--- a/
kernel/module.c
+++ b/
kernel/module.c
@@
-1225,6
+1225,12
@@
static const struct kernel_symbol *resolve_symbol(struct module *mod,
const unsigned long *crc;
int err;
+ /*
+ * The module_mutex should not be a heavily contended lock;
+ * if we get the occasional sleep here, we'll go an extra iteration
+ * in the wait_event_interruptible(), which is harmless.
+ */
+ sched_annotate_sleep();
mutex_lock(&module_mutex);
sym = find_symbol(name, &owner, &crc,
!(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)), true);