On 2011-05-31 9:31 PM, Johannes Berg wrote:
On Tue, 2011-05-31 at 21:16 +0200, Felix Fietkau wrote:
+ rcu_read_lock();
+
+ sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
+
+ if (!sta) {
+ rcu_read_unlock();
+ sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
+ GFP_KERNEL);
+ if (!sta)
+ return;
+
+ new = true;
+ }
...
+ rcu_read_unlock();
definitely doesn't look right.
It's a bit weird because in the case of a new sta being allocated, the
rcu read lock is acquired by sta_info_insert_rcu, and the code inbetween
does not need to be covered by the rcu read lock as the sta entry has
not been added to the list yet.
It should be correct though, unless I'm missing something...
- Felix
--
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