Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/kern/uipc_socket.c,v retrieving revision 1.185 retrieving revision 1.186 diff -u -p -r1.185 -r1.186 --- src/sys/kern/uipc_socket.c 2009/01/21 06:59:29 1.185 +++ src/sys/kern/uipc_socket.c 2009/01/23 15:40:19 1.186 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.185 2009/01/21 06:59:29 yamt Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.186 2009/01/23 15:40:19 pooka Exp $ */ /*- * Copyright (c) 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.185 2009/01/21 06:59:29 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.186 2009/01/23 15:40:19 pooka Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -1692,8 +1692,10 @@ sosetopt1(struct socket *so, const struc case SO_ORCVTIMEO: { struct timeval50 otv; error = sockopt_get(sopt, &otv, sizeof(otv)); - if (error) + if (error) { + solock(so); break; + } timeval50_to_timeval(&otv, &tv); opt = opt == SO_OSNDTIMEO ? SO_SNDTIMEO : SO_RCVTIMEO; error = 0;