• Yuval Mintz's avatar
    bnx2x: Prevent NULL pointer dereference in kdump · ecf01c22
    Yuval Mintz authored
    In scenarios in which a previous driver was removed without proper cleanup
    (e.g., kdump), it is possible for the chip to generate an interrupt without
    any apparent reason once interrupts are requested.
    
    Due to an erroneous initialization of resources, some of the bnx2x structs
    which are required for interrupt handling are initialized only after an
    interface's interrupt is requested from the OS.
    
    As a result, once such a spurious interrupt occurs, it will cause a NULL
    pointer dereference - the driver will access those structs in its interrupt
    handling routine.
    
    This patch change the interrupt request scheme so that bnx2x would only
    request interrupts from the kernel after it has finished initializing
    all the inner structs required for interrupt handling.
    Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
    Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
    Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ecf01c22
bnx2x_cmn.c 121 KB