]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 5 Jul 2015 14:12:48 +0000 (10:12 -0400)
commitd42b6b4635df53180e781d392f6441744c34b62e
tree28eaf94a935073eecf64e199a6033165284ebad4
parentb396bdb5f1e1692d38b2c2d11c67c7fc182546b7
of/address: use atomic allocation in pci_register_io_range()

[ Upstream commit 294240ffe784e951dc2ef070da04fa31ef6db3a0 ]

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>
drivers/of/address.c