Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/svr4 Feebly attempt to get this reference countin...



details:   https://anonhg.NetBSD.org/src/rev/91ec96c973e3
branches:  trunk
changeset: 825718:91ec96c973e3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Jul 28 17:43:46 2017 +0000

description:
Feebly attempt to get this reference counting less bad.

This svr4 streams code is bad and it should feel bad.

>From Ilja Van Sprundel.

diffstat:

 sys/compat/svr4/svr4_stream.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 65b54b5c4518 -r 91ec96c973e3 sys/compat/svr4/svr4_stream.c
--- a/sys/compat/svr4/svr4_stream.c     Fri Jul 28 17:38:35 2017 +0000
+++ b/sys/compat/svr4/svr4_stream.c     Fri Jul 28 17:43:46 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_stream.c,v 1.89 2017/07/28 16:55:48 riastradh Exp $        */
+/*     $NetBSD: svr4_stream.c,v 1.90 2017/07/28 17:43:46 riastradh Exp $        */
 
 /*-
  * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_stream.c,v 1.89 2017/07/28 16:55:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_stream.c,v 1.90 2017/07/28 17:43:46 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1507,10 +1507,12 @@
        switch (st->s_cmd = sc.cmd) {
        case SVR4_TI_CONNECT_REQUEST:   /* connect      */
                KERNEL_UNLOCK_ONE(NULL);
+               fd_putfile(SCARG(uap, fd));
                return do_sys_connect(l, SCARG(uap, fd), skp);
 
        case SVR4_TI_SENDTO_REQUEST:    /* sendto       */
                KERNEL_UNLOCK_ONE(NULL);
+               fd_putfile(SCARG(uap, fd));
                msg.msg_name = skp;
                msg.msg_namelen = skp->sa_len;
                msg.msg_iov = &aiov;



Home | Main Index | Thread Index | Old Index