lkml.org 
[lkml]   [2016]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model
On Wed, 4 May 2016, Petr Mladek wrote:

> > +
> > + if (unlikely(klp_patch_pending(current)))
> > + klp_patch_task(current);
> > }
>
> Some more ideas from the world of crazy races. I was shaking my head
> if this was safe or not.
>
> The problem might be if the task get rescheduled between the check
> for the pending stuff

The code in question is running with preemption disabled.

> or inside the klp_patch_task() function.

We must make sure that this function doesn't go to sleep. It's only used
to clear the task_struct flag anyway.

--
Jiri Kosina
SUSE Labs

\
 
 \ /
  Last update: 2016-05-04 17:21    [W:0.450 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site