svn commit: r294204 - head/sys/fs/devfs
Konstantin Belousov
kib at FreeBSD.org
Sun Jan 17 08:34:36 UTC 2016
Author: kib
Date: Sun Jan 17 08:34:35 2016
New Revision: 294204
URL: https://svnweb.freebsd.org/changeset/base/294204
Log:
Assert that the linkage between struct cdev_privdata and and struct
file is consistent.
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Modified:
head/sys/fs/devfs/devfs_vnops.c
Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c Sun Jan 17 06:02:59 2016 (r294203)
+++ head/sys/fs/devfs/devfs_vnops.c Sun Jan 17 08:34:35 2016 (r294204)
@@ -185,6 +185,8 @@ devfs_destroy_cdevpriv(struct cdev_privd
{
mtx_assert(&cdevpriv_mtx, MA_OWNED);
+ KASSERT(p->cdpd_fp->f_cdevpriv == p,
+ ("devfs_destoy_cdevpriv %p != %p", p->cdpd_fp->f_cdevpriv, p));
p->cdpd_fp->f_cdevpriv = NULL;
LIST_REMOVE(p, cdpd_list);
mtx_unlock(&cdevpriv_mtx);
More information about the svn-src-head
mailing list