Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/prg-localcount2]: src/sys/kern Import fix from HEAD for NULL deref
details: https://anonhg.NetBSD.org/src/rev/dca8bfb383cc
branches: prg-localcount2
changeset: 823544:dca8bfb383cc
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed May 17 01:42:17 2017 +0000
description:
Import fix from HEAD for NULL deref
diffstat:
sys/kern/kern_event.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r a10b045ee614 -r dca8bfb383cc sys/kern/kern_event.c
--- a/sys/kern/kern_event.c Sun May 14 13:02:35 2017 +0000
+++ b/sys/kern/kern_event.c Wed May 17 01:42:17 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_event.c,v 1.88.8.2 2017/05/11 02:58:40 pgoyette Exp $ */
+/* $NetBSD: kern_event.c,v 1.88.8.3 2017/05/17 01:42:17 pgoyette Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.88.8.2 2017/05/11 02:58:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.88.8.3 2017/05/17 01:42:17 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1020,9 +1020,10 @@
KERNEL_UNLOCK_ONE(NULL); /* XXXSMP */
if (error != 0) {
#ifdef DIAGNOSTIC
+
printf("%s: event not supported for file type"
- " %d (error %d)\n", __func__,
- ((file_t *)kn->kn_obj)->f_type, error);
+ " %d (error %d)\n", __func__, kn->kn_obj ?
+ ((file_t *)kn->kn_obj)->f_type : -1, error);
#endif
/* knote_detach() drops fdp->fd_lock */
knote_detach(kn, fdp, false);
Home |
Main Index |
Thread Index |
Old Index