Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix a case where an erroneous EAGAIN was returned o...
details: https://anonhg.NetBSD.org/src/rev/708ee4df53ad
branches: trunk
changeset: 328564:708ee4df53ad
user: seanb <seanb%NetBSD.org@localhost>
date: Mon Apr 07 15:35:23 2014 +0000
description:
Fix a case where an erroneous EAGAIN was returned out of recvmmsg.
This occured when some, but not all of the mmsg array members
were filled with data from a non-blocking socket.
PR kern/48725
diffstat:
sys/kern/uipc_syscalls.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 2910111a3bc0 -r 708ee4df53ad sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Mon Apr 07 15:09:20 2014 +0000
+++ b/sys/kern/uipc_syscalls.c Mon Apr 07 15:35:23 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.165 2013/10/09 20:15:39 christos Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.166 2014/04/07 15:35:23 seanb Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.165 2013/10/09 20:15:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.166 2014/04/07 15:35:23 seanb Exp $");
#include "opt_pipe.h"
@@ -1058,8 +1058,11 @@
error = do_sys_recvmsg_so(l, s, so, msg, &from,
msg->msg_control != NULL ? &control : NULL, retval);
- if (error)
+ if (error) {
+ if (error == EAGAIN && dg > 0)
+ error = 0;
break;
+ }
if (msg->msg_control != NULL)
error = copyout_msg_control(l, msg, control);
Home |
Main Index |
Thread Index |
Old Index