Re: [PATCH v2] lockdep: report name and key when look_up_lock_class() got confused

From: Peter Zijlstra
Date: Mon Sep 19 2022 - 06:54:12 EST


On Mon, Sep 19, 2022 at 09:52:13AM +0900, Tetsuo Handa wrote:
> Printing this information will be helpful.
>
> ------------[ cut here ]------------
> Looking for class "l2tp_sock" with key l2tp_socket_class, but found a different class "slock-AF_INET6" with the same key
> WARNING: CPU: 1 PID: 14195 at kernel/locking/lockdep.c:940 look_up_lock_class+0xcc/0x140
> Modules linked in:
> CPU: 1 PID: 14195 Comm: a.out Not tainted 6.0.0-rc6-dirty #863
> Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
> RIP: 0010:look_up_lock_class+0xcc/0x140
>
> Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>

Urgh, you hitting that WARN enough times to want to improve it seems to
suggest your machine is quite sick.

Anyway, patch is ok I suppose.