mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 09:01:36 -04:00
staging: rtl8188eu: use safe iterator in tx_beacon_hdl()
This loop calls list_del_init() on the list iterator so it has to use
the _safe() iterator or it leads to an endless loop.
Fixes: 23017c8842 ("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/YL5iunD5ilf+mKPR@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
535ca63b2a
commit
b5e944c50c
@@ -5376,8 +5376,8 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||
#ifdef CONFIG_88EU_AP_MODE
|
||||
else { /* tx bc/mc frames after update TIM */
|
||||
struct sta_info *psta_bmc;
|
||||
struct list_head *xmitframe_plist, *xmitframe_phead;
|
||||
struct xmit_frame *pxmitframe = NULL;
|
||||
struct list_head *xmitframe_phead;
|
||||
struct xmit_frame *pxmitframe, *n;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
/* for BC/MC Frames */
|
||||
@@ -5390,11 +5390,8 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||
spin_lock_bh(&psta_bmc->sleep_q.lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
list_for_each(xmitframe_plist, xmitframe_phead) {
|
||||
pxmitframe = list_entry(xmitframe_plist,
|
||||
struct xmit_frame,
|
||||
list);
|
||||
|
||||
list_for_each_entry_safe(pxmitframe, n, xmitframe_phead,
|
||||
list) {
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
|
||||
Reference in New Issue
Block a user