Source-Changes-HG archive

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

[src/trunk]: src/sys/kern call accept_filter_init int setopt so that don't us...



details:   https://anonhg.NetBSD.org/src/rev/3f599fe1860f
branches:  trunk
changeset: 752993:3f599fe1860f
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 13 23:03:39 2010 +0000

description:
call accept_filter_init int setopt so that don't use an uninitialized lock
from the setsockopt path.

diffstat:

 sys/kern/uipc_accf.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r e2f0faa2e811 -r 3f599fe1860f sys/kern/uipc_accf.c
--- a/sys/kern/uipc_accf.c      Sat Mar 13 22:31:15 2010 +0000
+++ b/sys/kern/uipc_accf.c      Sat Mar 13 23:03:39 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_accf.c,v 1.10 2009/09/17 08:09:49 pooka Exp $     */
+/*     $NetBSD: uipc_accf.c,v 1.11 2010/03/13 23:03:39 christos Exp $  */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.10 2009/09/17 08:09:49 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_accf.c,v 1.11 2010/03/13 23:03:39 christos Exp $");
 
 #define ACCEPT_FILTER_MOD
 
@@ -288,6 +288,8 @@
        struct so_accf *newaf;
        int error;
 
+       accept_filter_init();
+
        if (sopt == NULL || sopt->sopt_size == 0) {
                solock(so);
                return accept_filt_clear(so);



Home | Main Index | Thread Index | Old Index