[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110506002218.246364506@clark.kroah.org>
Date: Thu, 05 May 2011 17:21:57 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Rémi Denis-Courmont
<remi.denis-courmont@...ia.com>
Subject: [132/143] Phonet: device notifier only runs on initial namespace
2.6.32-longterm review patch. If anyone has any objections, please let us know.
------------------
[bwh: This is only applicable to 2.6.32. Phonet was fixed upstream to
work with multiple net namespaces.]
This should really fix the OOPS when doing:
unshare(CLONE_NEWNET);
exit(0);
while the phonet module is loaded.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@...ia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
net/phonet/pn_dev.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -225,6 +225,9 @@ static int phonet_device_notify(struct n
{
struct net_device *dev = arg;
+ if (!net_eq(dev_net(dev), &init_net))
+ return 0;
+
switch (what) {
case NETDEV_REGISTER:
if (dev->type == ARPHRD_PHONET)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists