netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, saeedm@mellanox.com,
	michael.chan@broadcom.com, edwin.peer@broadcom.com,
	emil.s.tantilov@intel.com, alexander.h.duyck@linux.intel.com,
	jeffrey.t.kirsher@intel.com, tariqt@mellanox.com,
	mkubecek@suse.cz, Marek Szyprowski <m.szyprowski@samsung.com>,
	Chucheng Luo <luochucheng@vivo.com>
Subject: Re: [PATCH net-next 1/9] debugfs: make sure we can remove u32_array files cleanly
Date: Wed, 8 Jul 2020 09:22:00 +0200	[thread overview]
Message-ID: <20200708072200.GC353684@kroah.com> (raw)
In-Reply-To: <20200707212434.3244001-2-kuba@kernel.org>

On Tue, Jul 07, 2020 at 02:24:26PM -0700, Jakub Kicinski wrote:
> debugfs_create_u32_array() allocates a small structure to wrap
> the data and size information about the array. If users ever
> try to remove the file this leads to a leak since nothing ever
> frees this wrapper.
> 
> That said there are no upstream users of debugfs_create_u32_array()
> that'd remove a u32 array file (we only have one u32 array user in
> CMA), so there is no real bug here.
> 
> Make callers pass a wrapper they allocated. This way the lifetime
> management of the wrapper is on the caller, and we can avoid the
> potential leak in debugfs.
> 
> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CC: Marek Szyprowski <m.szyprowski@samsung.com>
> CC: Chucheng Luo <luochucheng@vivo.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

  reply	other threads:[~2020-07-08  7:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 21:24 [PATCH net-next 0/9] udp_tunnel: add NIC RX port offload infrastructure Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 1/9] debugfs: make sure we can remove u32_array files cleanly Jakub Kicinski
2020-07-08  7:22   ` Greg Kroah-Hartman [this message]
2020-07-07 21:24 ` [PATCH net-next 2/9] udp_tunnel: re-number the offload tunnel types Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 3/9] udp_tunnel: add central NIC RX port offload infrastructure Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 4/9] ethtool: add tunnel info interface Jakub Kicinski
2020-07-08 22:32   ` Michal Kubecek
2020-07-08 23:30     ` Jakub Kicinski
2020-07-09  0:03       ` Michal Kubecek
2020-07-07 21:24 ` [PATCH net-next 5/9] netdevsim: add UDP tunnel port offload support Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 6/9] selftests: net: add a test for UDP tunnel info infra Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 7/9] ixgbe: convert to new udp_tunnel_nic infra Jakub Kicinski
2020-07-08 17:00   ` Alexander Duyck
2020-07-08 21:25     ` Jakub Kicinski
2020-07-08 23:14       ` Alexander Duyck
2020-07-07 21:24 ` [PATCH net-next 8/9] bnxt: " Jakub Kicinski
2020-07-07 21:24 ` [PATCH net-next 9/9] mlx4: " Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200708072200.GC353684@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edwin.peer@broadcom.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=kuba@kernel.org \
    --cc=luochucheng@vivo.com \
    --cc=m.szyprowski@samsung.com \
    --cc=michael.chan@broadcom.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).