summaryrefslogtreecommitdiffstats
path: root/drivers/ptp/ptp_chardev.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-28 08:44:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-28 08:44:58 +0100
commitc9381e185fdcf86e9d7966d638c933894f87cdd7 (patch)
treed99259aded85a3fb95e9d52c56d9d3a0cfdfe460 /drivers/ptp/ptp_chardev.c
parentac626ff960624d81442a3ec4a3e71a9e929e98ae (diff)
parentf17b5f06cb92ef2250513a1e154c47b78df07d40 (diff)
downloadlinux-c9381e185fdcf86e9d7966d638c933894f87cdd7.tar.gz
linux-c9381e185fdcf86e9d7966d638c933894f87cdd7.tar.bz2
linux-c9381e185fdcf86e9d7966d638c933894f87cdd7.zip
Merge 5.0-rc4 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/ptp/ptp_chardev.c')
-rw-r--r--drivers/ptp/ptp_chardev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 797fab33bb98..7cbea796652a 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -224,7 +224,8 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
extoff = NULL;
break;
}
- if (extoff->n_samples > PTP_MAX_SAMPLES) {
+ if (extoff->n_samples > PTP_MAX_SAMPLES
+ || extoff->rsv[0] || extoff->rsv[1] || extoff->rsv[2]) {
err = -EINVAL;
break;
}