Commit bf1d2ee7 authored by Bharath Vedartham's avatar Bharath Vedartham Committed by John Johansen

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: default avatarBharath Vedartham <linux.bhar@gmail.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 058c4f34
...@@ -1576,7 +1576,7 @@ static int param_set_mode(const char *val, const struct kernel_param *kp) ...@@ -1576,7 +1576,7 @@ static int param_set_mode(const char *val, const struct kernel_param *kp)
*/ */
static int __init set_init_ctx(void) 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))); set_cred_label(cred, aa_get_label(ns_unconfined(root_ns)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment