Re: [v7, net-next 01/10] bng_en: make bnge_alloc_ring() self-unwind on failure
From: Simon Horman
Date: Thu Sep 18 2025 - 15:06:10 EST
On Thu, Sep 18, 2025 at 03:20:09PM +0530, Bhargava Chenna Marreddy wrote:
> On Tue, Sep 16, 2025 at 8:43 PM Simon Horman <horms@xxxxxxxxxx> wrote:
> >
> > On Fri, Sep 12, 2025 at 01:04:56AM +0530, Bhargava Marreddy wrote:
> > > Ensure bnge_alloc_ring() frees any intermediate allocations
> > > when it fails. This enables later patches to rely on this
> > > self-unwinding behavior.
> > >
> > > Signed-off-by: Bhargava Marreddy <bhargava.marreddy@xxxxxxxxxxxx>
> > > Reviewed-by: Vikas Gupta <vikas.gupta@xxxxxxxxxxxx>
> > > Reviewed-by: Rajashekar Hudumula <rajashekar.hudumula@xxxxxxxxxxxx>
> >
> > Without this patch(set), does the code correctly release resources on error?
> >
> > If not, I think this should be considered a fix for net with appropriate
> > Fixes tag(s).
>
> Thanks for your feedback, Simon. This patch doesn't introduce a fix;
> the code already frees resources correctly.
> Instead, it modifies error handling by changing from caller-unwind to
> self-unwind within this function
Thanks for the clarification.
In that case, this looks good to me.