Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add comments about D_MPSAFE to functions called as struc...
details: https://anonhg.NetBSD.org/src/rev/3c06c121c1ff
branches: trunk
changeset: 447805:3c06c121c1ff
user: knakahara <knakahara%NetBSD.org@localhost>
date: Thu Jan 24 09:33:03 2019 +0000
description:
Add comments about D_MPSAFE to functions called as struct linesw.l_ioctl.
diffstat:
sys/dev/bluetooth/bcsp.c | 10 ++++++++--
sys/dev/bluetooth/btuart.c | 10 ++++++++--
sys/dev/ir/irframe_tty.c | 10 ++++++++--
sys/net/if_sl.c | 10 ++++++++--
sys/net/if_strip.c | 10 ++++++++--
5 files changed, 40 insertions(+), 10 deletions(-)
diffs (155 lines):
diff -r fde27a881c54 -r 3c06c121c1ff sys/dev/bluetooth/bcsp.c
--- a/sys/dev/bluetooth/bcsp.c Thu Jan 24 09:31:09 2019 +0000
+++ b/sys/dev/bluetooth/bcsp.c Thu Jan 24 09:33:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcsp.c,v 1.30 2016/08/15 08:20:11 maxv Exp $ */
+/* $NetBSD: bcsp.c,v 1.31 2019/01/24 09:33:03 knakahara Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.30 2016/08/15 08:20:11 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.31 2019/01/24 09:33:03 knakahara Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -467,6 +467,12 @@
struct bcsp_softc *sc = tp->t_sc;
int error;
+ /*
+ * XXX
+ * This function can be called without KERNEL_LOCK when caller's
+ * struct cdevsw is set D_MPSAFE. Is KERNEL_LOCK required?
+ */
+
if (sc == NULL || tp != sc->sc_tp)
return EPASSTHROUGH;
diff -r fde27a881c54 -r 3c06c121c1ff sys/dev/bluetooth/btuart.c
--- a/sys/dev/bluetooth/btuart.c Thu Jan 24 09:31:09 2019 +0000
+++ b/sys/dev/bluetooth/btuart.c Thu Jan 24 09:33:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: btuart.c,v 1.28 2015/08/20 14:40:17 christos Exp $ */
+/* $NetBSD: btuart.c,v 1.29 2019/01/24 09:33:03 knakahara Exp $ */
/*-
* Copyright (c) 2006, 2007 KIYOHARA Takashi
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.28 2015/08/20 14:40:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.29 2019/01/24 09:33:03 knakahara Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -313,6 +313,12 @@
struct btuart_softc *sc = tp->t_sc;
int error;
+ /*
+ * XXX
+ * This function can be called without KERNEL_LOCK when caller's
+ * struct cdevsw is set D_MPSAFE. Is KERNEL_LOCK required?
+ */
+
if (sc == NULL || tp != sc->sc_tp)
return EPASSTHROUGH;
diff -r fde27a881c54 -r 3c06c121c1ff sys/dev/ir/irframe_tty.c
--- a/sys/dev/ir/irframe_tty.c Thu Jan 24 09:31:09 2019 +0000
+++ b/sys/dev/ir/irframe_tty.c Thu Jan 24 09:33:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irframe_tty.c,v 1.62 2017/10/25 08:12:38 maya Exp $ */
+/* $NetBSD: irframe_tty.c,v 1.63 2019/01/24 09:33:03 knakahara Exp $ */
/*
* TODO
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.62 2017/10/25 08:12:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.63 2019/01/24 09:33:03 knakahara Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -377,6 +377,12 @@
DPRINTF(("%s: tp=%p\n", __func__, tp));
+ /*
+ * XXX
+ * This function can be called without KERNEL_LOCK when caller's
+ * struct cdevsw is set D_MPSAFE. Is KERNEL_LOCK required?
+ */
+
if (sc == NULL || tp != sc->sc_tp)
return (EPASSTHROUGH);
diff -r fde27a881c54 -r 3c06c121c1ff sys/net/if_sl.c
--- a/sys/net/if_sl.c Thu Jan 24 09:31:09 2019 +0000
+++ b/sys/net/if_sl.c Thu Jan 24 09:33:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sl.c,v 1.130 2018/12/22 13:11:37 maxv Exp $ */
+/* $NetBSD: if_sl.c,v 1.131 2019/01/24 09:33:03 knakahara Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.130 2018/12/22 13:11:37 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.131 2019/01/24 09:33:03 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -443,6 +443,12 @@
{
struct sl_softc *sc = (struct sl_softc *)tp->t_sc;
+ /*
+ * XXX
+ * This function can be called without KERNEL_LOCK when caller's
+ * struct cdevsw is set D_MPSAFE. Is KERNEL_LOCK required?
+ */
+
switch (cmd) {
case SLIOCGUNIT:
*(int *)data = sc->sc_unit; /* XXX */
diff -r fde27a881c54 -r 3c06c121c1ff sys/net/if_strip.c
--- a/sys/net/if_strip.c Thu Jan 24 09:31:09 2019 +0000
+++ b/sys/net/if_strip.c Thu Jan 24 09:33:03 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_strip.c,v 1.111 2018/12/22 13:11:37 maxv Exp $ */
+/* $NetBSD: if_strip.c,v 1.112 2019/01/24 09:33:03 knakahara Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.111 2018/12/22 13:11:37 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.112 2019/01/24 09:33:03 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -640,6 +640,12 @@
{
struct strip_softc *sc = (struct strip_softc *)tp->t_sc;
+ /*
+ * XXX
+ * This function can be called without KERNEL_LOCK when caller's
+ * struct cdevsw is set D_MPSAFE. Is KERNEL_LOCK required?
+ */
+
switch (cmd) {
case SLIOCGUNIT:
*(int *)data = sc->sc_unit;
Home |
Main Index |
Thread Index |
Old Index