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
This commit is contained in:
parent
b60ff8405f
commit
aeace3c33c
@ -185,6 +185,8 @@ devfs_destroy_cdevpriv(struct cdev_privdata *p)
|
||||
{
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user