All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	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: Thu, 13 Feb 2025 06:43:02 +0100	[thread overview]
Message-ID: <Z62GZkcQ5TnKBc2O@mev-dev.igk.intel.com> (raw)
In-Reply-To: <d6eaa268-e4ef-4d90-bb1e-37a7f546da93@stanley.mountain>

On Thu, Feb 13, 2025 at 08:26:09AM +0300, Dan Carpenter wrote:
> On Wed, Feb 12, 2025 at 05:59:01PM -0800, Jakub Kicinski wrote:
> > 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.
> 
> I want to resen this.  My scripts should have put a net-next in the
> subject and I think that changing:
> 
> -		return -ENOMEM;
> +		return vectors;
> 
> actually does fall within the scope of the patch so I want to change
> that as well.  There is no point in really breaking that into a separate
> patch from a practical perspective.

Thanks for fixing, I blindly followed scheme from idpf (there is the
same issue). However in ice it was done correctly before my patch.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

> 
> regards,
> dan carpenter

WARNING: multiple messages have this Message-ID (diff)
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	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: Thu, 13 Feb 2025 06:43:02 +0100	[thread overview]
Message-ID: <Z62GZkcQ5TnKBc2O@mev-dev.igk.intel.com> (raw)
In-Reply-To: <d6eaa268-e4ef-4d90-bb1e-37a7f546da93@stanley.mountain>

On Thu, Feb 13, 2025 at 08:26:09AM +0300, Dan Carpenter wrote:
> On Wed, Feb 12, 2025 at 05:59:01PM -0800, Jakub Kicinski wrote:
> > 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.
> 
> I want to resen this.  My scripts should have put a net-next in the
> subject and I think that changing:
> 
> -		return -ENOMEM;
> +		return vectors;
> 
> actually does fall within the scope of the patch so I want to change
> that as well.  There is no point in really breaking that into a separate
> patch from a practical perspective.

Thanks for fixing, I blindly followed scheme from idpf (there is the
same issue). However in ice it was done correctly before my patch.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

> 
> regards,
> dan carpenter

  reply	other threads:[~2025-02-13  5:46 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   ` [Intel-wired-lan] " Jakub Kicinski
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       ` Michal Swiatkowski [this message]
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=Z62GZkcQ5TnKBc2O@mev-dev.igk.intel.com \
    --to=michal.swiatkowski@linux.intel.com \
    --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=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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.