Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/ipf/netinet Don't play with the linked list...
details: https://anonhg.NetBSD.org/src/rev/29d48642a2a2
branches: trunk
changeset: 820679:29d48642a2a2
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 13 15:17:00 2017 +0000
description:
Don't play with the linked list while holding only a read lock!
diffstat:
sys/external/bsd/ipf/netinet/ip_frag.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 16bcd2650c88 -r 29d48642a2a2 sys/external/bsd/ipf/netinet/ip_frag.c
--- a/sys/external/bsd/ipf/netinet/ip_frag.c Fri Jan 13 14:48:18 2017 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_frag.c Fri Jan 13 15:17:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_frag.c,v 1.3 2012/07/22 14:27:51 darrenr Exp $ */
+/* $NetBSD: ip_frag.c,v 1.4 2017/01/13 15:17:00 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -87,7 +87,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_frag.c,v 1.3 2012/07/22 14:27:51 darrenr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_frag.c,v 1.4 2017/01/13 15:17:00 christos Exp $");
#else
static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_frag.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -726,6 +726,8 @@
} else if (off == 0)
f->ipfr_seen0 = 1;
+#if 0
+ /* We can't do this, since we only have a read lock! */
if (f != table[idx]) {
ipfr_t **fp;
@@ -745,9 +747,10 @@
f->ipfr_hprev = table + idx;
table[idx] = f;
}
+#endif
/*
- * If we've follwed the fragments, and this is the
+ * If we've followed the fragments, and this is the
* last (in order), shrink expiration time.
*/
if (off == f->ipfr_off) {
Home |
Main Index |
Thread Index |
Old Index