stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: jingoohan1@gmail.com, gregkh@linuxfoundation.org, robh@kernel.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "of/address: use atomic allocation in pci_register_io_range()" has been added to the 4.1-stable tree
Date: Thu, 30 Jul 2015 18:24:14 -0700	[thread overview]
Message-ID: <14383058541785@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    of/address: use atomic allocation in pci_register_io_range()

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     of-address-use-atomic-allocation-in-pci_register_io_range.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 294240ffe784e951dc2ef070da04fa31ef6db3a0 Mon Sep 17 00:00:00 2001
From: Jingoo Han <jingoohan1@gmail.com>
Date: Thu, 18 Jun 2015 00:12:27 +0900
Subject: of/address: use atomic allocation in pci_register_io_range()

From: Jingoo Han <jingoohan1@gmail.com>

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@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/of/address.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -712,7 +712,7 @@ int __weak pci_register_io_range(phys_ad
 	}
 
 	/* 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;


Patches currently in stable-queue which might be from jingoohan1@gmail.com are

queue-4.1/of-address-use-atomic-allocation-in-pci_register_io_range.patch

                 reply	other threads:[~2015-07-31  1:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=14383058541785@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jingoohan1@gmail.com \
    --cc=robh@kernel.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).