Module Name:    src
Committed By:   martin
Date:           Thu Aug 22 19:31:08 UTC 2024

Modified Files:
        src/sys/net [netbsd-10]: bpf.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #784):

        sys/net/bpf.c: revision 1.253

bpf: Mark bpfread_filtops FILTEROP_MPSAFE

Fix deadlock for non-NET_MPSAFE kernel, reported as
PR kern/58531 (thanks manu@ for test).

I've confirmed that there is no new regression for ATF with
any combination of -HEAD/netbsd-10 and default/NET_MPSAFE
rump kernels (aarch64).

Although, some problems have been reported on MP-safety for
bpf(4), PR kern/58596. But, it should take some time to fix.

At the moment, commit this part in advance.
OK ozaki-r@


To generate a diff of this commit:
cvs rdiff -u -r1.249.2.1 -r1.249.2.2 src/sys/net/bpf.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/net/bpf.c
diff -u src/sys/net/bpf.c:1.249.2.1 src/sys/net/bpf.c:1.249.2.2
--- src/sys/net/bpf.c:1.249.2.1	Fri Feb 24 13:10:53 2023
+++ src/sys/net/bpf.c	Thu Aug 22 19:31:08 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.249.2.1 2023/02/24 13:10:53 martin Exp $	*/
+/*	$NetBSD: bpf.c,v 1.249.2.2 2024/08/22 19:31:08 martin Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.249.2.1 2023/02/24 13:10:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.249.2.2 2024/08/22 19:31:08 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1611,7 +1611,7 @@ filt_bpfread(struct knote *kn, long hint
 }
 
 static const struct filterops bpfread_filtops = {
-	.f_flags = FILTEROP_ISFD,
+	.f_flags = FILTEROP_ISFD | FILTEROP_MPSAFE,
 	.f_attach = NULL,
 	.f_detach = filt_bpfrdetach,
 	.f_event = filt_bpfread,

Reply via email to