Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set the
current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT in devfs_ruleset_create(). PR: kern/125030 Submitted by: Mateusz Guzik
This commit is contained in:
parent
d381cdd7a8
commit
bb9ca91194
@ -742,6 +742,11 @@ devfs_ruleset_use(devfs_rsnum rsnum, struct devfs_mount *dm)
|
|||||||
devfs_ruleset_reap(cds);
|
devfs_ruleset_reap(cds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rsnum == 0) {
|
||||||
|
dm->dm_ruleset = 0;
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
ds = devfs_ruleset_bynum(rsnum);
|
ds = devfs_ruleset_bynum(rsnum);
|
||||||
if (ds == NULL)
|
if (ds == NULL)
|
||||||
ds = devfs_ruleset_create(rsnum);
|
ds = devfs_ruleset_create(rsnum);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user