diff options
| author | Vinicius Costa Gomes <[email protected]> | 2024-11-14 08:52:23 +0000 |
|---|---|---|
| committer | Amir Goldstein <[email protected]> | 2024-11-15 07:55:39 +0000 |
| commit | c5b28fc161c5402da2e10cc11637c2dff727ac23 (patch) | |
| tree | 06fc8b4a355cc63db9705792e814dc5892e2d626 /rust/helpers/security.c | |
| parent | ovl: pass an explicit reference of creators creds to callers (diff) | |
| download | kernel-c5b28fc161c5402da2e10cc11637c2dff727ac23.tar.gz kernel-c5b28fc161c5402da2e10cc11637c2dff727ac23.zip | |
ovl: Optimize override/revert creds
Use override_creds_light() in ovl_override_creds() and
revert_creds_light() in ovl_revert_creds().
The _light() functions do not change the 'usage' of the credentials in
question, as they refer to the credentials associated with the
mounter, which have a longer lifetime.
In ovl_setup_cred_for_create(), do not need to modify the mounter
credentials (returned by override_creds_light()) 'usage' counter.
Add a warning to verify that we are indeed working with the mounter
credentials (stored in the superblock). Failure in this assumption
means that creds may leak.
Suggested-by: Christian Brauner <[email protected]>
Signed-off-by: Vinicius Costa Gomes <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
Diffstat (limited to 'rust/helpers/security.c')
0 files changed, 0 insertions, 0 deletions
