# Re: \[PATCH v5 2/3\] mm/mempolicy: add set\_mempolicy\_home\_node syscall

- From: Andrew Morton \<akpm@linux-foundation.org\>
- Date: 2021-12-01 03:00:57 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2021/12/6512650
- Thread: https://ratatoskr.run/linux-mm/2021/11/6512449/t.md

```text
On Tue, 30 Nov 2021 14:29:02 +0530 "Aneesh Kumar K.V" [ref] wrote:

> > What's the thinking here?  The node can later be offlined and the
> > kernel takes no action to reset home nodes, so why not permit setting a
> > presently-offline node as the home node?  Checking here seems rather
> > arbitrary?
> 
> The node online check was needed to avoid accessing 
> uninitialised pgdat structure. Such an access can result in
> below crash

Oh.  This is unobvious from reading the code.  Which calls for a
comment, no?
```
