Return-path: Received: from paleale.coelho.fi ([176.9.41.70]:59718 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752901AbeBSMs6 (ORCPT ); Mon, 19 Feb 2018 07:48:58 -0500 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Sara Sharon , Luca Coelho Date: Mon, 19 Feb 2018 14:48:37 +0200 Message-Id: <20180219124847.27169-4-luca@coelho.fi> (sfid-20180219_134919_032314_F0F92409) In-Reply-To: <20180219124847.27169-1-luca@coelho.fi> References: <20180219124847.27169-1-luca@coelho.fi> Subject: [PATCH v2 03/13] mac80211: fix calling sleeping function in atomic context Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Sara Sharon sta_info_alloc can be called from atomic paths (such as RX path) so we need to call pcpu_alloc with the correct gfp. Fixes: c9c5962b56c1 ("mac80211: enable collecting station statistics per-CPU") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- net/mac80211/sta_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 8d7e3732bb61..af0b608ee8ed 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -314,7 +314,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, if (ieee80211_hw_check(hw, USES_RSS)) { sta->pcpu_rx_stats = - alloc_percpu(struct ieee80211_sta_rx_stats); + alloc_percpu_gfp(struct ieee80211_sta_rx_stats, gfp); if (!sta->pcpu_rx_stats) goto free; } -- 2.15.1