diff options
Diffstat (limited to 'drivers/s390/cio/itcw.c')
| -rw-r--r-- | drivers/s390/cio/itcw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/cio/itcw.c b/drivers/s390/cio/itcw.c index 19e46363348c..b6408a475983 100644 --- a/drivers/s390/cio/itcw.c +++ b/drivers/s390/cio/itcw.c @@ -6,9 +6,11 @@ * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> */ +#include <linux/export.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/string.h> +#include <linux/io.h> #include <linux/errno.h> #include <linux/err.h> #include <linux/module.h> @@ -187,7 +189,7 @@ struct itcw *itcw_init(void *buffer, size_t size, int op, int intrg, /* Check for 2G limit. */ start = (addr_t) buffer; end = start + size; - if (end > (1 << 31)) + if ((virt_to_phys(buffer) + size) > (1 << 31)) return ERR_PTR(-EINVAL); memset(buffer, 0, size); /* ITCW. */ |
