All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	"Wojciech Drewek" <wojciech.drewek@intel.com>,
	<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme()
Date: Wed, 12 Feb 2025 17:59:01 -0800	[thread overview]
Message-ID: <20250212175901.11199ce1@kernel.org> (raw)
In-Reply-To: <f66b15a3-1d83-43f9-8af2-071b76b133c0@intel.com>

On Wed, 12 Feb 2025 17:46:54 +0100 Alexander Lobakin wrote:
> > [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme()  
> 
> I believe it should be "PATCH net" with
> 
> > If pci_alloc_irq_vectors() can't allocate the minimum number of vectors
> > then it returns -ENOSPC so there is no need to check for that in the
> > caller.  In fact, because pf->msix.min is an unsigned int, it means that
> > any negative error codes are type promoted to high positive values and
> > treated as success.  So here the "return -ENOMEM;" is unreachable code.
> > Check for negatives instead.
> > 
> > Fixes: 79d97b8cf9a8 ("ice: remove splitting MSI-X between features")  
> 
> a 'Stable:' tag here.

Bug only exists in net-next if it comes from commit under Fixes.
So I think the patch is good as is.

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	"Wojciech Drewek" <wojciech.drewek@intel.com>,
	<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme()
Date: Wed, 12 Feb 2025 17:59:01 -0800	[thread overview]
Message-ID: <20250212175901.11199ce1@kernel.org> (raw)
In-Reply-To: <f66b15a3-1d83-43f9-8af2-071b76b133c0@intel.com>

On Wed, 12 Feb 2025 17:46:54 +0100 Alexander Lobakin wrote:
> > [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme()  
> 
> I believe it should be "PATCH net" with
> 
> > If pci_alloc_irq_vectors() can't allocate the minimum number of vectors
> > then it returns -ENOSPC so there is no need to check for that in the
> > caller.  In fact, because pf->msix.min is an unsigned int, it means that
> > any negative error codes are type promoted to high positive values and
> > treated as success.  So here the "return -ENOMEM;" is unreachable code.
> > Check for negatives instead.
> > 
> > Fixes: 79d97b8cf9a8 ("ice: remove splitting MSI-X between features")  
> 
> a 'Stable:' tag here.

Bug only exists in net-next if it comes from commit under Fixes.
So I think the patch is good as is.

  reply	other threads:[~2025-02-13  1:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 15:27 [Intel-wired-lan] [PATCH next] ice: Fix signedness bug in ice_init_interrupt_scheme() Dan Carpenter
2025-02-12 15:27 ` Dan Carpenter
2025-02-12 16:46 ` [Intel-wired-lan] " Alexander Lobakin
2025-02-12 16:46   ` Alexander Lobakin
2025-02-13  1:59   ` Jakub Kicinski [this message]
2025-02-13  1:59     ` Jakub Kicinski
2025-02-13  5:26     ` [Intel-wired-lan] " Dan Carpenter
2025-02-13  5:26       ` Dan Carpenter
2025-02-13  5:43       ` [Intel-wired-lan] " Michal Swiatkowski
2025-02-13  5:43         ` Michal Swiatkowski

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=20250212175901.11199ce1@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=wojciech.drewek@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.