From: Jakub Kicinski <kuba@kernel.org>
To: Zilin Guan <zilin@seu.edu.cn>
Cc: horms@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, jianhao.xu@seu.edu.cn,
kory.maincent@bootlin.com, linux-kernel@vger.kernel.org,
marco.crivellari@suse.com, netdev@vger.kernel.org,
pabeni@redhat.com, vadim.fedorenko@linux.dev
Subject: Re: [PATCH net v3 0/3] net: liquidio: Fix memory leaks in setup_nic_devices()
Date: Tue, 27 Jan 2026 13:05:46 -0800 [thread overview]
Message-ID: <20260127130546.7f53b313@kernel.org> (raw)
In-Reply-To: <20260127151241.1144039-1-zilin@seu.edu.cn>
On Tue, 27 Jan 2026 15:12:38 +0000 Zilin Guan wrote:
> This series fixes memory leaks in the initialization paths of the
> NIC devices.
>
> Patch 1 fixes an off-by-one error in the PF cleanup loop. It ensures
> the current device index is cleaned up and correctly handles the
> post-loop devlink_alloc failure case.
>
> Patch 2 fixes the same off-by-one error in the VF cleanup loop.
>
> Patch 3 moves the initialization of oct->props[i].netdev before queue
> setup calls. This ensures that if queue setup fails, the cleanup function
> can find and free the allocated netdev. It also initializes lio->oct_dev
> early to prevent a crash in the cleanup path.
Coccicheck says:
drivers/net/ethernet/cavium/liquidio/lio_main.c:3769:8-9: WARNING: Unsigned expression compared with zero: i >= 0
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c:2215:8-9: WARNING: Unsigned expression compared with zero: i >= 0
--
pw-bot: cr
next prev parent reply other threads:[~2026-01-27 21:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 15:12 [PATCH net v3 0/3] net: liquidio: Fix memory leaks in setup_nic_devices() Zilin Guan
2026-01-27 15:12 ` [PATCH net v3 1/3] net: liquidio: Fix off-by-one error in PF setup_nic_devices() cleanup Zilin Guan
2026-01-27 16:51 ` Kory Maincent
2026-01-27 15:12 ` [PATCH net v3 2/3] net: liquidio: Fix off-by-one error in VF " Zilin Guan
2026-01-27 16:54 ` Kory Maincent
2026-01-27 15:12 ` [PATCH net v3 3/3] net: liquidio: Initialize netdev pointer before queue setup Zilin Guan
2026-01-27 17:04 ` Kory Maincent
2026-01-27 21:05 ` Jakub Kicinski [this message]
2026-01-28 4:20 ` [PATCH net v3 0/3] net: liquidio: Fix memory leaks in setup_nic_devices() Zilin Guan
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=20260127130546.7f53b313@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jianhao.xu@seu.edu.cn \
--cc=kory.maincent@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.crivellari@suse.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
--cc=zilin@seu.edu.cn \
/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