From: Bjorn Helgaas <helgaas@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Logan Gunthorpe" <logang@deltatee.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Christian König" <christian.koenig@amd.com>,
"Stephen Bates" <sbates@raithlin.com>,
linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] PCI: fix a scheduling in atomic bug
Date: Thu, 12 Aug 2021 14:16:43 -0500 [thread overview]
Message-ID: <20210812191643.GA2499987@bjorn-Precision-5520> (raw)
In-Reply-To: <20210812070004.GC31863@kili>
On Thu, Aug 12, 2021 at 10:00:04AM +0300, Dan Carpenter wrote:
> This function is often called with a spinlock held so the allocation has
> to be atomic. The call tree is:
>
> pci_specified_resource_alignment() <-- takes spin_lock();
> -> pci_dev_str_match()
> -> pci_dev_str_match_path()
>
> Fixes: 07d8d7e57c28 ("PCI: Make specifying PCI devices in kernel parameters reusable")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied with Logan's Reviewed-by and Fixes: update to pci/misc for
v5.15, thanks!
> ---
> 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 6714c58ce321..71baf5ff48fc 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -269,7 +269,7 @@ static int pci_dev_str_match_path(struct pci_dev *dev, const char *path,
>
> *endptr = strchrnul(path, ';');
>
> - wpath = kmemdup_nul(path, *endptr - path, GFP_KERNEL);
> + wpath = kmemdup_nul(path, *endptr - path, GFP_ATOMIC);
> if (!wpath)
> return -ENOMEM;
>
> --
> 2.20.1
>
prev parent reply other threads:[~2021-08-12 19:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 7:00 [PATCH] PCI: fix a scheduling in atomic bug Dan Carpenter
2021-08-12 15:19 ` Logan Gunthorpe
2021-08-13 7:27 ` Dan Carpenter
2021-08-12 19:16 ` Bjorn Helgaas [this message]
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=20210812191643.GA2499987@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=christian.koenig@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=sbates@raithlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox