aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/devinet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 126bb911880f..3863c3a4223f 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1347,7 +1347,8 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
1347 struct net *net = ctl->extra2; 1347 struct net *net = ctl->extra2;
1348 1348
1349 if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) { 1349 if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) {
1350 rtnl_lock(); 1350 if (!rtnl_trylock())
1351 return restart_syscall();
1351 if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) { 1352 if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) {
1352 inet_forward_change(net); 1353 inet_forward_change(net);
1353 } else if (*valp) { 1354 } else if (*valp) {