]> git.baikalelectronics.ru Git - kernel.git/commit
mm/page_alloc: fix __alloc_size attribute for alloc_pages_exact_nid
authorThibaut Sautereau <thibaut.sautereau@ssi.gouv.fr>
Sat, 25 Dec 2021 05:12:51 +0000 (21:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Dec 2021 20:20:56 +0000 (12:20 -0800)
commitb28e79d8a94046403e8c3e96ddb9dde7dd560e08
tree488e6ef636209d2491847bc98eec9020c6193aeb
parentfc51fcbfaa393a8ea2d53b2eacaf6410d91a5abf
mm/page_alloc: fix __alloc_size attribute for alloc_pages_exact_nid

The second parameter of alloc_pages_exact_nid is the one indicating the
size of memory pointed by the returned pointer.

Link: https://lkml.kernel.org/r/YbjEgwhn4bGblp//@coeus
Fixes: 89c603b6c216 ("mm/page_alloc: add __alloc_size attributes for better bounds checking")
Signed-off-by: Thibaut Sautereau <thibaut.sautereau@ssi.gouv.fr>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Daniel Micay <danielmicay@gmail.com>
Cc: Levente Polyak <levente@leventepolyak.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/gfp.h