Commit 1327fcf1 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: fix endless loop in recv_func



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: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Reported-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220226181457.1138035-4-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e1e59c1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1800,8 +1800,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);
		}