public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ratheesh Kannoth <rkannoth@marvell.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [net] octeontx2-af: Fix error handling
Date: Wed, 21 Jan 2026 08:10:25 +0530	[thread overview]
Message-ID: <aXA8mVKyRO3Ufm9N@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <20260120234951.1888325-1-kuba@kernel.org>

On 2026-01-21 at 05:19:51, Jakub Kicinski (kuba@kernel.org) wrote:
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
>
> For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
> ---
> octeontx2-af: Fix error handling
>
> This commit adds error handling and rollback logic to
> rvu_mbox_handler_attach_resources() to properly clean up partially
> attached resources when rvu_attach_block() fails.
>
> > +		err = rvu_attach_block(rvu, pcifunc, BLKTYPE_CPT,
> > +				       attach->cptlfs, attach);
> > +		if (err)
> > +			goto fail6;
> >  	}
> >
> > -exit:
> > +	return 0;
>                 ^^^^
>
> The success path returns here without calling mutex_unlock(). The mutex
> was acquired earlier via mutex_lock(&rvu->rsrc_lock) but the success
> path bypasses the unlock at fail1. Will this cause rvu->rsrc_lock to
> remain held after a successful attach, leading to a deadlock on the
> next call?
ACK.
>
> > +
> > +fail6:
>
> [ ... ]
>
> > +fail1:
> >  	mutex_unlock(&rvu->rsrc_lock);
> >  	return err;
> >  }
> --
> pw-bot: cr

      reply	other threads:[~2026-01-21  2:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20  2:40 [PATCH net] octeontx2-af: Fix error handling Ratheesh Kannoth
2026-01-20 23:49 ` [net] " Jakub Kicinski
2026-01-21  2:40   ` 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=aXA8mVKyRO3Ufm9N@rkannoth-OptiPlex-7090 \
    --to=rkannoth@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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