From: Bharath Vedartham Date: Tue, 23 Apr 2019 16:53:00 +0000 (+0530) Subject: apparmor: Force type-casting of current->real_cred X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bf1d2ee7bc6215dd92427625a4c707227457a5db;p=linux.git apparmor: Force type-casting of current->real_cred This patch fixes the sparse warning: warning: cast removes address space '' of expression. Signed-off-by: Bharath Vedartham Signed-off-by: John Johansen --- diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 502846789965a..8f7ffc51ad869 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -1576,7 +1576,7 @@ static int param_set_mode(const char *val, const struct kernel_param *kp) */ static int __init set_init_ctx(void) { - struct cred *cred = (struct cred *)current->real_cred; + struct cred *cred = (__force struct cred *)current->real_cred; set_cred_label(cred, aa_get_label(ns_unconfined(root_ns)));