1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/marvell/mvpp2
Greg Kroah-Hartman fe2c9c61f6 net: mvpp2: debugfs: fix memory leak when using debugfs_lookup()
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time.  Fix this up to be much
simpler logic and only create the root debugfs directory once when the
driver is first accessed.  That resolves the memory leak and makes
things more obvious as to what the intent is.

Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
Cc: stable <stable@kernel.org>
Fixes: 21da57a231 ("net: mvpp2: add a debugfs interface for the Header Parser")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-09-05 14:18:32 +01:00
..
Makefile net: mvpp2: ptp: add TAI support 2020-09-09 14:22:42 -07:00
mvpp2.h net: mvpp2: use .mac_select_pcs() interface 2021-12-16 10:37:13 +00:00
mvpp2_cls.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mvpp2_cls.h net: marvell: Fixed two spellings,controling to controlling and oen to one 2021-01-12 19:02:01 -08:00
mvpp2_debugfs.c net: mvpp2: debugfs: fix memory leak when using debugfs_lookup() 2022-09-05 14:18:32 +01:00
mvpp2_main.c net: mvpp2: fix typo in comment 2022-05-22 20:44:29 +01:00
mvpp2_prs.c ethernet: use eth_hw_addr_set() instead of ether_addr_copy() 2021-10-02 14:18:25 +01:00
mvpp2_prs.h net: mvpp2: Add parsing support for different IPv4 IHL values 2021-04-16 15:29:40 -07:00
mvpp2_tai.c net: mvpp2: ptp: add support for receive timestamping 2020-09-09 14:22:42 -07:00