]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "net: mvpp2: debugfs: fix memory leak when using debugfs_lookup()"
authorSasha Levin <sashal@kernel.org>
Fri, 23 Sep 2022 23:47:36 +0000 (19:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:37:42 +0000 (10:37 +0200)
commit0d2e9f673e373ea68b124f8c49ec03126fb64249
treeb20df3ddfc0406de10cde3ba707cf00cabf9730a
parent9410969f3d77b1e549244651de0457b77e3dbe38
Revert "net: mvpp2: debugfs: fix memory leak when using debugfs_lookup()"

commit 2870d4b46c56f6e2d9b1a321b98203912cd3429e upstream.

This reverts commit 3ce48957b1db2ec8d8385878f70f88c3461712d1.

On Tue, Sep 13, 2022 at 05:48:58PM +0100, Russell King (Oracle) wrote:
>What happens if this is built as a module, and the module is loaded,
>binds (and creates the directory), then is removed, and then re-
>inserted?  Nothing removes the old directory, so doesn't
>debugfs_create_dir() fail, resulting in subsequent failure to add
>any subsequent debugfs entries?
>
>I don't think this patch should be backported to stable trees until
>this point is addressed.

Revert until a proper fix is available as the original behavior was
better.

Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: stable@kernel.org
Reported-by: Russell King <linux@armlinux.org.uk>
Fixes: 3ce48957b1db ("net: mvpp2: debugfs: fix memory leak when using debugfs_lookup()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220923234736.657413-1-sashal@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c