cred: Add a light version of override/revert_creds()
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Thu, 7 Nov 2024 00:57:17 +0000 (16:57 -0800)
committerAmir Goldstein <amir73il@gmail.com>
Mon, 11 Nov 2024 09:45:04 +0000 (10:45 +0100)
commit49dffdfde462c7823de6ed882f71ce233aaeba63
tree494b874da2804e7ec81ebd1433c1da5e6246c694
parent48b50624aec454ce0fa8f78ef96e2f43bc0be495
cred: Add a light version of override/revert_creds()

Add a light version of override/revert_creds(), this should only be
used when the credentials in question will outlive the critical
section and the critical section doesn't change the ->usage of the
credentials.

Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
include/linux/cred.h
kernel/cred.c