mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Жамбакиев Радий Рикардинович" <r.zhambakiev@prosoftsystems.ru>
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Denis Benato" <benato.denis96@gmail.com>,
	"Jacob Keller" <jacob.e.keller@intel.com>,
	"Petr Machata" <petrm@nvidia.com>,
	"Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH net 3/3] net: fealnx: allocate the card index from an IDA
Date: Thu, 24 Sep 2026 18:50:43 +0200	[thread overview]
Message-ID: <d5a25a0f-67a9-4431-9fa4-24e29730cb26@lunn.ch> (raw)
In-Reply-To: <20260924104231.110576-3-r.zhambakiev@prosoftsystems.ru>

On Thu, Sep 24, 2026 at 10:44:25AM +0000, Жамбакиев Радий Рикардинович wrote:
> From: Radiy Zhambakiev <r.zhambakiev@prosoftsystems.ru>
> 
> card_idx is a static counter that is incremented on every probe.
> It can overflow and wrap to a negative value, which then indexes
> options[] and full_duplex[] out of bounds. Large values also no
> longer fit in the 12-byte boardname[] buffer.

Seems very theoretical. For something which is never going to happen,
please keep it KISS:

	if (card_idx > 100000) {
      		dev_error(..., "Please stop doing that!");
		return -ENODEV;
	 }

    Andrew

---
pw-bot: cr

  reply	other threads:[~2026-09-24 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 10:44 [PATCH net 1/3] net: fealnx: fix teardown order in remove Жамбакиев Радий Рикардинович
2026-09-24 10:44 ` [PATCH net 2/3] net: fealnx: disable the PCI device on remove and probe failure Жамбакиев Радий Рикардинович
2026-09-24 21:52   ` Francois Romieu
2026-09-24 10:44 ` [PATCH net 3/3] net: fealnx: allocate the card index from an IDA Жамбакиев Радий Рикардинович
2026-09-24 16:50   ` Andrew Lunn [this message]
2026-09-24 16:43 ` [PATCH net 1/3] net: fealnx: fix teardown order in remove Andrew Lunn
2026-09-28 12:31   ` Жамбакиев Радий Рикардинович
2026-09-24 21:51 ` Francois Romieu
2026-09-28 12:32   ` Жамбакиев Радий Рикардинович
2026-09-30 22:37     ` Francois Romieu
2026-09-25 10:46 ` netdev-bot+sashiko
2026-09-28 13:08   ` Жамбакиев Радий Рикардинович

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=d5a25a0f-67a9-4431-9fa4-24e29730cb26@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=benato.denis96@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=r.zhambakiev@prosoftsystems.ru \
    --cc=stable@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.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

all inboxes | Powered by JetHome®