diff options
author | Alexei Avshalom Lazar <ailizaro@codeaurora.org> | 2019-04-26 18:43:30 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-05-03 08:03:42 +0300 |
commit | 9c6465979276c58d5972a959dd35b4d9aff52749 (patch) | |
tree | ead9d68adb3bb91806619d6c1194416c2a398b07 /drivers/net/wireless/ath/wil6210/txrx.c | |
parent | e10b0eddd5235aa5aef4e40b970e34e735611a80 (diff) | |
download | linux-9c6465979276c58d5972a959dd35b4d9aff52749.tar.bz2 |
wil6210: fix _desc access in __wil_tx_vring_tso
_desc is defined in __wil_tx_vring_tso() and may not be set in
case len is 0, verify _desc is set.
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/txrx.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index d74837cce67f..c5e16b2145f8 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -1761,6 +1761,9 @@ static int __wil_tx_vring_tso(struct wil6210_priv *wil, struct wil6210_vif *vif, } } + if (!_desc) + goto mem_error; + /* first descriptor may also be the last. * in this case d pointer is invalid */ |