Module Name:    src
Committed By:   thorpej
Date:           Wed Sep 29 13:14:39 UTC 2021

Modified Files:
        src/sys/kern: tty.c tty_pty.c

Log Message:
ttyread_filtops, ttywrite_filtops, ptcread_filtops, and ptcwrite_filtops
are MPSAFE.


To generate a diff of this commit:
cvs rdiff -u -r1.297 -r1.298 src/sys/kern/tty.c
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/tty_pty.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/tty.c
diff -u src/sys/kern/tty.c:1.297 src/sys/kern/tty.c:1.298
--- src/sys/kern/tty.c:1.297	Mon Sep 27 00:40:49 2021
+++ src/sys/kern/tty.c	Wed Sep 29 13:14:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.297 2021/09/27 00:40:49 thorpej Exp $	*/
+/*	$NetBSD: tty.c,v 1.298 2021/09/29 13:14:39 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.297 2021/09/27 00:40:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.298 2021/09/29 13:14:39 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1517,14 +1517,14 @@ filt_ttywrite(struct knote *kn, long hin
 }
 
 static const struct filterops ttyread_filtops = {
-	.f_flags = FILTEROP_ISFD,
+	.f_flags = FILTEROP_ISFD | FILTEROP_MPSAFE,
 	.f_attach = NULL,
 	.f_detach = filt_ttyrdetach,
 	.f_event = filt_ttyread,
 };
 
 static const struct filterops ttywrite_filtops = {
-	.f_flags = FILTEROP_ISFD,
+	.f_flags = FILTEROP_ISFD | FILTEROP_MPSAFE,
 	.f_attach = NULL,
 	.f_detach = filt_ttywdetach,
 	.f_event = filt_ttywrite,

Index: src/sys/kern/tty_pty.c
diff -u src/sys/kern/tty_pty.c:1.147 src/sys/kern/tty_pty.c:1.148
--- src/sys/kern/tty_pty.c:1.147	Sun Sep 26 01:16:10 2021
+++ src/sys/kern/tty_pty.c	Wed Sep 29 13:14:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_pty.c,v 1.147 2021/09/26 01:16:10 thorpej Exp $	*/
+/*	$NetBSD: tty_pty.c,v 1.148 2021/09/29 13:14:39 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.147 2021/09/26 01:16:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.148 2021/09/29 13:14:39 thorpej Exp $");
 
 #include "opt_ptm.h"
 
@@ -1002,14 +1002,14 @@ filt_ptcwrite(struct knote *kn, long hin
 }
 
 static const struct filterops ptcread_filtops = {
-	.f_flags = FILTEROP_ISFD,
+	.f_flags = FILTEROP_ISFD | FILTEROP_MPSAFE,
 	.f_attach = NULL,
 	.f_detach = filt_ptcrdetach,
 	.f_event = filt_ptcread,
 };
 
 static const struct filterops ptcwrite_filtops = {
-	.f_flags = FILTEROP_ISFD,
+	.f_flags = FILTEROP_ISFD | FILTEROP_MPSAFE,
 	.f_attach = NULL,
 	.f_detach = filt_ptcwdetach,
 	.f_event = filt_ptcwrite,

Reply via email to