Module Name: src
Committed By: martin
Date: Sat May 12 10:29:08 UTC 2018
Modified Files:
src/sys/compat/linux/common [netbsd-8]: linux_socket.c
src/sys/compat/linux32/common [netbsd-8]: linux32_socket.c
Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #818):
sys/compat/linux/common/linux_socket.c: revision 1.142
sys/compat/linux32/common/linux32_socket.c: revision 1.29
Fix pserialize enter/exit pairs in linux_getifconf and linux32_getifconf
Tested by using a small linux program that uses ioctl(SIOCGIFCONF).
Probably fix PR kern/53259 as well.
To generate a diff of this commit:
cvs rdiff -u -r1.138.6.1 -r1.138.6.2 \
src/sys/compat/linux/common/linux_socket.c
cvs rdiff -u -r1.27.6.1 -r1.27.6.2 \
src/sys/compat/linux32/common/linux32_socket.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/compat/linux/common/linux_socket.c
diff -u src/sys/compat/linux/common/linux_socket.c:1.138.6.1 src/sys/compat/linux/common/linux_socket.c:1.138.6.2
--- src/sys/compat/linux/common/linux_socket.c:1.138.6.1 Thu Nov 30 15:57:37 2017
+++ src/sys/compat/linux/common/linux_socket.c Sat May 12 10:29:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.138.6.1 2017/11/30 15:57:37 martin Exp $ */
+/* $NetBSD: linux_socket.c,v 1.138.6.2 2018/05/12 10:29:08 martin Exp $ */
/*-
* Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.138.6.1 2017/11/30 15:57:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.138.6.2 2018/05/12 10:29:08 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1180,7 +1180,7 @@ linux_getifconf(struct lwp *l, register_
ifa_release(ifa, &psref_ifa);
}
- s = pserialize_read_enter();
+ KASSERT(pserialize_in_read_section());
if_release(ifp, &psref);
}
pserialize_read_exit(s);
Index: src/sys/compat/linux32/common/linux32_socket.c
diff -u src/sys/compat/linux32/common/linux32_socket.c:1.27.6.1 src/sys/compat/linux32/common/linux32_socket.c:1.27.6.2
--- src/sys/compat/linux32/common/linux32_socket.c:1.27.6.1 Thu Nov 30 15:57:36 2017
+++ src/sys/compat/linux32/common/linux32_socket.c Sat May 12 10:29:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_socket.c,v 1.27.6.1 2017/11/30 15:57:36 martin Exp $ */
+/* $NetBSD: linux32_socket.c,v 1.27.6.2 2018/05/12 10:29:08 martin Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.27.6.1 2017/11/30 15:57:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.27.6.2 2018/05/12 10:29:08 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -478,7 +478,7 @@ linux32_getifconf(struct lwp *l, registe
ifa_release(ifa, &psref_ifa);
}
- s = pserialize_read_enter();
+ KASSERT(pserialize_in_read_section());
if_release(ifp, &psref);
}
pserialize_read_exit(s);