* [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
@ 2007-11-27 14:39 Pavel Emelyanov
2007-11-27 16:19 ` Stephen Hemminger
2007-11-29 12:45 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Pavel Emelyanov @ 2007-11-27 14:39 UTC (permalink / raw)
To: Herbert Xu, Stephen Hemminger; +Cc: bridge, Linux Netdev List, devel
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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
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
2007-11-29 12:45 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2007-11-27 16:19 UTC (permalink / raw)
To: Pavel Emelyanov; +Cc: Herbert Xu, bridge, Linux Netdev List, devel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
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
@ 2007-11-29 12:45 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2007-11-29 12:45 UTC (permalink / raw)
To: Pavel Emelyanov; +Cc: Stephen Hemminger, bridge, Linux Netdev List, devel
On Tue, Nov 27, 2007 at 05:39:42PM +0300, Pavel Emelyanov 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>
Patch applied to net-2.6. Thanks Pavel!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-29 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-11-29 12:45 ` Herbert Xu
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).