[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <66bffcb518fcb98d0c6e34fc9b6d11373e696b0d.1485514374.git.jslaby@suse.cz>
Date: Fri, 27 Jan 2017 11:55:49 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
John Johansen <john.johansen@...onical.com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 216/235] apparmor: don't check for vmalloc_addr if kvzalloc() failed
From: John Johansen <john.johansen@...onical.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 3197f5adf539a3ee6331f433a51483f8c842f890 upstream.
Signed-off-by: John Johansen <john.johansen@...onical.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
security/apparmor/match.c | 10 +++++-----
1 file 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);
--
2.11.0
Powered by blists - more mailing lists