Skip to content

Commit bf1d2ee

Browse files
Bharath Vedarthamjrjohansen
authored andcommitted
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 <[email protected]> Signed-off-by: John Johansen <[email protected]>
1 parent 058c4f3 commit bf1d2ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/apparmor/lsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ static int param_set_mode(const char *val, const struct kernel_param *kp)
15761576
*/
15771577
static int __init set_init_ctx(void)
15781578
{
1579-
struct cred *cred = (struct cred *)current->real_cred;
1579+
struct cred *cred = (__force struct cred *)current->real_cred;
15801580

15811581
set_cred_label(cred, aa_get_label(ns_unconfined(root_ns)));
15821582

0 commit comments

Comments
 (0)