linux/drivers/of/address.c
Jingoo Han d42b6b4635 of/address: use atomic allocation in pci_register_io_range()
[ Upstream commit 294240ffe7 ]

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>
Cc: stable@vger.kernel.org # 3.18+
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2015-07-05 10:12:48 -04:00

1021 lines
25 KiB