diff options
| author | John Johansen <john.johansen@canonical.com> | 2016-06-15 09:57:55 +0300 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 11:51:26 +0200 |
| commit | 9d907897aa854bb9db41f737e53f20eec7eda918 (patch) | |
| tree | 08414c7c7648c3ea9977405aec8844c6f53f2f7c /security/apparmor | |
| parent | 03cea3de8a79ffab1e631d5e877bfa5f97042a31 (diff) | |
apparmor: don't check for vmalloc_addr if kvzalloc() failed
commit 3197f5adf539a3ee6331f433a51483f8c842f890 upstream.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'security/apparmor')
| -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 630f325b8..10d824bc3 100644 --- a/security/apparmor/match.c +++ b/security/apparmor/match.c @@ -73,14 +73,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); |
