From f4e317633cf27aa2c7127264a78897be1974b538 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Thu, 12 Nov 2009 01:39:06 -0800 Subject: [PATCH] --- yaml --- r: 170015 b: refs/heads/master c: 757010f026ab3044c594003e216d00a33ed95c56 h: refs/heads/master i: 170013: 221a61f9fd950990518028292b6b08bc0a0b2efa 170011: b07142ad8717a785a471666ab70f7567491ecb55 170007: 7d27e5459cb0ed43a556998bf4cdb3fda0b05183 169999: 065ee7e9f1ef8368f533c160c016b9ed851f7f80 169983: e3df3fc003619bb1dd302bc11a3f6d1e7a989efa v: v3 --- [refs] | 2 +- trunk/kernel/sysctl_binary.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 490156d82090..5af9e21038e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 63395b65972c07edce595c9cc8a983016738cdac +refs/heads/master: 757010f026ab3044c594003e216d00a33ed95c56 diff --git a/trunk/kernel/sysctl_binary.c b/trunk/kernel/sysctl_binary.c index 0cf60400542d..b75dbf40f573 100644 --- a/trunk/kernel/sysctl_binary.c +++ b/trunk/kernel/sysctl_binary.c @@ -1269,17 +1269,12 @@ static const struct bin_table *get_sysctl(const int *name, int nlen, char *path) for ( ; table->convert; table++) { int len = 0; - /* Use the well known sysctl number to proc name mapping */ - if (ctl_name == table->ctl_name) { - len = strlen(table->procname); - memcpy(path, table->procname, len); - } -#ifdef CONFIG_NET /* * For a wild card entry map from ifindex to network * device name. */ - else if (!table->ctl_name) { + if (!table->ctl_name) { +#ifdef CONFIG_NET struct net *net = current->nsproxy->net_ns; struct net_device *dev; dev = dev_get_by_index(net, ctl_name); @@ -1288,8 +1283,12 @@ static const struct bin_table *get_sysctl(const int *name, int nlen, char *path) memcpy(path, dev->name, len); dev_put(dev); } - } #endif + /* Use the well known sysctl number to proc name mapping */ + } else if (ctl_name == table->ctl_name) { + len = strlen(table->procname); + memcpy(path, table->procname, len); + } if (len) { path += len; if (table->child) {