summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/pci_io.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-04-16 16:16:14 +0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-04-17 16:07:37 +0400
commitf0bacb7fc4f7defb15a6575d92f8ea4342f8f09e (patch)
treef8e029110696a0cb846357a2b1e267015ec37e62 /arch/s390/include/asm/pci_io.h
parentb2a9e87d2ce8fb2d0ce08ee49168805975c622da (diff)
downloadlinux-f0bacb7fc4f7defb15a6575d92f8ea4342f8f09e.tar.xz
s390/pci: add exception table to load/store instructions
Don't let pci_load and friends crash the kernel when called with e.g. an invalid offset. Return -ENXIO instead. Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/pci_io.h')
-rw-r--r--arch/s390/include/asm/pci_io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/pci_io.h b/arch/s390/include/asm/pci_io.h
index a312c7e5a71e..0e0bec9a3fb7 100644
--- a/arch/s390/include/asm/pci_io.h
+++ b/arch/s390/include/asm/pci_io.h
@@ -89,7 +89,7 @@ static inline int zpci_write_single(u64 req, const u64 *data, u64 offset, u8 len
static inline int zpci_read_single(u64 req, u64 *dst, u64 offset, u8 len)
{
u64 data;
- u8 cc;
+ int cc;
cc = s390pci_load(&data, req, offset);
switch (len) {