[Devel] Re: Linux Checkpoint-Restart - v19

Jiro SEKIBA jir at dependable-os.net
Wed Apr 7 06:08:45 PDT 2010


Hi!

On 2010/04/07, at 6:49, Nathan Lynch wrote:

> Hello-
> 
> On Tue, 2010-04-06 at 11:54 +0900, Jiro SEKIBA wrote:
>> I tried checkpointing/restarting with this binary, but still get SEGV at the same point, 
>> still get same gdb warning(Cannot find thread-local variables on this target)
> 
> I believe I have been experiencing a similar problem:
> 
> https://lists.linux-foundation.org/pipermail/containers/2010-April/024105.html
> 
> I may have found a fix.  Can you please test whether this kernel patch
> makes the SEGVs after restart go away?
> 
> 
> arch/x86/kernel/checkpoint_32.c |    3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/checkpoint_32.c b/arch/x86/kernel/checkpoint_32.c
> index 32cde34..d80c168 100644
> --- a/arch/x86/kernel/checkpoint_32.c
> +++ b/arch/x86/kernel/checkpoint_32.c
> @@ -86,7 +86,6 @@ static unsigned short decode_segment(__u16 seg)
> 
> void save_cpu_regs(struct ckpt_hdr_cpu *h, struct task_struct *t)
> {
> -	struct thread_struct *thread = &t->thread;
> 	struct pt_regs *regs = task_pt_regs(t);
> 	unsigned long _gs;
> 
> @@ -116,7 +115,7 @@ void save_cpu_regs(struct ckpt_hdr_cpu *h, struct task_struct *t)
> 	if (t == current)
> 		_gs = get_user_gs(regs);
> 	else
> -		_gs = thread->gs;
> +		_gs = task_user_gs(t);
> 
> 	h->fsindex = encode_segment(regs->fs);
> 	h->gsindex = encode_segment(_gs);
> 
> 

This patch worked!  Thank you!

Now I can see the /tmp/test.out progressed after restarting!

Thank you very much again

regards,

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list