Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix wrong usage of psref_held
details: https://anonhg.NetBSD.org/src/rev/cdc526ec343d
branches: trunk
changeset: 358357:cdc526ec343d
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Dec 25 04:41:48 2017 +0000
description:
Fix wrong usage of psref_held
We can't use it for checking if a caller does NOT hold a given target.
If you want to do it you should have psref_not_held or something.
diffstat:
sys/netinet/in.c | 6 +++---
sys/netinet6/in6.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 989f2179a4ab -r cdc526ec343d sys/netinet/in.c
--- a/sys/netinet/in.c Sun Dec 24 17:37:23 2017 +0000
+++ b/sys/netinet/in.c Mon Dec 25 04:41:48 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.211 2017/12/15 04:03:46 ozaki-r Exp $ */
+/* $NetBSD: in.c,v 1.212 2017/12/25 04:41:48 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.211 2017/12/15 04:03:46 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.212 2017/12/25 04:41:48 ozaki-r Exp $");
#include "arp.h"
@@ -845,7 +845,7 @@
struct in_ifaddr *ia = (void *) ifa;
struct ifnet *ifp = ifa->ifa_ifp;
- KASSERT(!ifa_held(ifa));
+ /* KASSERT(!ifa_held(ifa)); XXX need ifa_not_held (psref_not_held) */
ifa->ifa_flags |= IFA_DESTROYING;
in_scrubaddr(ia);
diff -r 989f2179a4ab -r cdc526ec343d sys/netinet6/in6.c
--- a/sys/netinet6/in6.c Sun Dec 24 17:37:23 2017 +0000
+++ b/sys/netinet6/in6.c Mon Dec 25 04:41:48 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6.c,v 1.255 2017/12/15 04:03:46 ozaki-r Exp $ */
+/* $NetBSD: in6.c,v 1.256 2017/12/25 04:41:49 ozaki-r Exp $ */
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.255 2017/12/15 04:03:46 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.256 2017/12/25 04:41:49 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1384,7 +1384,7 @@
struct in6_ifaddr *ia = (struct in6_ifaddr *) ifa;
struct in6_multi_mship *imm;
- KASSERT(!ifa_held(ifa));
+ /* KASSERT(!ifa_held(ifa)); XXX need ifa_not_held (psref_not_held) */
KASSERT(IFNET_LOCKED(ifp));
ifa->ifa_flags |= IFA_DESTROYING;
Home |
Main Index |
Thread Index |
Old Index