• Matti Gottlieb's avatar
    iwlwifi: mvm: fix accessing Null pointer during fw dump collection · f742aaf3
    Matti Gottlieb authored
    The firwmare file can come with data that is relevant for paging. This
    data is availablet to the firmware upon request, but it stored in the
    host's memory. During the firmware init flow, the driver configures the
    firmware so that the firwmare knows where is the data.
    When paging is used, the variable paging_mem_size is the number of bytes
    that are available through paging. This variable is not zeror-ed if the
    driver fails to configure the paging in the firmware, but the memory is
    freed which is inconsistent.
    This inconsistency led to a NULL pointer dereference in the code that
    collects the debug data.
    
    Fix this by zero-ing the paging_mem_size variable and NULLify the
    relevant pointers, so that the code that collects the debug data will
    know that the paging data is not available.
    Signed-off-by: default avatarMatti Gottlieb <matti.gottlieb@intel.com>
    Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
    f742aaf3
fw-dbg.c 25.7 KB