• Loic Poulain's avatar
    wcn36xx: Fix firmware crash due to corrupted buffer address · e5f99081
    Loic Poulain authored
    wcn36xx_start_tx function retrieves the buffer descriptor from the
    channel control queue to start filling tx buffer information. However,
    nothing prevents this same buffer to be concurrently accessed in a
    concurent tx call, leading to potential buffer coruption and firmware
    crash (observed during iperf test). The channel control queue should
    only be accessed and updated with the channel lock.
    
    Fix this issue by using a local buffer descriptor which will be copied
    in the thread-safe wcn36xx_dxe_tx_frame.
    
    Note that buffer descriptor size is few bytes so the introduced copy
    overhead is insignificant. Moreover, this allows to keep the locked
    section minimal.
    Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
    Signed-off-by: default avatarRamon Fried <rfried@codeaurora.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    e5f99081
dxe.c 23.9 KB