Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern PR/39918: ITOH Yasufumi: Replace KASSERT with conti...
details: https://anonhg.NetBSD.org/src/rev/15e13afaaa75
branches: trunk
changeset: 336428:15e13afaaa75
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 01 01:14:41 2015 +0000
description:
PR/39918: ITOH Yasufumi: Replace KASSERT with continue, since the file
descriptor can be closed since closef() does not pay attention to FDEFER.
XXX: Pullup-7
diffstat:
sys/kern/uipc_usrreq.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r f762eff93815 -r 15e13afaaa75 sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c Sun Mar 01 01:07:46 2015 +0000
+++ b/sys/kern/uipc_usrreq.c Sun Mar 01 01:14:41 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_usrreq.c,v 1.174 2015/02/28 21:42:01 rtr Exp $ */
+/* $NetBSD: uipc_usrreq.c,v 1.175 2015/03/01 01:14:41 christos Exp $ */
/*-
* Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.174 2015/02/28 21:42:01 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.175 2015/03/01 01:14:41 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1711,7 +1711,14 @@
if ((fp->f_flag & FDEFER) != 0) {
atomic_and_uint(&fp->f_flag, ~FDEFER);
unp_defer--;
- KASSERT(fp->f_count != 0);
+ if (fp->f_count == 0) {
+ /*
+ * XXX: closef() doesn't pay attention
+ * to FDEFER
+ */
+ mutex_exit(&fp->f_lock);
+ continue;
+ }
} else {
if (fp->f_count == 0 ||
(fp->f_flag & FMARK) != 0 ||
Home |
Main Index |
Thread Index |
Old Index