diff options
author | Martin Kaiser <martin@kaiser.cx> | 2022-02-26 21:14:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:23:46 +0300 |
commit | 872a7b12af43fa6e5de0ff51b6ee9590f05d28a3 (patch) | |
tree | fe879b273d05e1262ce550791bb0711f47f8b27d /drivers/staging | |
parent | 18dc19571210ca5a8b505234719f6b6c61c2b2a8 (diff) | |
download | linux-872a7b12af43fa6e5de0ff51b6ee9590f05d28a3.tar.xz |
staging: r8188eu: fix endless loop in recv_func
[ Upstream commit 1327fcf175fa63d3b7a058b8148ed7714acdc035 ]
Fix an endless loop in recv_func. If pending_frame is not NULL, we're
stuck in the while loop forever. We have to call rtw_alloc_recvframe
each time we loop.
Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Reported-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220226181457.1138035-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_recv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index e082edfbaad8..30ca9f1e0363 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -1942,8 +1942,7 @@ static int recv_func(struct adapter *padapter, struct recv_frame *rframe) struct recv_frame *pending_frame; int cnt = 0; - pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue); - while (pending_frame) { + while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) { cnt++; recv_func_posthandle(padapter, pending_frame); } |