mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
Revert "Revert "mm/page_alloc: add __alloc_size attributes for better bounds checking""
This reverts commit 814f0e007f.
It was originally reverted due to test failures in cuttlefish. Those
failures were incorrectly traced to this commit, so this commit is safe
to bring back.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I56911bda03758aee3ce3d32c5fcb8fe094727189
This commit is contained in:
@@ -613,9 +613,9 @@ static inline struct folio *folio_alloc(gfp_t gfp, unsigned int order)
|
||||
extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
|
||||
extern unsigned long get_zeroed_page(gfp_t gfp_mask);
|
||||
|
||||
void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
|
||||
void *alloc_pages_exact(size_t size, gfp_t gfp_mask) __alloc_size(1);
|
||||
void free_pages_exact(void *virt, size_t size);
|
||||
void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
|
||||
__meminit void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) __alloc_size(1);
|
||||
|
||||
#define __get_free_page(gfp_mask) \
|
||||
__get_free_pages((gfp_mask), 0)
|
||||
|
||||
Reference in New Issue
Block a user