• Johannes Berg's avatar
    iwlwifi: fix async station command crash · 513aa3b0
    Johannes Berg authored
    Before Emmanuel's change to use a copy of the command
    ("iwlwifi: get the correct HCMD in the response handler")
    the iwl_add_sta_callback() function would have used a
    random pointer to somewhere when processing responses
    to an async command, while that wasn't valid data it
    was at least a valid pointer. Now, the pointer will be
    NULL in this case, thus crashing.
    
    Fix this by exiting the function early if no command
    is passed back which means it was sent asynchronously.
    Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    513aa3b0
sta.c 39.5 KB