[3.19.y-ckt stable] Patch "of/address: use atomic allocation in pci_register_io_range()" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Jul 16 01:01:23 UTC 2015
This is a note to let you know that I have just added a patch titled
of/address: use atomic allocation in pci_register_io_range()
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.y-ckt4.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From dcdb3ba49a2fb1e9eb4dccca6021f69578feb6cf Mon Sep 17 00:00:00 2001
From: Jingoo Han <jingoohan1 at gmail.com>
Date: Thu, 18 Jun 2015 00:12:27 +0900
Subject: of/address: use atomic allocation in pci_register_io_range()
commit 294240ffe784e951dc2ef070da04fa31ef6db3a0 upstream.
When kzalloc() is called under spin_lock(), GFP_ATOMIC should be
used to avoid sleeping allocation.
The call tree is:
of_pci_range_to_resource()
--> pci_register_io_range() <-- takes spin_lock(&io_range_lock);
--> kzalloc()
Signed-off-by: Jingoo Han <jingoohan1 at gmail.com>
Signed-off-by: Rob Herring <robh at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/of/address.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 6906a3f..8bfda6a 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -712,7 +712,7 @@ int __weak pci_register_io_range(phys_addr_t addr, resource_size_t size)
}
/* add the range to the list */
- range = kzalloc(sizeof(*range), GFP_KERNEL);
+ range = kzalloc(sizeof(*range), GFP_ATOMIC);
if (!range) {
err = -ENOMEM;
goto end_register;
--
1.9.1
More information about the kernel-team
mailing list