Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern soreceive(): do not ignore uiomove() error



details:   https://anonhg.NetBSD.org/src/rev/700254e565ef
branches:  trunk
changeset: 515152:700254e565ef
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Sep 17 18:59:29 2001 +0000

description:
soreceive(): do not ignore uiomove() error
Problem reported and fix provided by Aaro Koskinen in kern/11692.

diffstat:

 sys/kern/uipc_socket.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 59ac4469807d -r 700254e565ef sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Mon Sep 17 18:47:58 2001 +0000
+++ b/sys/kern/uipc_socket.c    Mon Sep 17 18:59:29 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.56 2001/04/13 23:30:10 thorpej Exp $ */
+/*     $NetBSD: uipc_socket.c,v 1.57 2001/09/17 18:59:29 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1990, 1993
@@ -736,6 +736,8 @@
                        splx(s);
                        error = uiomove(mtod(m, caddr_t) + moff, (int)len, uio);
                        s = splsoftnet();
+                       if (error)
+                               goto release;
                } else
                        uio->uio_resid -= len;
                if (len == m->m_len - moff) {



Home | Main Index | Thread Index | Old Index