netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subbaraya Sundeep <sbhatta@marvell.com>
To: Simon Horman <horms@kernel.org>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<sgoutham@marvell.com>, <lcherian@marvell.com>,
	<gakula@marvell.com>, <jerinj@marvell.com>, <hkelam@marvell.com>,
	<saikrishnag@marvell.com>, <netdev@vger.kernel.org>
Subject: Re: [net-next PATCH] octeontx2-af: Fix rvu_mbox_init return path
Date: Fri, 20 Jun 2025 11:14:43 +0000	[thread overview]
Message-ID: <aFVCoxgAnfH1aQ4x@48c69cc54dda> (raw)
In-Reply-To: <20250618194301.GA1699@horms.kernel.org>

On 2025-06-18 at 19:43:01, Simon Horman (horms@kernel.org) wrote:
> On Wed, Jun 18, 2025 at 07:27:16PM +0530, Subbaraya Sundeep wrote:
> > rvu_mbox_init function makes use of error path for
> > freeing memory which are local to the function in
> > both success and failure conditions. This is unusual hence
> > fix it by returning zero on success. With new cn20k code this
> > is freeing valid memory in success case also.
> > 
> > Fixes: e53ee4acb220 ("octeontx2-af: CN20k basic mbox operations and structures")
> > Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> Reviewed-by: Simon Horman <horms@kernel.org>
> 
> Although I don't think the problem is introduced by this patch
> with it applied Smatch notices that the following code, around line 2528,
> which jumps to free_regions does so with err uninitialised. This is a
> problem because the jump will result in the function returning err.

Thanks Simon for review. I will send fix for Smatch error in
separate patch later.

Sundeep
> 
> 	switch (type) {
> 	case TYPE_AFPF
> 	...
> 	default:
> 
> 		goto free_regions;
> 	}
> 
> ...

  reply	other threads:[~2025-06-20 11:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 13:57 [net-next PATCH] octeontx2-af: Fix rvu_mbox_init return path Subbaraya Sundeep
2025-06-18 19:43 ` Simon Horman
2025-06-20 11:14   ` Subbaraya Sundeep [this message]
2025-06-20 20:00     ` Simon Horman
2025-06-21 11:40 ` patchwork-bot+netdevbpf

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=aFVCoxgAnfH1aQ4x@48c69cc54dda \
    --to=sbhatta@marvell.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saikrishnag@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;
as well as URLs for NNTP newsgroup(s).