aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/pci_io.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-04-16 14:16:14 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-04-17 14:07:37 +0200
commitf0bacb7fc4f7defb15a6575d92f8ea4342f8f09e (patch)
treef8e029110696a0cb846357a2b1e267015ec37e62 /arch/s390/include/asm/pci_io.h
parents390/pci: rename instruction wrappers (diff)
downloadlinux-dev-f0bacb7fc4f7defb15a6575d92f8ea4342f8f09e.tar.xz
linux-dev-f0bacb7fc4f7defb15a6575d92f8ea4342f8f09e.zip
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) {