guard page for stacks that grow upwards
[linux-2.6.git] / samples / hw_breakpoint / data_breakpoint.c
index c69cbe9..bd0f337 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/perf_event.h>
 #include <linux/hw_breakpoint.h>
 
-struct perf_event **sample_hbp;
+struct perf_event * __percpu *sample_hbp;
 
 static char ksym_name[KSYM_NAME_LEN] = "pid_max";
 module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO);
@@ -61,8 +61,8 @@ static int __init hw_break_module_init(void)
        attr.bp_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R;
 
        sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler);
-       if (IS_ERR(sample_hbp)) {
-               ret = PTR_ERR(sample_hbp);
+       if (IS_ERR((void __force *)sample_hbp)) {
+               ret = PTR_ERR((void __force *)sample_hbp);
                goto fail;
        }