Subject: Re: linux-next: build warnings after merge of the akpm-current tree

From: Kees Cook <[email-masked]>
Date: Mon, 11 Oct 2021 10:46:32 -0700

On Mon, Oct 11, 2021 at 06:31:45PM +1100, Stephen Rothwell wrote:
> After merging the akpm-current tree, today's linux-next build (htmldocs)
> produced these warnings:
> 
> include/linux/slab.h:577: warning: Function parameter or member '1' not described in '__alloc_size'
> include/linux/slab.h:577: warning: expecting prototype for kmalloc(). Prototype was for __alloc_size() instead

Yay kerndoc. Thanks for catching this, and I realize Matthew Wilcox
predicted this earlier:
https://lore.kernel.org/lkml/[email-masked]/

I will get a fix sent.

-Kees

> include/linux/slab.h:623: warning: Function parameter or member '1' not described in '__alloc_size'
> include/linux/slab.h:623: warning: Function parameter or member '2' not described in '__alloc_size'
> include/linux/slab.h:623: warning: expecting prototype for kmalloc_array(). Prototype was for __alloc_size() instead
> include/linux/slab.h:644: warning: Function parameter or member '2' not described in '__alloc_size'
> include/linux/slab.h:644: warning: Function parameter or member '3' not described in '__alloc_size'
> include/linux/slab.h:644: warning: expecting prototype for krealloc_array(). Prototype was for __alloc_size() instead
> include/linux/slab.h:660: warning: Function parameter or member '1' not described in '__alloc_size'
> include/linux/slab.h:660: warning: Function parameter or member '2' not described in '__alloc_size'
> include/linux/slab.h:660: warning: expecting prototype for kcalloc(). Prototype was for __alloc_size() instead
> include/linux/slab.h:723: warning: Function parameter or member '1' not described in '__alloc_size'
> include/linux/slab.h:723: warning: expecting prototype for kzalloc(). Prototype was for __alloc_size() instead
> include/linux/slab.h:734: warning: Function parameter or member '1' not described in '__alloc_size'
> include/linux/slab.h:734: warning: expecting prototype for kzalloc_node(). Prototype was for __alloc_size() instead
> include/linux/slab.h:1: warning: no structured comments found
> 
> Introduced by commit
> 
>   04ba82afbbf3 ("slab: add __alloc_size attributes for better bounds checking")
> 
> -- 
> Cheers,
> Stephen Rothwell

-- 
Kees Cook