x86/kgdb: Use IS_ERR_PCPU() macro
PATCH 1/1 x86/kgdb: Use IS_ERR_PCPU() macro
Use IS_ERR_PCPU() when checking the error pointer in the percpu address space. This macro adds intermediate cast to unsigned long when switching named address spaces.
The patch will avoid future build errors due to pointer address space mismatch with enabled strict percpu address space checks.
Signed-off-by Uros Bizjak <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
--- arch/x86/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/kgdb.c +1 -1
@@ -655,7 +655,7 @@ void kgdb_arch_late(void)if (breakinfo[i].pev)continue ; breakinfo[i].pev =register_wide_hw_breakpoint (&attr,NULL ,NULL ); -if (IS_ERR ((void *__force )breakinfo[i].pev)) { +if (IS_ERR_PCPU (breakinfo[i].pev)) {printk (KERN_ERR "kgdb: Could not allocate hw" "breakpoints\nDisabling the kernel debugger\n" ); breakinfo[i].pev =NULL ;
Signature · 1 line
2.46.1