mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Apply a workaround for the unkillable jail problem where some devices created
within the jail are never freed. si_cred is only used by the MAC framework so make the cred reference conditional on it being compiled in, this is not a fix and will need to be reviewed for any new consumers of si_cred. This will quell some user complaint when using jails with a default kernel. Reviewed by: rwatson MFC after: 3 days
This commit is contained in:
parent
d3b28963dc
commit
22cf347586
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174280
@ -608,9 +608,11 @@ make_dev_credv(int flags, struct cdevsw *devsw, int minornr,
|
||||
}
|
||||
|
||||
dev->si_flags |= SI_NAMED;
|
||||
#ifdef MAC
|
||||
if (cr != NULL)
|
||||
dev->si_cred = crhold(cr);
|
||||
else
|
||||
#endif
|
||||
dev->si_cred = NULL;
|
||||
dev->si_uid = uid;
|
||||
dev->si_gid = gid;
|
||||
|
Loading…
Reference in New Issue
Block a user