DragonFly BSD
DragonFly bugs List (threaded) for 2011-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1873] Panic upon usb mouse detach and reattaching


From: "Rumko \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Jan 2011 16:22:45 +0000

Rumko <rumcic@gmail.com> added the comment:

A workaround has been provided by sjg ... by commenting out knote_remove, the
panic will not occur but small amounts of memory will be leaked.

----------
status: unread -> chatting

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1873>
_____________________________________________________
From bcd1b4233bd313cfdc18c95ae99cb976052b76e1 Mon Sep 17 00:00:00 2001
From: Rumko <rumcic@gmail.com>
Date: Tue, 28 Dec 2010 14:09:38 +0100
Subject: [PATCH 1/2] devfs_core.c: workaround for issue1873

---
 sys/vfs/devfs/devfs_core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sys/vfs/devfs/devfs_core.c b/sys/vfs/devfs/devfs_core.c
index 052b86b..e950ac0 100644
--- a/sys/vfs/devfs/devfs_core.c
+++ b/sys/vfs/devfs/devfs_core.c
@@ -2303,9 +2303,15 @@ devfs_detached_filter_eof(struct knote *kn, long hint)
 static void
 devfs_detached_filter_detach(struct knote *kn)
 {
+#if 0
 	cdev_t dev = (cdev_t)kn->kn_hook;
 
 	knote_remove(&dev->si_kqinfo.ki_note, kn);
+#endif
+	devfs_debug(DEVFS_DEBUG_SHOW,
+		"Leaked %d due to missing knote_remove!\n",
+		sizeof(*kn));
+	print_backtrace(-1); /* XXX HACK - knote_remove -> panic */
 }
 
 static struct filterops devfs_detached_filterops =
-- 
1.7.3.5



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]