hi, On Tue, Dec 10, 2013 at 6:39 PM, Antonio Quartulli <antonio@xxxxxxxxxxxxxx> wrote: > I need to invoke ieee80211_iter_keys() from a periodic worker in a driver and > therefore I would prefer to get rid of any of locks to avoid problems. > These two patches try to use rcu lock to protect the iteration, but I'd like to > get a feedback before sending this stuff as a patch :-) > at least iwlwifi might sleep inside the iterator, so you can't just convert it to rcu (atomic). > Moreover, why do we use list_for_each_entry_safe() is ieee80211_iter_keys() if > the list cannot be altered (pointer to key is not passed to iter() so we should > be sure that nobody is going to invoke list_del())? see the documentation of ieee80211_remove_key(): /** * ieee80211_remove_key - remove the given key * @keyconf: the parameter passed with the set key * * Remove the given key. If the key was uploaded to the hardware at the * time this function is called, it is not deleted in the hardware but * instead assumed to have been removed already. * * Note that due to locking considerations this function can (currently) * only be called during key iteration (ieee80211_iter_keys().) */ Eliad. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html