linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stepan Golosunov <stepan@golosunov.pp.ru>
To: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: viro@zeniv.linux.org.uk, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, arnd@arndb.de,
	y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org,
	linux-api@vger.kernel.org, linux-aio@kvack.org
Subject: Re: [PATCH v3 4/5] pselect6: use __kernel_timespec
Date: Tue, 18 Sep 2018 00:34:39 +0400	[thread overview]
Message-ID: <20180917203438.maary2eo64dbuhw2@sghpc.golosunov.pp.ru> (raw)
In-Reply-To: <20180917010458.23159-5-deepa.kernel@gmail.com>

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.

  reply	other threads:[~2018-09-18  2:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17  1:04 [PATCH v3 0/5] y2038: Make ppoll, io_pgetevents and pselect y2038 safe Deepa Dinamani
2018-09-17  1:04 ` [PATCH v3 1/5] signal: Add set_user_sigmask() Deepa Dinamani
2018-09-17  1:04 ` [PATCH v3 2/5] signal: Add restore_user_sigmask() Deepa Dinamani
2018-09-17  1:04 ` [PATCH v3 3/5] ppoll: use __kernel_timespec Deepa Dinamani
2018-09-17  1:04 ` [PATCH v3 4/5] pselect6: " Deepa Dinamani
2018-09-17 20:34   ` Stepan Golosunov [this message]
2018-09-17 21:16     ` Deepa Dinamani
2018-09-17  1:04 ` [PATCH v3 5/5] io_pgetevents: " Deepa Dinamani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180917203438.maary2eo64dbuhw2@sghpc.golosunov.pp.ru \
    --to=stepan@golosunov.pp.ru \
    --cc=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=y2038@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).