of/address: use atomic allocation in pci_register_io_range()
authorJingoo Han <jingoohan1@gmail.com>
Wed, 17 Jun 2015 15:12:27 +0000 (00:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:16 +0000 (09:29 -0700)
commita35b0d6cc0ec26fb607f6cf7bc7be5756c5de63e
treef3291958c1b1e54fd1eab76fead5048883ecaed6
parent0b99ffc6ea42e16fa4c5b01a414ac0f26766a5f4
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@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/address.c