Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352052
b: refs/heads/master
c: 387ff91
h: refs/heads/master
v: v3
  • Loading branch information
Gao feng authored and David S. Miller committed Feb 4, 2013
1 parent 9363df1 commit 01db0b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4d343ea92bdce831f071d9706b2daf097e6d009
refs/heads/master: 387ff91184fc03e4b8c5818e8ef2928434bcee6d
7 changes: 5 additions & 2 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3612,6 +3612,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
struct ifslave k_sinfo;
struct ifslave __user *u_sinfo = NULL;
struct mii_ioctl_data *mii = NULL;
struct net *net;
int res = 0;

pr_debug("bond_ioctl: master=%s, cmd=%d\n", bond_dev->name, cmd);
Expand Down Expand Up @@ -3678,10 +3679,12 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
break;
}

if (!capable(CAP_NET_ADMIN))
net = dev_net(bond_dev);

if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
return -EPERM;

slave_dev = dev_get_by_name(dev_net(bond_dev), ifr->ifr_slave);
slave_dev = dev_get_by_name(net, ifr->ifr_slave);

pr_debug("slave_dev=%p:\n", slave_dev);

Expand Down

0 comments on commit 01db0b5

Please sign in to comment.