X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Flantiq%2Fpatches-5.4%2F0008-MIPS-lantiq-backport-old-timer-code.patch;fp=target%2Flinux%2Flantiq%2Fpatches-5.4%2F0008-MIPS-lantiq-backport-old-timer-code.patch;h=1d869afd9ad631f1a98728dd05af559873c3c53c;hb=d83a66ab011483e13b6cac345e148d3da0d5f0c7;hp=52e4cbeb1b50609bf4c062dca0b26717fefd75e4;hpb=333b796c04d313cac56043b91461f083b71f8b45;p=openwrt%2Fstaging%2Fmkresin.git diff --git a/target/linux/lantiq/patches-5.4/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-5.4/0008-MIPS-lantiq-backport-old-timer-code.patch index 52e4cbeb1b..1d869afd9a 100644 --- a/target/linux/lantiq/patches-5.4/0008-MIPS-lantiq-backport-old-timer-code.patch +++ b/target/linux/lantiq/patches-5.4/0008-MIPS-lantiq-backport-old-timer-code.patch @@ -172,7 +172,8 @@ Signed-off-by: John Crispin +#endif /* __DANUBE_GPTU_DEV_H__2005_07_26__10_19__ */ --- a/arch/mips/lantiq/xway/Makefile +++ b/arch/mips/lantiq/xway/Makefile -@@ -1,3 +1,9 @@ +@@ -1,4 +1,10 @@ + # SPDX-License-Identifier: GPL-2.0-only -obj-y := prom.o sysctrl.o clk.o dma.o gptu.o dcdc.o +obj-y := prom.o sysctrl.o clk.o dma.o dcdc.o + @@ -880,14 +881,14 @@ Signed-off-by: John Crispin + int ret; + struct gptu_ioctl_param param; + -+ if (!access_ok(VERIFY_READ, (void __user *)arg, sizeof(struct gptu_ioctl_param))) ++ if (!access_ok((void __user *)arg, sizeof(struct gptu_ioctl_param))) + return -EFAULT; + copy_from_user(¶m, (void __user *)arg, sizeof(param)); + + if ((((cmd == GPTU_REQUEST_TIMER || cmd == GPTU_SET_TIMER + || GPTU_SET_COUNTER) && param.timer < 2) + || cmd == GPTU_GET_COUNT_VALUE || cmd == GPTU_CALCULATE_DIVIDER) -+ && !access_ok(VERIFY_WRITE, (void __user *)arg, ++ && !access_ok((void __user *)arg, + sizeof(struct gptu_ioctl_param))) + return -EFAULT; +