diff options
author | ja97890 <none@none> | 2006-03-23 01:46:08 -0800 |
---|---|---|
committer | ja97890 <none@none> | 2006-03-23 01:46:08 -0800 |
commit | 592d29ab7326015d0a5b56899a233e7f15dd4dff (patch) | |
tree | ce8fa90c562b1b42139afbdf6384fa21485ad058 /usr/src | |
parent | db5b637c3ad5d30e8f1abbe1c8ecdc74bc454bc0 (diff) | |
download | illumos-joyent-592d29ab7326015d0a5b56899a233e7f15dd4dff.tar.gz |
6398012 Interrupted reads on a Yosemite UDP endpoint can permanently fail to return newly received data.
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/inet/ip_impl.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/usr/src/uts/common/inet/ip_impl.h b/usr/src/uts/common/inet/ip_impl.h index dd8f1db3da..e5959c6ef9 100644 --- a/usr/src/uts/common/inet/ip_impl.h +++ b/usr/src/uts/common/inet/ip_impl.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -397,6 +396,13 @@ typedef struct ip_pdescinfo_s PDESCINFO_STRUCT(2) ip_pdescinfo_t; /* * These are used by the synchronous streams code in tcp and udp. + * When we set the flags for a wakeup from a synchronous stream we + * always set RSLEEP in sd_wakeq, even if we have a read thread waiting + * to do the io. This is in case the read thread gets interrupted + * before completing the io. The RSLEEP flag in sd_wakeq is used to + * indicate that there is data available at the synchronous barrier. + * The assumption is that subsequent functions calls through rwnext() + * will reset sd_wakeq appropriately. */ #define STR_WAKEUP_CLEAR(stp) { \ mutex_enter(&stp->sd_lock); \ @@ -409,9 +415,8 @@ typedef struct ip_pdescinfo_s PDESCINFO_STRUCT(2) ip_pdescinfo_t; if (stp->sd_flag & RSLEEP) { \ stp->sd_flag &= ~RSLEEP; \ cv_broadcast(&_RD(stp->sd_wrq)->q_wait); \ - } else { \ - stp->sd_wakeq |= RSLEEP; \ } \ + stp->sd_wakeq |= RSLEEP; \ mutex_exit(&stp->sd_lock); \ } |