Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/206f47cc7a18
branches:  netbsd-6
changeset: 776504:206f47cc7a18
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Nov 25 08:26:33 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 5e676ec21230 -r 206f47cc7a18 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Mon Nov 25 08:23:31 2013 +0000
+++ b/sys/kern/uipc_socket.c    Mon Nov 25 08:26:33 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.209.2.3 2013/08/02 20:12:30 martin Exp $     */
+/*     $NetBSD: uipc_socket.c,v 1.209.2.4 2013/11/25 08:26:33 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.3 2013/08/02 20:12:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.4 2013/11/25 08:26:33 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