Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp608064pxx; Wed, 28 Oct 2020 12:17:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn66iVclvaGzC+i5DPjiiaisOYpY1VGj5kPnZThw3bbKrsqrt1x/A6UnF+nId9pJ0gDlbi X-Received: by 2002:a17:906:b197:: with SMTP id w23mr664573ejy.166.1603912627695; Wed, 28 Oct 2020 12:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603912627; cv=none; d=google.com; s=arc-20160816; b=VHyiqxyuiZ8KnPXHanpd0L4MvOkgygeTcXybOfiN+dt+bvNRe5v+pNGtYL/vhg+d/h awhyQaAIkupFSrEuO9Lp/mZG+yFCMsjtrDiPVKbUg3v978ITePpAbMl82EIvCY6c/UAt z/7h491fcDLBLDhhFp2JhBXL7tuyAdQqVI5vss9o4NVYBlgyxYPw5C2CIvn199401KtZ q+z/hmvLFClmN1q1ubijXPa03c/W9ICCiSwR1YeyXzYYanQr9FtoE2Fr14gaoPbTHBHt sBxhCZIJVPbTr13cT/V3DYCwB9ZflqJcebq+kSTJYVC0YD2yFmQfkpGpTJ4ibIqMYBhg NdCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nislqUtS7Rh8feNzM5OPV7Thi8aHkd32O04T7o+u9Qo=; b=NxrqG+yfGajz3CkA4R3HJd9rDSWRAB5Hr9WlIDDuU/IVXRmqjwfPrcQ4WVpXvKEVm5 5fzpdCFp2iqATbROrUbJjeanF38hfzUnG88zZxjQVLk6C1mjTRBXrYDWtPIswsbBEoL4 phfEcvBWMYd4EM8LhwJdcppQ2xpMxmri82piPLg7Nf+HkNQtfoNdSmPAxw+eFUnmYJYV m6uZF0rIB/+m8oIJ0Qw0Yj4NBDecfjtFoSqYfGMcSh/7rHXoxjNUA55uElCfX21gbYqm MmfDrzG/lMiBkKyqrrQ9h3NaZ0F1zfrWeVX7LXKwQazD1ujWFolQraxB01TNRaA5SoKe GnkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N5dRKSlU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si3290edo.519.2020.10.28.12.16.44; Wed, 28 Oct 2020 12:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N5dRKSlU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1827173AbgJ0SVz (ORCPT + 99 others); Tue, 27 Oct 2020 14:21:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:51082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753923AbgJ0ODA (ORCPT ); Tue, 27 Oct 2020 10:03:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 455B922258; Tue, 27 Oct 2020 14:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807379; bh=v+uvxv/60e+NBBK0GQGghAhBk2nIiHhj27vVZeZuJZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N5dRKSlUAl1575aQZfRdbwmKmJN499ZX73bsYKy78YYuQElcGziI2M1F9wkz7wCDz GCQbdKkGhsPOtHYZiCq2SCZz95UgNR/1BWsnCImlj+ixCxzR8crZHLQqGvlAi4aITZ 0xeglwKPBHn2JPD80Ry3+CXRG0C+CtedQmf2QvM0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Kalle Valo , Sasha Levin Subject: [PATCH 4.9 030/139] mwifiex: Do not use GFP_KERNEL in atomic context Date: Tue, 27 Oct 2020 14:48:44 +0100 Message-Id: <20201027134903.561996757@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit d2ab7f00f4321370a8ee14e5630d4349fdacc42e ] A possible call chain is as follow: mwifiex_sdio_interrupt (sdio.c) --> mwifiex_main_process (main.c) --> mwifiex_process_cmdresp (cmdevt.c) --> mwifiex_process_sta_cmdresp (sta_cmdresp.c) --> mwifiex_ret_802_11_scan (scan.c) --> mwifiex_parse_single_response_buf (scan.c) 'mwifiex_sdio_interrupt()' is an interrupt function. Also note that 'mwifiex_ret_802_11_scan()' already uses GFP_ATOMIC. So use GFP_ATOMIC instead of GFP_KERNEL when memory is allocated in 'mwifiex_parse_single_response_buf()'. Fixes: 7c6fa2a843c5 ("mwifiex: use cfg80211 dynamic scan table and cfg80211_get_bss API") or Fixes: 601216e12c65e ("mwifiex: process RX packets in SDIO IRQ thread directly") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200809092906.744621-1-christophe.jaillet@wanadoo.fr Signed-off-by: Sasha Levin --- drivers/net/wireless/marvell/mwifiex/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c index 5fde2e2f1fea8..422a8d31ed7f9 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c @@ -1879,7 +1879,7 @@ mwifiex_parse_single_response_buf(struct mwifiex_private *priv, u8 **bss_info, chan, CFG80211_BSS_FTYPE_UNKNOWN, bssid, timestamp, cap_info_bitmap, beacon_period, - ie_buf, ie_len, rssi, GFP_KERNEL); + ie_buf, ie_len, rssi, GFP_ATOMIC); if (bss) { bss_priv = (struct mwifiex_bss_priv *)bss->priv; bss_priv->band = band; -- 2.25.1