projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
058c4f3
)
apparmor: Force type-casting of current->real_cred
author
Bharath Vedartham
<linux.bhar@gmail.com>
Tue, 23 Apr 2019 16:53:00 +0000
(22:23 +0530)
committer
John Johansen
<john.johansen@canonical.com>
Thu, 20 Jun 2019 17:33:31 +0000
(10:33 -0700)
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>
security/apparmor/lsm.c
patch
|
blob
|
history
diff --git
a/security/apparmor/lsm.c
b/security/apparmor/lsm.c
index 502846789965a4d44b76cf16d9cbe34f02cf4d05..8f7ffc51ad86976d5c0033fd401e3464f9a22b92 100644
(file)
--- 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)));