• WANG Chao's avatar
    vmcore: continue vmcore initialization if PT_NOTE is found empty · c4082f36
    WANG Chao authored
    Currently when an empty PT_NOTE is detected, vmcore initialization
    fails.  It sounds too harsh.  Because PT_NOTE could be empty, for
    example, one offlined a cpu but never restarted kdump service, and after
    crash, PT_NOTE program header is there but no data contains.  It's
    better to warn about the empty PT_NOTE and continue to initialise
    vmcore.
    
    And ultimately the multiple PT_NOTE are merged into a single one, all
    empty PT_NOTE are discarded naturally during the merge.  So empty
    PT_NOTE is not visible to user space and vmcore is as good as expected.
    Signed-off-by: default avatarWANG Chao <chaowang@redhat.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
    Cc: Greg Pearson <greg.pearson@hp.com>
    Cc: Baoquan He <bhe@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c4082f36
vmcore.c 27.8 KB