diff options
| author | 2019-01-15 15:37:46 +0100 | |
|---|---|---|
| committer | 2019-01-15 15:37:46 +0100 | |
| commit | cb7edfd4cd47ed50ea618b660ee283a2d99edff2 (patch) | |
| tree | fb2749afac5055798dcf8f0dca77c88e749307da /drivers/i2c/i2c-dev.c | |
| parent | USB: core: urb: Use struct_size() in kmalloc() (diff) | |
| parent | Linux 5.0-rc2 (diff) | |
| download | wireguard-linux-cb7edfd4cd47ed50ea618b660ee283a2d99edff2.tar.xz wireguard-linux-cb7edfd4cd47ed50ea618b660ee283a2d99edff2.zip | |
Merge 5.0-rc2 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
| -rw-r--r-- | drivers/i2c/i2c-dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 1aca742fde4a..ccd76c71af09 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -470,9 +470,15 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) data_arg.data); } case I2C_RETRIES: + if (arg > INT_MAX) + return -EINVAL; + client->adapter->retries = arg; break; case I2C_TIMEOUT: + if (arg > INT_MAX) + return -EINVAL; + /* For historical reasons, user-space sets the timeout * value in units of 10 ms. */ |
