Source-Changes-HG archive

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

[src/netbsd-6-0]: src/sys/kern Pull up following revision(s) (requested by sp...



details:   https://anonhg.NetBSD.org/src/rev/6fa8a22f9743
branches:  netbsd-6-0
changeset: 774884:6fa8a22f9743
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Nov 25 08:27:01 2013 +0000

description:
Pull up following revision(s) (requested by spz in ticket #988):
        sys/kern/uipc_socket.c: revision 1.220
PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL":
Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.

diffstat:

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

diffs (27 lines):

diff -r 7ed5e9459e5c -r 6fa8a22f9743 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Sun Nov 17 19:23:19 2013 +0000
+++ b/sys/kern/uipc_socket.c    Mon Nov 25 08:27:01 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.209.2.1.4.1 2013/08/02 20:23:11 martin Exp $ */
+/*     $NetBSD: uipc_socket.c,v 1.209.2.1.4.2 2013/11/25 08:27:01 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.1.4.1 2013/08/02 20:23:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.1.4.2 2013/11/25 08:27:01 bouyer Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_sock_counters.h"
@@ -416,7 +416,7 @@
                /* Normal users can only drop their own connections. */
                struct socket *so = (struct socket *)arg1;
 
-               if (proc_uidmatch(cred, so->so_cred) == 0)
+               if (so->so_cred && proc_uidmatch(cred, so->so_cred) == 0)
                        result = KAUTH_RESULT_ALLOW;
 
                break;



Home | Main Index | Thread Index | Old Index