diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-02-10 23:31:13 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-10 23:32:04 -0500 |
commit | d64810f56147b53e92228c31442e925576314aa2 (patch) | |
tree | 9e9233d0ee22b58edb952cda75dc429d215f79bf /kernel | |
parent | ab92ebbb8e10d402f4fe73c6b3d85be72614f1fa (diff) |
module: Annotate nested sleep in resolve_symbol()
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 <davej@codemonkey.org.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 2461370813b3..d7a92682fba3 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1225,6 +1225,12 @@ static const struct kernel_symbol *resolve_symbol(struct module *mod, | |||
1225 | const unsigned long *crc; | 1225 | const unsigned long *crc; |
1226 | int err; | 1226 | int err; |
1227 | 1227 | ||
1228 | /* | ||
1229 | * The module_mutex should not be a heavily contended lock; | ||
1230 | * if we get the occasional sleep here, we'll go an extra iteration | ||
1231 | * in the wait_event_interruptible(), which is harmless. | ||
1232 | */ | ||
1233 | sched_annotate_sleep(); | ||
1228 | mutex_lock(&module_mutex); | 1234 | mutex_lock(&module_mutex); |
1229 | sym = find_symbol(name, &owner, &crc, | 1235 | sym = find_symbol(name, &owner, &crc, |
1230 | !(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)), true); | 1236 | !(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)), true); |