From patchwork Sat Aug 31 07:01:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1156117 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46L6dB3NN0z9s4Y for ; Sat, 31 Aug 2019 16:58:38 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726130AbfHaG6h (ORCPT ); Sat, 31 Aug 2019 02:58:37 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50750 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725903AbfHaG6h (ORCPT ); Sat, 31 Aug 2019 02:58:37 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 43B8B21F62B63874339A; Sat, 31 Aug 2019 14:58:35 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Sat, 31 Aug 2019 14:58:28 +0800 From: Wei Yongjun To: Bjorn Helgaas , Logan Gunthorpe CC: Wei Yongjun , , Subject: [PATCH -next] PCI: Use GFP_ATOMIC under spin lock Date: Sat, 31 Aug 2019 07:01:47 +0000 Message-ID: <20190831070147.25607-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 41b5ef225daa ("PCI: Clean up resource_alignment parameter to not require static buffer") Signed-off-by: Wei Yongjun --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 484e35349565..0b5fc6736f3f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -6148,7 +6148,7 @@ static ssize_t resource_alignment_store(struct bus_type *bus, spin_lock(&resource_alignment_lock); kfree(resource_alignment_param); - resource_alignment_param = kstrndup(buf, count, GFP_KERNEL); + resource_alignment_param = kstrndup(buf, count, GFP_ATOMIC); spin_unlock(&resource_alignment_lock);