mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 19:24:01 -04:00
staging: rtl8188eu: use safe iterator in stop_ap_mode()
This loop calls list_del_init() on the list iterator so it can result
in a forever 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/YL5ip4yz9NEB9RZO@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3c67430b7f
commit
535ca63b2a
@@ -1688,8 +1688,7 @@ void start_ap_mode(struct adapter *padapter)
|
||||
|
||||
void stop_ap_mode(struct adapter *padapter)
|
||||
{
|
||||
struct list_head *phead, *plist;
|
||||
struct rtw_wlan_acl_node *paclnode;
|
||||
struct rtw_wlan_acl_node *paclnode, *n;
|
||||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
@@ -1709,10 +1708,7 @@ void stop_ap_mode(struct adapter *padapter)
|
||||
|
||||
/* for ACL */
|
||||
spin_lock_bh(&pacl_node_q->lock);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
list_for_each(plist, phead) {
|
||||
paclnode = list_entry(plist, struct rtw_wlan_acl_node, list);
|
||||
|
||||
list_for_each_entry_safe(paclnode, n, &pacl_node_q->queue, list) {
|
||||
if (paclnode->valid) {
|
||||
paclnode->valid = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user