• Michal Marek's avatar
    genksyms: Fix segfault with invalid declarations · d920f7c6
    Michal Marek authored
    Do not try to recover too early and segfault when parsing invalid
    declarations such as
    
    echo 'int (int);' | scripts/genksyms/genksyms
    echo 'int a, (int);' | scripts/genksyms/genksyms
    echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms
    
    The last one was a real-life bug with
    include/asm-generic/asm-prototypes.h on x86_64.
    Reported-and-tested-by: 's avatarBorislav Petkov <bp@alien8.de>
    Signed-off-by: 's avatarMichal Marek <mmarek@suse.com>
    d920f7c6
parse.y 11.1 KB