mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix "vrefact: wrong use count 0" with DRM
Bump the vnode use count, not its hold count. This fixes a panic triggered by fstatat(..., AT_EMPTY_PATH) on DRM device nodes, which happens to be what glxinfo(1) from Ubuntu Jammy is doing. PR: kern/274538 Reviewed By: kib (earlier version), olce Differential Revision: https://reviews.freebsd.org/D47391
This commit is contained in:
parent
aa5d3dec9d
commit
fc595a6b76
1 changed files with 2 additions and 2 deletions
|
|
@ -772,7 +772,7 @@ linux_dev_fdopen(struct cdev *dev, int fflags, struct thread *td,
|
|||
}
|
||||
|
||||
/* hold on to the vnode - used for fstat() */
|
||||
vhold(filp->f_vnode);
|
||||
vref(filp->f_vnode);
|
||||
|
||||
/* release the file from devfs */
|
||||
finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
|
||||
|
|
@ -1504,7 +1504,7 @@ linux_file_close(struct file *file, struct thread *td)
|
|||
error = -OPW(file, td, release(filp->f_vnode, filp));
|
||||
funsetown(&filp->f_sigio);
|
||||
if (filp->f_vnode != NULL)
|
||||
vdrop(filp->f_vnode);
|
||||
vrele(filp->f_vnode);
|
||||
linux_drop_fop(ldev);
|
||||
ldev = filp->f_cdev;
|
||||
if (ldev != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue