summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.ibm.com>2018-10-18 11:11:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-09 17:38:41 +0100
commitd648a9bdac4b9705e48f0131a71f264eca8fd520 (patch)
treeb4c9133b0d64ca35b792f814775786c03c49cfbf /arch/s390
parent47148001ae12292984ba1b38d9babefb9a46cd3e (diff)
downloadlinux-stable-d648a9bdac4b9705e48f0131a71f264eca8fd520.tar.gz
linux-stable-d648a9bdac4b9705e48f0131a71f264eca8fd520.tar.bz2
linux-stable-d648a9bdac4b9705e48f0131a71f264eca8fd520.zip
s390/pci: fix sleeping in atomic during hotplug
commit 98dfd32620e970eb576ebce5ea39d905cb005e72 upstream. When triggered by pci hotplug (PEC 0x306) clp_get_state is called with spinlocks held resulting in the following warning: zpci: n/a: Event 0x306 reconfigured PCI function 0x0 BUG: sleeping function called from invalid context at mm/page_alloc.c:4324 in_atomic(): 1, irqs_disabled(): 0, pid: 98, name: kmcheck 2 locks held by kmcheck/98: Change the allocation to use GFP_ATOMIC. Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/pci/pci_clp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
index 19b2d2a9b43d..eeb7450db18c 100644
--- a/arch/s390/pci/pci_clp.c
+++ b/arch/s390/pci/pci_clp.c
@@ -436,7 +436,7 @@ int clp_get_state(u32 fid, enum zpci_state *state)
struct clp_state_data sd = {fid, ZPCI_FN_STATE_RESERVED};
int rc;
- rrb = clp_alloc_block(GFP_KERNEL);
+ rrb = clp_alloc_block(GFP_ATOMIC);
if (!rrb)
return -ENOMEM;