]> git.proxmox.com Git - pve-kernel-3.10.0.git/blob - apparmor-04-remove-minimum-size-check-for-vmalloc.patch
update intel network drivers
[pve-kernel-3.10.0.git] / apparmor-04-remove-minimum-size-check-for-vmalloc.patch
1 From dfe4ac28be73833556756dca6771d4274a7f1157 Mon Sep 17 00:00:00 2001
2 From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
3 Date: Mon, 17 Jun 2013 21:25:08 +0900
4 Subject: apparmor: remove minimum size check for vmalloc()
5
6 This is a follow-up to commit b5b3ee6c "apparmor: no need to delay vfree()".
7
8 Since vmalloc() will do "size = PAGE_ALIGN(size);",
9 we don't need to check for "size >= sizeof(struct work_struct)".
10
11 Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
12 Signed-off-by: John Johansen <john.johansen@canonical.com>
13
14 diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c
15 index fcfe023..6968992 100644
16 --- a/security/apparmor/lib.c
17 +++ b/security/apparmor/lib.c
18 @@ -97,11 +97,6 @@ void *__aa_kvmalloc(size_t size, gfp_t flags)
19 if (size <= (16*PAGE_SIZE))
20 buffer = kmalloc(size, flags | GFP_NOIO | __GFP_NOWARN);
21 if (!buffer) {
22 - /* see kvfree for why size must be at least work_struct size
23 - * when allocated via vmalloc
24 - */
25 - if (size < sizeof(struct work_struct))
26 - size = sizeof(struct work_struct);
27 if (flags & __GFP_ZERO)
28 buffer = vzalloc(size);
29 else
30 --
31 cgit v0.10.2
32