From patchwork Tue Apr 16 23:17:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 10904259 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01855922 for ; Tue, 16 Apr 2019 23:17:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF3AF289CF for ; Tue, 16 Apr 2019 23:17:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D387528A0C; Tue, 16 Apr 2019 23:17:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 618A328A11 for ; Tue, 16 Apr 2019 23:17:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730798AbfDPXRL (ORCPT ); Tue, 16 Apr 2019 19:17:11 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:12998 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728237AbfDPXRL (ORCPT ); Tue, 16 Apr 2019 19:17:11 -0400 X-IronPort-AV: E=Sophos;i="5.60,359,1549954800"; d="scan'208";a="30455192" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Apr 2019 16:17:09 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Tue, 16 Apr 2019 16:17:09 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g8qKSYUMQ8MhdDgbOkuqXRM0OP+kLQJZ3mI/o055sFs=; b=dROkxDV1g/Y3bCBaWvuTBoMqbQiai6TGbVvhmvEo32Pk72V+ot0GHjW8NUvUgnFvdhU6sN8EGZIa2BuHs8LjbCQY0rSyfKYBLCoYtkahdXTkaWLvQVOupkGlTmT3j7/2b5f3E8gVrpPKFY2CZOf7FQeoHllvNcJJB31NL3DFkSQ= Received: from CY4PR11MB1366.namprd11.prod.outlook.com (10.169.255.11) by CY4PR11MB1990.namprd11.prod.outlook.com (10.169.252.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.19; Tue, 16 Apr 2019 23:17:07 +0000 Received: from CY4PR11MB1366.namprd11.prod.outlook.com ([fe80::1876:f8de:e151:a674]) by CY4PR11MB1366.namprd11.prod.outlook.com ([fe80::1876:f8de:e151:a674%3]) with mapi id 15.20.1792.018; Tue, 16 Apr 2019 23:17:07 +0000 From: To: CC: , , , , Subject: [PATCH] staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context Thread-Topic: [PATCH] staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context Thread-Index: AQHU9KqCo1GsnQS7DESi0k8GgOnP7w== Date: Tue, 16 Apr 2019 23:17:07 +0000 Message-ID: <20190416231701.24626-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: BYAPR03CA0016.namprd03.prod.outlook.com (2603:10b6:a02:a8::29) To CY4PR11MB1366.namprd11.prod.outlook.com (2603:10b6:903:2b::11) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Adham.Abozaeid@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 86691826-1fb0-4ee8-a8e3-08d6c2c1a4e5 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600140)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:CY4PR11MB1990; x-ms-traffictypediagnostic: CY4PR11MB1990: x-microsoft-antispam-prvs: x-forefront-prvs: 000947967F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(346002)(396003)(366004)(376002)(136003)(189003)(199004)(4326008)(25786009)(36756003)(6506007)(99286004)(107886003)(81156014)(476003)(5640700003)(386003)(52116002)(66066001)(6486002)(3846002)(26005)(6436002)(8676002)(2616005)(81166006)(2501003)(50226002)(486006)(5660300002)(8936002)(186003)(105586002)(6916009)(2351001)(53936002)(106356001)(14444005)(2906002)(256004)(7736002)(102836004)(6116002)(4744005)(305945005)(316002)(97736004)(6512007)(72206003)(14454004)(86362001)(54906003)(478600001)(71190400001)(1076003)(71200400001)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR11MB1990;H:CY4PR11MB1366.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: IQxPqrmiR1rhQ8EBRDaWV2GarDJLVop4ow/Yc/C4ZtIY+8MbRDE4LwU0XXg4VFm9uJ2l5rNSk5Ule5iXKgmumy4wXJmHd9ZnPFGtkAhDt/jOdZThrIxUl18DHcAdHIT1DaC5/dhPxeT29jA8Mc5S4yNnloqF5IsvrK5OYUxbSUWVNrxqDNMgLb3G05iWAifltnONu2ZE7Uc9kCJko623BmmSDyO3AtUmBLACouMIRZmOveM9XkI5kMfKZHrJk8m0HnbidTb5AfWYU/FQFCIXWRU0GDq0hVVxUpOU7XhnVfdF12wJYu40VqJh498oERuXEqGthI6p+jlxfU0uYivhSQ9J8/GMEe+qgsQmXIbbH/EpfDaWqPiPtqk6RGEgtQHJmztdpmYI0dgcT2f39ilrgLAxvJRUsDynUQZs+wZnls4= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 86691826-1fb0-4ee8-a8e3-08d6c2c1a4e5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2019 23:17:07.3817 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1990 X-OriginatorOrg: microchip.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid txq_add_mgmt_pkt allocates memory while being called from atomic context so needs to use GFP_ATOMIC Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 2b309c8a8fb2..0a713409ea98 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -316,7 +316,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, if (wilc->quit) return 0; - tqe = kmalloc(sizeof(*tqe), GFP_KERNEL); + tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC); if (!tqe) return 0;