Re: [PATCH v2 2/6] debugfs: annotate debugfs handlers vs. removal with lockdep

From: Greg Kroah-Hartman
Date: Sat Nov 25 2023 - 09:48:43 EST


On Fri, Nov 24, 2023 at 05:25:25PM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> When you take a lock in a debugfs handler but also try
> to remove the debugfs file under that lock, things can
> deadlock since the removal has to wait for all users
> to finish.
>
> Add lockdep annotations in debugfs_file_get()/_put()
> to catch such issues.
>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>

Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>