aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/lsm.c
diff options
context:
space:
mode:
authorBharath Vedartham <linux.bhar@gmail.com>2019-04-23 22:23:00 +0530
committerJohn Johansen <john.johansen@canonical.com>2019-06-20 10:33:31 -0700
commitbf1d2ee7bc6215dd92427625a4c707227457a5db (patch)
tree41077de4a0aad29cce631c61879dbff1a3c81816 /security/apparmor/lsm.c
parentapparmor: fix spelling mistake "immutible" -> "immutable" (diff)
downloadlinux-dev-bf1d2ee7bc6215dd92427625a4c707227457a5db.tar.xz
linux-dev-bf1d2ee7bc6215dd92427625a4c707227457a5db.zip
apparmor: Force type-casting of current->real_cred
This patch fixes the sparse warning: warning: cast removes address space '<asn:4>' of expression. Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/lsm.c')
-rw-r--r--security/apparmor/lsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 502846789965..8f7ffc51ad86 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)));