Re: [PATCH v4 2/3] mm: handle poisoning of pfn without struct pages

Ankit Agrawal
2025-11-02T11:56:00Z

>> >> +static void add_to_kill_pfn(struct task_struct *tsk,
>> >> +                         struct vm_area_struct *vma,
>> >> +                         struct list_head *to_kill,
>> >> +                         unsigned long pfn)
>> >> +{
>> >> +     struct to_kill *tk;
>> >> +
>> >> +     tk = kmalloc(sizeof(*tk), GFP_ATOMIC);
>> >> +     if (!tk)
>> >> +             return;
>> >
>> > This is unfortunate.  GFP_ATOMIC is unreliable and we silently behave
>> > as if it worked OK.
>>
>> Got it. I'll mark this as a failure case.
>
> why do you need to batch all processes and kill them at once? Can you
> just kill one by one?

Hi Michal, I am trying to replicate what is being done today for non-PFNMAP
memory failure in __add_to_kill
(https://github.com/torvalds/linux/blob/master/mm/memory-failure.c#L376).
For this series, I am inclined to keep it uniform.