Re: [locking/lockdep] 383776fa75: INFO: trying to register non-static key.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 20, 2017 at 12:41:08PM +0100, Peter Zijlstra wrote:
> Subject: lockdep: Fix per-cpu static objects
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Date: Mon Mar 20 12:26:55 CET 2017
> 
> Since commit:
> 
>   383776fa7527 ("locking/lockdep: Handle statically initialized PER_CPU locks properly")
> 
> we try to collapse per-cpu locks into a single class by giving them
> all the same key. For this key we choose the canonical address of the
> per-cpu object, which would be the offset into the per-cpu area.
> 
> This has two problems:
> 
>  - there is a case where we run !0 lock->key through static_obj() and
>    expect this to pass; it doesn't for canonical pointers.
> 
>  - 0 is a valid canonical address.
> 
> Cure both issues by redefining the canonical address as the address of
> the per-cpu variable on the boot CPU.
> 
> Since I didn't want to rely on CPU0 being the boot-cpu, or even
> existing at all, track the boot CPU in a variable.
> 
> Fixes: 383776fa7527 ("locking/lockdep: Handle statically initialized PER_CPU locks properly")
> Reported-by: kernel test robot <fengguang.wu@xxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Tested-by: Borislav Petkov <bp@xxxxxxx>

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux