Netdev List
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Yuho Choi <dbgh9129@gmail.com>,
	Sunil Goutham <sgoutham@marvell.com>,
	"Linu Cherian" <lcherian@marvell.com>,
	Geetha sowjanya <gakula@marvell.com>,
	hariprasad <hkelam@marvell.com>,
	Subbaraya Sundeep <sbhatta@marvell.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <nshettyj@marvell.com>
Subject: Re: [PATCH net-next v2] octeontx2-af: Fix PCI device reference leaks in debugfs
Date: Fri, 12 Jun 2026 07:19:04 +0530	[thread overview]
Message-ID: <aitlkIiQnud9L0vP@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260611104547.22cedb69@kernel.org>

On 2026-06-11 at 23:15:47, Jakub Kicinski (kuba@kernel.org) wrote:
> On Thu, 11 Jun 2026 07:51:08 +0530 Ratheesh Kannoth wrote:
> > > Review question sort of based on a Sashiko comment - this is part of
> > > the rvu device driver, AFAIU, does anything prevent the AF from getting
> > > removed (via sysfs for instance) while this code is using its priv?
> >
> > RVU AF driver's teardown sequence prevents the race here. In
> > rvu_remove(), the very first call is rvu_dbg_exit(rvu),
> > which calls debugfs_remove_recursive() on the debugfs root.
> > ASFAIK, debugfs_remove_recursive() will block until all active
> > readers (i.e., any in-progress seq_file read callbacks like
> > cgx_print_stats(), cgx_print_dmac_flt(), and
> > cgx_print_fwdata()) have completed before the removal
> > proceeds. Only after rvu_dbg_exit() returns does
> > rvu_remove() proceed to free the rvu structure.
> >
> > A better approach would be to pass the rvu object(rvu structure has pdev field) while
> > creating the debugfs file itself, e.g.:
> >
> >   RVU_DEBUG_SEQ_FOPS(cgx_dmac_flt, cgx_dmac_flt_display, s/NULL/rvu);
> >
> > This would eliminate the pci_get_device() lookup entirely. We
> > will post this as a code clean-up patch to net-next.
>
> Oh, that's much better, somehow I assumed that this dance is necessary
> because we are accessing a different PCI device.
>
> Also, since you're actively working upstream and nobody else on the CC
> list responded - should you perhaps be added to maintainers for this
> driver so that you're CCed on patches?  (instead of one of the useless
> ones)

Thank you for the feedback, and I would be glad to be added to the
MAINTAINERS file for the RVU driver to help with reviews and tracking
moving forward.

Regarding the review coverage from our side, a few of
listed maintainers have transitioned out of the organization, and the
remaining team members have been tightly coupled with some critical internal
deliverables recently. However, we absolutely recognize the importance of
consistent upstream engagement. Moving forward, we are aligning our
internal focus to ensure we actively participate in review cycles and
maintain a steady presence on the list.

I will prepare and submit a formal patch to update the MAINTAINERS file.

Regarding the code cleanup discussed above, we will get the net-next patch
ready to replace the pci_get_device() lookup with the direct rvu context
pass.

Thanks again for your guidance and support.

      parent reply	other threads:[~2026-06-12  1:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 16:55 [PATCH net-next v2] octeontx2-af: Fix PCI device reference leaks in debugfs Yuho Choi
2026-06-10 15:35 ` Jakub Kicinski
2026-06-11  2:21   ` Ratheesh Kannoth
2026-06-11 17:45     ` Jakub Kicinski
2026-06-11 19:03       ` 최유호
2026-06-12  1:58         ` Ratheesh Kannoth
2026-06-12 15:35           ` 최유호
2026-06-12  1:49       ` Ratheesh Kannoth [this message]

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=aitlkIiQnud9L0vP@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dbgh9129@gmail.com \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nshettyj@marvell.com \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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