projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faeed82
)
netpoll: use the net namespace of current process instead of init_net
author
Cong Wang
<
[email protected]
>
Sun, 27 Jan 2013 15:55:21 +0000
(15:55 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 28 Jan 2013 23:32:55 +0000
(18:32 -0500)
This will allow us to setup netconsole in a different namespace
rather than where init_net is.
Cc: Eric W. Biederman <
[email protected]
>
Cc: David S. Miller <
[email protected]
>
Signed-off-by: Cong Wang <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/netpoll.c
patch
|
blob
|
history
diff --git
a/net/core/netpoll.c
b/net/core/netpoll.c
index a6f39b6aeec090ab9d6905111011fc1dd77e33d7..331ccb90f9157e1c6aac6db1af4cc9ded362b1a2 100644
(file)
--- a/
net/core/netpoll.c
+++ b/
net/core/netpoll.c
@@
-1049,8
+1049,10
@@
int netpoll_setup(struct netpoll *np)
int err;
rtnl_lock();
- if (np->dev_name)
- ndev = __dev_get_by_name(&init_net, np->dev_name);
+ if (np->dev_name) {
+ struct net *net = current->nsproxy->net_ns;
+ ndev = __dev_get_by_name(net, np->dev_name);
+ }
if (!ndev) {
np_err(np, "%s doesn't exist, aborting\n", np->dev_name);
err = -ENODEV;