Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	bridge@lists.linux-foundation.org,
	Linux Netdev List <netdev@vger.kernel.org>,
	devel@openvz.org
Subject: Re: [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
Date: Tue, 27 Nov 2007 08:19:56 -0800	[thread overview]
Message-ID: <20071127081956.0dd3df4f@freepuppy.rosehill> (raw)
In-Reply-To: <474C2C2E.7050001@openvz.org>

On Tue, 27 Nov 2007 17:39:42 +0300
Pavel Emelyanov <xemul@openvz.org> wrote:

> In case the br_netfilter_init() (or any subsequent call) 
> fails, the br_fdb_fini() must be called to free the allocated
> in br_fdb_init() br_fdb_cache kmem cache.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
> ---
> 
> diff --git a/net/bridge/br.c b/net/bridge/br.c
> index 93867bb..a901828 100644
> --- a/net/bridge/br.c
> +++ b/net/bridge/br.c
> @@ -39,7 +39,7 @@ static int __init br_init(void)
>  
>  	err = br_fdb_init();
>  	if (err)
> -		goto err_out1;
> +		goto err_out;
>  
>  	err = br_netfilter_init();
>  	if (err)
> @@ -65,6 +65,8 @@ err_out3:
>  err_out2:
>  	br_netfilter_fini();
>  err_out1:
> +	br_fdb_fini();
> +err_out:
>  	llc_sap_put(br_stp_sap);
>  	return err;
>  }

Good catch, thanks I hope you didn't find this in live system.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

  reply	other threads:[~2007-11-27 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 14:39 [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path Pavel Emelyanov
2007-11-27 16:19 ` Stephen Hemminger [this message]
2007-11-29 12:45 ` Herbert Xu

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=20071127081956.0dd3df4f@freepuppy.rosehill \
    --to=shemminger@linux-foundation.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=devel@openvz.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.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