From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from sacred.ru ([62.205.161.221]:60463 "EHLO sacred.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757324AbYEFOy1 (ORCPT ); Tue, 6 May 2008 10:54:27 -0400 Message-ID: <48207073.6010600@openvz.org> (sfid-20080506_165351_957877_EFA66241) Date: Tue, 06 May 2008 18:51:31 +0400 From: Pavel Emelyanov MIME-Version: 1.0 To: Johannes Berg , "John W. Linville" CC: David Miller , linux-wireless@vger.kernel.org, Linux Netdev List Subject: [PATCH 3/4][MAC80211]: Fix potential scheduling while atomic in mesh_path_add. Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: 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. Signed-off-by: Pavel Emelyanov --- net/mac80211/mesh_pathtbl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 1d2d051..99c2d36 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -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; -- 1.5.3.4