Merge branch 'linux-linaro-lsk-v3.10' into linux-linaro-lsk-v3.10-android
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / udp.c
index 58c5dbd5fb945aa66720746ebcd4437855fa7dff..b6bcdbec6ce7305a185e461ee05b8e1d50cee2cb 100644 (file)
@@ -1294,10 +1294,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;
 }