Module Name: src Committed By: pgoyette Date: Wed Feb 20 09:59:39 UTC 2019
Modified Files: src/sys/kern: uipc_usrreq.c Log Message: compat70_ocreds_valid is not a pointer to a boolean, it is the boolean itself which controls whether or not we recognize the OCRED options. Should fix the panic identified in PR kern/53991 (awaiting confirmation from submitter). To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/sys/kern/uipc_usrreq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.190 src/sys/kern/uipc_usrreq.c:1.191 --- src/sys/kern/uipc_usrreq.c:1.190 Mon Feb 4 10:11:34 2019 +++ src/sys/kern/uipc_usrreq.c Wed Feb 20 09:59:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_usrreq.c,v 1.190 2019/02/04 10:11:34 mrg Exp $ */ +/* $NetBSD: uipc_usrreq.c,v 1.191 2019/02/20 09:59:39 pgoyette Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.190 2019/02/04 10:11:34 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.191 2019/02/20 09:59:39 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -126,6 +126,7 @@ __KERNEL_RCSID(0, "$NetBSD: uipc_usrreq. #include <sys/compat_stub.h> #include <compat/sys/socket.h> +#include <compat/net/route_70.h> /* * Unix communications domain. @@ -208,7 +209,7 @@ struct mbuf * stub_compat_70_unp_addsock return control; } -bool *compat70_ocreds_valid = false; +bool compat70_ocreds_valid = false; /* * Initialize Unix protocols. @@ -610,7 +611,7 @@ uipc_ctloutput(int op, struct socket *so case PRCO_SETOPT: switch (sopt->sopt_name) { case LOCAL_OCREDS: - if (!*compat70_ocreds_valid) { + if (!compat70_ocreds_valid) { error = ENOPROTOOPT; break; } @@ -664,7 +665,7 @@ uipc_ctloutput(int op, struct socket *so error = sockopt_setint(sopt, optval); break; case LOCAL_OCREDS: - if (*compat70_ocreds_valid) { + if (compat70_ocreds_valid) { optval = OPTBIT(UNP_OWANTCRED); error = sockopt_setint(sopt, optval); break;