mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
commit
0448873480
15 changed files with 106 additions and 40 deletions
|
|
@ -502,8 +502,11 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
|
|||
if (p == &net->ipv6.devconf_dflt->forwarding)
|
||||
return 0;
|
||||
|
||||
if (!rtnl_trylock())
|
||||
if (!rtnl_trylock()) {
|
||||
/* Restore the original values before restarting */
|
||||
*p = old;
|
||||
return restart_syscall();
|
||||
}
|
||||
|
||||
if (p == &net->ipv6.devconf_all->forwarding) {
|
||||
__s32 newf = net->ipv6.devconf_all->forwarding;
|
||||
|
|
@ -4042,12 +4045,15 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
|
|||
{
|
||||
int *valp = ctl->data;
|
||||
int val = *valp;
|
||||
loff_t pos = *ppos;
|
||||
int ret;
|
||||
|
||||
ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
|
||||
|
||||
if (write)
|
||||
ret = addrconf_fixup_forwarding(ctl, valp, val);
|
||||
if (ret)
|
||||
*ppos = pos;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -4089,8 +4095,11 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int old)
|
|||
if (p == &net->ipv6.devconf_dflt->disable_ipv6)
|
||||
return 0;
|
||||
|
||||
if (!rtnl_trylock())
|
||||
if (!rtnl_trylock()) {
|
||||
/* Restore the original values before restarting */
|
||||
*p = old;
|
||||
return restart_syscall();
|
||||
}
|
||||
|
||||
if (p == &net->ipv6.devconf_all->disable_ipv6) {
|
||||
__s32 newf = net->ipv6.devconf_all->disable_ipv6;
|
||||
|
|
@ -4109,12 +4118,15 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write,
|
|||
{
|
||||
int *valp = ctl->data;
|
||||
int val = *valp;
|
||||
loff_t pos = *ppos;
|
||||
int ret;
|
||||
|
||||
ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
|
||||
|
||||
if (write)
|
||||
ret = addrconf_disable_ipv6(ctl, valp, val);
|
||||
if (ret)
|
||||
*ppos = pos;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue