From: Pavel Emelyanov <xemul@openvz.org>
To: Herbert Xu <herbert@gondor.apana.org.au>,
Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
bridge@lists.linux-foundation.org, devel@openvz.org
Subject: [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
Date: Tue, 27 Nov 2007 17:39:42 +0300 [thread overview]
Message-ID: <474C2C2E.7050001@openvz.org> (raw)
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;
}
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Emelyanov <xemul@openvz.org>
To: Herbert Xu <herbert@gondor.apana.org.au>,
Stephen Hemminger <shemminger@linux-foundation.org>
Cc: bridge@lists.linux-foundation.org,
Linux Netdev List <netdev@vger.kernel.org>,
devel@openvz.org
Subject: [PATCH][BRIDGE] Lost call to br_fdb_fini() in br_init() error path
Date: Tue, 27 Nov 2007 17:39:42 +0300 [thread overview]
Message-ID: <474C2C2E.7050001@openvz.org> (raw)
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;
}
next reply other threads:[~2007-11-27 14:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 14:39 Pavel Emelyanov [this message]
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-27 16:19 ` Stephen Hemminger
2007-11-29 12:45 ` Herbert Xu
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=474C2C2E.7050001@openvz.org \
--to=xemul@openvz.org \
--cc=bridge@lists.linux-foundation.org \
--cc=devel@openvz.org \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.