lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Apr 2024 11:10:00 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, Rasmus Villemoes
 <linux@...musvillemoes.dk>, Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH v2 1/1] mm: page_alloc: Avoid defining unused function

On Tue, 23 Apr 2024 19:14:43 +0300 Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> In some configurations I got
> mm/page_alloc.c:656:20: warning: unused function 'add_to_free_list' [-Wunused-function]
> Becuase the only user is guarged with a certain ifdeffery,
> do the same for add_to_free_list().
> 
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -653,14 +653,6 @@ static inline void __add_to_free_list(struct page *page, struct zone *zone,
>  	area->nr_free++;
>  }
>  
> -static inline void add_to_free_list(struct page *page, struct zone *zone,
> -				    unsigned int order, int migratetype,
> -				    bool tail)
> -{
> -	__add_to_free_list(page, zone, order, migratetype, tail);
> -	account_freepages(zone, 1 << order, migratetype);
> -}
> -
>  /*
>   * Used for pages which are on another list. Move the pages to the tail
>   * of the list - so the moved pages won't immediately be considered for
> @@ -6776,6 +6768,14 @@ bool is_free_buddy_page(const struct page *page)
>  EXPORT_SYMBOL(is_free_buddy_page);
>  
>  #ifdef CONFIG_MEMORY_FAILURE
> +static inline void add_to_free_list(struct page *page, struct zone *zone,
> +				    unsigned int order, int migratetype,
> +				    bool tail)
> +{
> +	__add_to_free_list(page, zone, order, migratetype, tail);
> +	account_freepages(zone, 1 << order, migratetype);
> +}
> +
>  /*
>   * Break down a higher-order page in sub-pages, and keep our target out of
>   * buddy allocator.

Thanks, I'll queue this as a fix against "mm: page_alloc: consolidate
free page accounting".

Please do tell us the config when fixing these things.  That way I can
do a little bisect to ensure that I correctly identified the offending
patch.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ