This patch aim to solve the bug reported at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240687
As phrased in the PR:
It will inherit the default cpuset from the parent jail. However, once you've shrunk the set, you can never expand it. The reason is that the jail set is its own root, so the check against the 'root' mask in cpuset_modify() fails with EINVAL. I think this is perhaps not the intended behavior. I think that when setting the cpuset of a jail you want to apply the check against the parent jail's mask, not the jail's own mask.