All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
	Logan Gunthorpe <logang@deltatee.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
	linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH -next] PCI: Use GFP_ATOMIC under spin lock
Date: Sat, 31 Aug 2019 06:58:38 +0000	[thread overview]
Message-ID: <20190831070147.25607-1-weiyongjun1@huawei.com> (raw)

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 <weiyongjun1@huawei.com>
---
 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);

WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
	Logan Gunthorpe <logang@deltatee.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, <linux-pci@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] PCI: Use GFP_ATOMIC under spin lock
Date: Sat, 31 Aug 2019 07:01:47 +0000	[thread overview]
Message-ID: <20190831070147.25607-1-weiyongjun1@huawei.com> (raw)

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 <weiyongjun1@huawei.com>
---
 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);




             reply	other threads:[~2019-08-31  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-31  6:58 Wei Yongjun [this message]
2019-08-31  7:01 ` [PATCH -next] PCI: Use GFP_ATOMIC under spin lock Wei Yongjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190831070147.25607-1-weiyongjun1@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.