staging: rtl8188eu: use safe iterator in dequeue_xmitframes_to_sleeping_queue()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 7 Jun 2021 18:17:43 +0000 (21:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jun 2021 12:29:01 +0000 (14:29 +0200)
commite0f489a25a9928da72dbf697ec52e987041c8dd1
tree407da3c1cf8e7ae0b3ee9ee22ad2b4f24dd0e58b
parentb5e944c50cbd10bc35d08b3093de83df10949f17
staging: rtl8188eu: use safe iterator in dequeue_xmitframes_to_sleeping_queue()

On some code paths the xmitframe_enqueue_for_sleeping_sta() function can
call list_del_init(&pxmitframe->list) which would lead to a forever loop
because "pxmitframe" is the list iterator.  Use the _safe version of the
iterator to prevent this.

Fixes: 23017c8842d2 ("staging: rtl8188eu: Use list iterators and helpers")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YL5ixzKaYKkpHhky@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_xmit.c