On Mon, Feb 08, 2010 at 11:05:55AM -0600, Serge E. Hallyn wrote:
> v19-rc3 actually tries to reset the TIF_IA32 flag according to
> how it was set at checkpoint.  It should not, at least for now.
> 
> Signed-off-by: Serge E. Hallyn <[email protected]>

Reviewed-by: Matt Helsley <[email protected]>

> ---
>  arch/x86/kernel/checkpoint.c |   21 +++++++++++++++------
>  1 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kernel/checkpoint.c b/arch/x86/kernel/checkpoint.c
> index 5952e27..b01a2fc 100644
> --- a/arch/x86/kernel/checkpoint.c
> +++ b/arch/x86/kernel/checkpoint.c
> @@ -283,12 +283,21 @@ int restore_thread(struct ckpt_ctx *ctx)
>       load_TLS(thread, cpu);
>       put_cpu();
> 
> -#if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT)
> -     if (h->thread_info_flags & _TIF_IA32)
> -             set_thread_flag(TIF_IA32);
> -     else
> -             clear_thread_flag(TIF_IA32);
> -#endif
> +     {
> +             int pre, post;
> +             /*
> +              * Eventually we'd like to support mixed-bit restart, but for
> +              * now don't pretend to.
> +              */
> +             pre = test_thread_flag(TIF_IA32);
> +             post = h->thread_info_flags & _TIF_IA32;
> +             if ((pre && !post) || (post && !pre)) {

This might be clearer:

                pre = test_thread_flag(TIF_IA32);
                post = !!(h->thread_info_flags & _TIF_IA32);
                if (pre != post) {

Cheers,
        -Matt Helsley
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to