Commit 4aca4627 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

drivers/autotune: do not read user data we should not expect

We receive the sampling period from the setup struct attached to the
AUTOTUNE_RTIOC_{IRQ,KERN,USER} requests, drop the last copy from user
from autotune_ioctl_nrt() which is spurious.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 061196b3
......@@ -634,7 +634,7 @@ static int autotune_ioctl_nrt(struct rtdm_fd *fd, unsigned int request, void *ar
struct autotune_context *context;
struct autotune_setup setup;
struct gravity_tuner *tuner;
int period, ret;
int ret;
if (request == AUTOTUNE_RTIOC_RESET) {
xnclock_reset_gravity(&nkclock);
......@@ -668,10 +668,6 @@ static int autotune_ioctl_nrt(struct rtdm_fd *fd, unsigned int request, void *ar
return -EINVAL;
}
ret = rtdm_safe_copy_from_user(fd, &period, arg, sizeof(period));
if (ret)
return ret;
ret = tuner->init_tuner(tuner);
if (ret)
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment