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>
This commit is contained in:

committed by
Martin Schwidefsky

parent
b2a9e87d2c
commit
f0bacb7fc4
@@ -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) {
|
||||
|
Reference in New Issue
Block a user