Re: [PATCH] mm,hwpoison: non-current task should be checked early_kill for force_early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 18 Jan 2021 10:24:23 +0100
Oscar Salvador <osalvador@xxxxxxx> wrote:

> 
> So, the scenario case is a multithread application with the same page mapped.
> And PF_MCE_KILL_EARLY flag was set.
> 
  The scenario is not related multithread application;
  it's about multiprocess application which share the same page

> IIUIC, Aili Yao concern is that when the MCE machinery calls memory_failure
> which MF_ACTION_REQUIRED, only the process that triggered the MCE exception
> will receive a SIGBUG, and not the other threads that might have PF_MCE_EARLY.
> Aili Yao would like memory_failure() to also signal those threads who might
> have the flag set, in case they want to do something with that information.
> 
 For the processes who care the memory with early flag set, they may specify one thread
to process related signal such as signal bus, when the flag set, the thread want to handle the error
gracefully and not kill the process all, and may do something more.

> But reading the code, I do not think that is what the code expects.
> Looking at the comment above find_early_kill_thread:
> 
> "/*
>  * Find a dedicated thread which is supposed to handle SIGBUS(BUS_MCEERR_AO)
>  * on behalf of the thread group. Return task_struct of the (first found)
>  * dedicated thread if found, and return NULL otherwise.
>  *
>  * We already hold read_lock(&tasklist_lock) in the caller, so we don't
>  * have to call rcu_read_lock/unlock() in this function.
>  */"
> 
> What I understand from that is:
> 
> "
>  If memory_failure() was not triggered by any concrete process (aka: no one was
>  trying to manipulate the corrupted area), we need to find the main thread who
>  might have set the MCE policy by pcrtl and see if they want to be signaled
>  __before__ they access the corrupted area.

yes, it doesn't just want to be killed all.  

Thanks
-- 
Best Regards!

Aili Yao




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux