From: Florian Bezdeka <[email protected]> The helper used for copying the timeout values (=mutex_fetch_timeout()) was always copying sizeof(struct timespec64) from user to kernel space. For applications with time_t being 4 bytes only (like for native 32 bit applications) that is simply too much.
Signed-off-by: Florian Bezdeka <[email protected]> --- kernel/cobalt/posix/mutex.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/cobalt/posix/mutex.c b/kernel/cobalt/posix/mutex.c index d43a747b3..70fe7960a 100644 --- a/kernel/cobalt/posix/mutex.c +++ b/kernel/cobalt/posix/mutex.c @@ -349,8 +349,7 @@ COBALT_SYSCALL(mutex_lock, primary, static inline int mutex_fetch_timeout(struct timespec64 *ts, const void __user *u_ts) { - return u_ts == NULL ? -EFAULT : - cobalt_copy_from_user(ts, u_ts, sizeof(*ts)); + return u_ts == NULL ? -EFAULT : cobalt_get_u_timespec(ts, u_ts); } COBALT_SYSCALL(mutex_timedlock, primary, -- 2.29.2
