lkml.org 
[lkml]   [2018]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 4/5] pselect6: use __kernel_timespec
On Sun, Sep 16, 2018 at 06:04:57PM -0700, Deepa Dinamani wrote:
> static long do_compat_pselect(int n, compat_ulong_t __user *inp,
> compat_ulong_t __user *outp, compat_ulong_t __user *exp,
> - struct old_timespec32 __user *tsp, compat_sigset_t __user *sigmask,
> - compat_size_t sigsetsize)
> + void __user *tsp, compat_sigset_t __user *sigmask,
> + compat_size_t sigsetsize, enum poll_time_type type)
> {
> sigset_t ksigmask, sigsaved;
> struct timespec64 ts, end_time, *to = NULL;
> int ret;
>
> if (tsp) {
> - if (get_old_timespec32(&ts, tsp))
> - return -EFAULT;
> + switch (type) {
> + case PT_OLD_TIMESPEC:
> + if (get_old_timespec32(&ts, tsp))
> + return -EFAULT;
> + break;
> + case PT_TIMESPEC:
> + if (get_old_timespec32(&ts, tsp))
> + return -EFAULT;
> + break;
> + default:
> + BUG();
> + }

One of the two get_old_timespec32 calls here should be
get_timespec64.

\
 
 \ /
  Last update: 2018-09-17 23:00    [W:0.123 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site