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] [day] [month] [year] [list]
Message-ID: <aD683wrmR12g5xB9@localhost.localdomain>
Date: Tue, 3 Jun 2025 11:14:07 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Honggyu Kim <honggyu.kim@...com>
Cc: Gregory Price <gourry@...rry.net>, kernel_team@...ynix.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Hildenbrand <david@...hat.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Vlastimil Babka <vbabka@...e.cz>,
	Hyeonggon Yoo <42.hyeyoo@...il.com>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Rakie Kim <rakie.kim@...com>, Harry Yoo <harry.yoo@...cle.com>,
	dan.carpenter@...aro.org
Subject: Re: [PATCH v3 2/3] mm,memory_hotplug: Implement numa node notifier

On Wed, May 28, 2025 at 11:23:53AM +0900, Honggyu Kim wrote:
> The 'err' of sysfs_wi_node_add() wasn't propagated to its caller before
> this change as discussed with David at the following.
> https://lore.kernel.org/198f2cbe-b1cb-4239-833e-9aac33d978fa@redhat.com
> 
> But as Gregory mentioned, we can pass 'err' now with this numa node notifier
> so for this hunk, shouldn't we add the following change on top of this?
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 3a7717e09506..3073ebd4e7ee 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -3792,7 +3792,7 @@ static int sysfs_wi_node_add(int nid)
>  static int wi_node_notifier(struct notifier_block *nb,
>                                unsigned long action, void *data)
>  {
> -       int err;
> +       int err = 0;
>         struct node_notify *arg = data;
>         int nid = arg->status_change_nid;
> 
> @@ -3811,7 +3811,7 @@ static int wi_node_notifier(struct notifier_block *nb,
>                 break;
>         }
> 
> -       return NOTIFY_OK;
> +       return notifier_from_errno(err);

I do not think so.
NODE_BECAME_MEM_AWARE is already too late to react.
We only tell the system that __now__ we are in this state, so there is
no rollback possible from this point forward.


-- 
Oscar Salvador
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ