From f0bacb7fc4f7defb15a6575d92f8ea4342f8f09e Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Tue, 16 Apr 2013 14:16:14 +0200 Subject: 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 Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/pci_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/s390/include/asm/pci_io.h') 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) { -- cgit v1.2.3