Merge tag 'for-linus-5.0' of git://github.com/cminyard/linux-ipmi
[sfrench/cifs-2.6.git] / drivers / ptp / ptp_chardev.c
index 797fab33bb983913d50864ce7c6a792a6c3a6f95..7cbea796652aca1ef537d9cdc68b645d340f73ee 100644 (file)
@@ -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;
                }