summaryrefslogtreecommitdiffstats
path: root/module/spl/spl-proc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-12-18 17:02:27 -0800
committerBrian Behlendorf <[email protected]>2012-12-19 09:06:35 -0800
commit034f1b331e2c152e8e8954d715fa9a84f7b48d64 (patch)
treea7101b1b0e87624f60dc88ffa34c6993e6f31c23 /module/spl/spl-proc.c
parent30196bfd42567a9bc3fccac8650dc2cd9f0f7c0a (diff)
Fix spl_kmem_init_kallsyms_lookup() panic
Due to I/O buffering the helper may return successfully before the proc handler has a chance to execute. To catch this case wait up to 1 second to verify spl_kallsyms_lookup_name_fn was updated to a non SYMBOL_POISON value. Signed-off-by: Brian Behlendorf <[email protected]> Closes zfsonlinux/zfs#699 Closes zfsonlinux/zfs#859
Diffstat (limited to 'module/spl/spl-proc.c')
-rw-r--r--module/spl/spl-proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c
index 152abff7f..2fb295439 100644
--- a/module/spl/spl-proc.c
+++ b/module/spl/spl-proc.c
@@ -546,6 +546,8 @@ SPL_PROC_HANDLER(proc_dokallsyms_lookup_name)
spl_kallsyms_lookup_name_fn =
(kallsyms_lookup_name_t)simple_strtoul(str, &end, 16);
+ wake_up(&spl_kallsyms_lookup_name_waitq);
+
if (str == end)
SRETURN(-EINVAL);