Skip to content

Commit

Permalink
apparmor: don't check for vmalloc_addr if kvzalloc() failed
Browse files Browse the repository at this point in the history
Signed-off-by: John Johansen <john.johansen@canonical.com>
  • Loading branch information
John Johansen committed Jul 12, 2016
1 parent 1575617 commit 3197f5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions security/apparmor/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3197f5a

Please sign in to comment.