Skip to contentSkip to conversation

: Fix potential scheduling while atomic in mesh_path_add.

PATCH New Pavel Emelyanov 1 participant 1 message May 6, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 : Fix potential scheduling while atomic in mesh_path_add.

Calling synchronize_rcu() under write-lock-ed pathtbl_resize_lock may result in this warning (and other side effects).

It looks safe just dropping this lock before calling synchronize_rcu.

---
 net/mac80211/mesh_pathtbl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/mac80211/mesh_pathtbl.c +2 -1
index 1d2d051..99c2d36 100644
@@ -220,9 +220,10 @@ endadd:
 			return -ENOMEM;
 		}
 		rcu_assign_pointer(mesh_paths, newtbl);
+		write_unlock(&pathtbl_resize_lock);
+
 		synchronize_rcu();
 		mesh_table_free(oldtbl, false);
-		write_unlock(&pathtbl_resize_lock);
 	}
 endadd2:
 	return err;
Signature · 6 lines
1.5.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html