Re: klp_task_patch: was: [RFC PATCH v2 17/18] livepatch: change to a per-task consistency model

From
Jiri Kosina <jikos@kernel.org>
Date
2016-05-04 14:56:36
Also in
linux-s390, lkml
Reply to
Petr Mladek, 2016-05-04
On Wed, 4 May 2016, Petr Mladek wrote:
quoted
+
+		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
Thread (118 messages) 118 messages, 12 authors, last reply 2016-06-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help