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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)));