mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Improve on POLA by populating DEVFS before doing devfs(8) rule ioctls.
PR: 60687 Spotted by: Colin Percival <cperciva@daemonology.net>
This commit is contained in:
parent
75d80d9541
commit
49e9fc0a0d
1 changed files with 5 additions and 0 deletions
|
|
@ -279,7 +279,12 @@ devfs_ioctl(ap)
|
|||
} */ *ap;
|
||||
{
|
||||
int error;
|
||||
struct devfs_mount *dmp;
|
||||
|
||||
dmp = VFSTODEVFS(ap->a_vp->v_mount);
|
||||
lockmgr(&dmp->dm_lock, LK_SHARED, 0, curthread);
|
||||
devfs_populate(dmp);
|
||||
lockmgr(&dmp->dm_lock, LK_RELEASE, 0, curthread);
|
||||
error = devfs_rules_ioctl(ap->a_vp->v_mount, ap->a_command, ap->a_data,
|
||||
ap->a_td);
|
||||
return (error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue