dtrace: use the initial user namespace in suitable {from,make}_kuid() calls
There are several places in DTrace (mostly related to privileged or destructive
operations or unprivileged tracing) where we try to compare uids for equality,
thus need to convert them from or to kuid_ts so we can do that. We want to look
in the initial user namespace for this (since it is only in that namespace that
all uids on the system are unambiguous). We were doing this by passing a NULL
to from_kuid() / make_kuid(), but in the presence of CONFIG_USER_NS this results
in dereferencing a null pointer.
So acquire the initial user namespace from a temporary kernel-thread creds
structure, and use it in all such places.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Acked-by: Kris Van Hees <kris.van.hees@oracle.com>