Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern compat70_ocreds_valid is not a pointer to a boolean...
details: https://anonhg.NetBSD.org/src/rev/eaebd4a2f0cd
branches: trunk
changeset: 449053:eaebd4a2f0cd
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Feb 20 09:59:39 2019 +0000
description:
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).
diffstat:
sys/kern/uipc_usrreq.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r 2564f6438201 -r eaebd4a2f0cd sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Wed Feb 20 09:50:09 2019 +0000
+++ b/sys/kern/uipc_usrreq.c Wed Feb 20 09:59:39 2019 +0000
@@ -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 @@
#include <sys/compat_stub.h>
#include <compat/sys/socket.h>
+#include <compat/net/route_70.h>
/*
* Unix communications domain.
@@ -208,7 +209,7 @@
return control;
}
-bool *compat70_ocreds_valid = false;
+bool compat70_ocreds_valid = false;
/*
* Initialize Unix protocols.
@@ -610,7 +611,7 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index