diff options
author | John Johansen <john.johansen@canonical.com> | 2016-06-15 08:57:55 +0200 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2016-07-12 17:43:10 +0200 |
commit | 3197f5adf539a3ee6331f433a51483f8c842f890 (patch) | |
tree | c4b82e5abd4c5822e687c3c9b756da13c47df6d1 /security/apparmor/match.c | |
parent | apparmor: add missing id bounds check on dfa verification (diff) | |
download | linux-3197f5adf539a3ee6331f433a51483f8c842f890.tar.xz linux-3197f5adf539a3ee6331f433a51483f8c842f890.zip |
apparmor: don't check for vmalloc_addr if kvzalloc() failed
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/match.c')
-rw-r--r-- | security/apparmor/match.c | 10 |
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) u32, be32_to_cpu); else goto fail; + /* if table was vmalloced make sure the page tables are synced + * before it is used, as it goes live to all cpus. + */ + if (is_vmalloc_addr(table)) + vm_unmap_aliases(); } out: - /* if table was vmalloced make sure the page tables are synced - * before it is used, as it goes live to all cpus. - */ - if (is_vmalloc_addr(table)) - vm_unmap_aliases(); return table; fail: kvfree(table); |