Date: Mon, 18 Sep 2023 21:29:04 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 273418] [panic] Repeating kernel panic on open(/dev/console) Message-ID: <bug-273418-227-uB8HTgP2qR@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-273418-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273418 --- Comment #15 from Konstantin Belousov <kib@FreeBSD.org> --- No, checking at list addition or removal is to late. Problem is clearly that device is dereferenced while active, i.e. it sounds as if somebody did dev_rel() manually. So IMO the following assert is due, and it is indeed should be added to the tree: diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index c6efd0d421b1..f91e6e29b35d 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -175,6 +175,8 @@ devfs_free(struct cdev *cdev) struct cdev_priv *cdp; cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_ACTIVE) == 0, + ("cdev %p %s active and freed", cdp, cdev->si_name)); if (cdev->si_cred != NULL) crfree(cdev->si_cred); devfs_free_cdp_inode(cdp->cdp_inode); -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273418-227-uB8HTgP2qR>
