public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Julien Panis <jpanis@baylibre•com>
Cc: "David S. Miller" <davem@davemloft•net>,
	"Eric Dumazet" <edumazet@google•com>,
	"Paolo Abeni" <pabeni@redhat•com>,
	"Russell King" <linux@armlinux•org.uk>,
	"Alexei Starovoitov" <ast@kernel•org>,
	"Daniel Borkmann" <daniel@iogearbox•net>,
	"Jesper Dangaard Brouer" <hawk@kernel•org>,
	"John Fastabend" <john.fastabend@gmail•com>,
	"Sumit Semwal" <sumit.semwal@linaro•org>,
	"Christian König" <christian.koenig@amd•com>,
	"Simon Horman" <horms@kernel•org>, "Andrew Lunn" <andrew@lunn•ch>,
	"Ratheesh Kannoth" <rkannoth@marvell•com>,
	"Naveen Mamindlapalli" <naveenm@marvell•com>,
	danishanwar@ti•com, yuehaibing@huawei•com, rogerq@kernel•org,
	netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
	bpf@vger•kernel.org, linux-media@vger•kernel.org,
	dri-devel@lists•freedesktop.org, linaro-mm-sig@lists•linaro.org
Subject: Re: [PATCH net-next v8 2/3] net: ethernet: ti: Add desc_infos member to struct k3_cppi_desc_pool
Date: Wed, 10 Apr 2024 06:24:11 -0700	[thread overview]
Message-ID: <20240410062411.1096c881@kernel.org> (raw)
In-Reply-To: <6f356fec-4384-4367-8812-a18b71156116@baylibre.com>

On Wed, 10 Apr 2024 10:36:16 +0200 Julien Panis wrote:
> Also, about mem alloc failures, shouldn't we free 'pool' on kstrdup_const()
> error at the beginning of k3_cppi_desc_pool_create_name() ?
> I mean, it's not visible in my patch but I now wonder if this was done
> properly even before I modify the file.

Yes, it uses managed memory (devm_*) but prueth (I didn't check other
callers) calls it from .ndo_open. So while not technically a full leak
we can accumulate infinite memory by repeatedly failing here :S

  reply	other threads:[~2024-04-10 13:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  9:38 [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver Julien Panis
2024-04-08  9:38 ` [PATCH net-next v8 1/3] net: ethernet: ti: Add accessors for struct k3_cppi_desc_pool members Julien Panis
2024-04-08  9:38 ` [PATCH net-next v8 2/3] net: ethernet: ti: Add desc_infos member to struct k3_cppi_desc_pool Julien Panis
2024-04-10  0:39   ` Jakub Kicinski
2024-04-10  8:36     ` Julien Panis
2024-04-10 13:24       ` Jakub Kicinski [this message]
2024-04-08  9:38 ` [PATCH net-next v8 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support Julien Panis
2024-04-10  0:49   ` Jakub Kicinski
2024-04-10 14:02     ` Julien Panis
2024-04-10 15:02       ` Jakub Kicinski
2024-04-12 13:56         ` Julien Panis
2024-04-09 23:51 ` [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver Jacob Keller
2024-04-12 14:01   ` Julien Panis
2024-04-12 23:38     ` Keller, Jacob E

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=20240410062411.1096c881@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=andrew@lunn$(echo .)ch \
    --cc=ast@kernel$(echo .)org \
    --cc=bpf@vger$(echo .)kernel.org \
    --cc=christian.koenig@amd$(echo .)com \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=danishanwar@ti$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dri-devel@lists$(echo .)freedesktop.org \
    --cc=edumazet@google$(echo .)com \
    --cc=hawk@kernel$(echo .)org \
    --cc=horms@kernel$(echo .)org \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=jpanis@baylibre$(echo .)com \
    --cc=linaro-mm-sig@lists$(echo .)linaro.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-media@vger$(echo .)kernel.org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=naveenm@marvell$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=rkannoth@marvell$(echo .)com \
    --cc=rogerq@kernel$(echo .)org \
    --cc=sumit.semwal@linaro$(echo .)org \
    --cc=yuehaibing@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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