Projects STRLCPY criu Commits 740ae4a3
🤬
  • x86: cpu -- Don't fail if member is not present in image

    When migrating from old images the particular xsave member
    might not be present in core-* image, which is fine we
    simply left data as initial zero state.
    
    https://jira.sw.ru/browse/PSBM-89215
    
    Signed-off-by: Cyrill Gorcunov <[email protected]>
    Signed-off-by: Andrei Vagin <[email protected]>
  • Loading...
  • Cyrill Gorcunov committed with Andrei Vagin 5 years ago
    740ae4a3
    1 parent deef94ce
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    criu/arch/x86/crtools.c
    skipped 437 lines
    438 438   size_t size = pb_repeated_size(xsave, member); \
    439 439   size_t xsize = (size_t)compel_fpu_feature_size(feature); \
    440 440   if (xsize != size) { \
    441  - pr_err("%s reported %zu bytes (expecting %zu)\n", \
    442  - # feature, xsize, size); \
    443  - return -1; \
     441 + if (size) { \
     442 + pr_err("%s reported %zu bytes (expecting %zu)\n",\
     443 + # feature, xsize, size); \
     444 + return -1; \
     445 + } else { \
     446 + pr_debug("%s is not present in image, ignore\n",\
     447 + # feature); \
     448 + } \
    444 449   } \
    445 450   xstate_bv |= (1UL << feature); \
    446 451   xstate_size += xsize; \
    skipped 188 lines
Please wait...
Page is in error, reload to recover