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]
Message-ID: <477c1b34-6acb-4e49-b9d4-f52d93597c90@redhat.com>
Date: Wed, 25 Jun 2025 17:34:45 +0200
From: David Hildenbrand <david@...hat.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 Oscar Salvador <osalvador@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
 Harry Yoo <harry.yoo@...cle.com>, Vlastimil Babka <vbabka@...e.cz>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2 next] mm,memory_hotplug: set failure reason in
 offline_pages()

On 25.06.25 17:32, Dan Carpenter wrote:
> The "reason" variable is uninitialized on this error path.  It's supposed
> to explain why the function failed.
> 
> Fixes: e4e2806b639c ("mm,memory_hotplug: implement numa node notifier")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> v2: I misunderstood the reason why the function was failing.  Use the
>      correct reason.
> 
>   mm/memory_hotplug.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 4d864b4fb891..e4009a44f883 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1977,8 +1977,10 @@ int offline_pages(unsigned long start_pfn, unsigned long nr_pages,
>   		node_arg.nid = node;
>   		ret = node_notify(NODE_REMOVING_LAST_MEMORY, &node_arg);
>   		ret = notifier_to_errno(ret);
> -		if (ret)
> +		if (ret) {
> +			reason = "node notifier failure";
>   			goto failed_removal_isolated;
> +		}
>   	}
>   
>   	ret = memory_notify(MEM_GOING_OFFLINE, &mem_arg);

Again, likely to be squashed :)

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ