aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2016-06-15 02:57:55 -0400
committerJohn Johansen <john.johansen@canonical.com>2016-07-12 11:43:10 -0400
commit3197f5adf539a3ee6331f433a51483f8c842f890 (patch)
treec4b82e5abd4c5822e687c3c9b756da13c47df6d1
parent15756178c6a65b261a080e21af4766f59cafc112 (diff)
apparmor: don't check for vmalloc_addr if kvzalloc() failed
Signed-off-by: John Johansen <john.johansen@canonical.com>
-rw-r--r--security/apparmor/match.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/security/apparmor/match.c b/security/apparmor/match.c
index f9f57c626f54..32b72eb3d988 100644
--- a/security/apparmor/match.c
+++ b/security/apparmor/match.c
@@ -75,14 +75,14 @@ static struct table_header *unpack_table(char *blob, size_t bsize)
75 u32, be32_to_cpu); 75 u32, be32_to_cpu);
76 else 76 else
77 goto fail; 77 goto fail;
78 /* if table was vmalloced make sure the page tables are synced
79 * before it is used, as it goes live to all cpus.
80 */
81 if (is_vmalloc_addr(table))
82 vm_unmap_aliases();
78 } 83 }
79 84
80out: 85out:
81 /* if table was vmalloced make sure the page tables are synced
82 * before it is used, as it goes live to all cpus.
83 */
84 if (is_vmalloc_addr(table))
85 vm_unmap_aliases();
86 return table; 86 return table;
87fail: 87fail:
88 kvfree(table); 88 kvfree(table);