aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorJan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de>2016-08-01 13:41:37 +0200
committerMoyster <oysterized@gmail.com>2016-08-26 16:16:56 +0200
commit75cc0b48839a29a553bf6e6d131c08ffbc46ca3e (patch)
tree6c30954147b9d697a7cbfa435f04d6c75645297c /net/ipv4
parent83da961803a184316d128189acee4764b3739b7b (diff)
3.10.80 -> 3.10.81
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c4
-rw-r--r--net/ipv4/udp.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 577801102..52fceb025 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -873,6 +873,10 @@ static int ip_error(struct sk_buff *skb)
bool send;
int code;
+ /* IP on this device is disabled. */
+ if (!in_dev)
+ goto out;
+
net = dev_net(rt->dst.dev);
if (!IN_DEV_FORWARD(in_dev)) {
switch (rt->dst.error) {
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index dee369889..2c9443c02 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1334,10 +1334,8 @@ csum_copy_err:
}
unlock_sock_fast(sk, slow);
- if (noblock)
- return -EAGAIN;
-
- /* starting over for a new packet */
+ /* starting over for a new packet, but check if we need to yield */
+ cond_resched();
msg->msg_flags &= ~MSG_TRUNC;
goto try_again;
}