public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, hpa@linux.intel.com
Subject: Re: x86, x32: Correct invalid use of user timespec in the kernel
Date: Fri, 31 Jan 2014 12:50:09 -0500	[thread overview]
Message-ID: <20140131175009.GA27231@redhat.com> (raw)
In-Reply-To: <20140131025453.B594B660CA3@gitolite.kernel.org>

On Fri, Jan 31, 2014 at 02:54:53AM +0000, Linux Kernel wrote:

 > Commit:     2def2ef2ae5f3990aabdbe8a755911902707d268
 > 
 > ...
 >  
 > -	if (get_compat_timespec(&ktspec, timeout))
 > +	if (compat_get_timespec(&ktspec, timeout))
 >  		return -EFAULT;
 >  
 >  	datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
 >  				   flags | MSG_CMSG_COMPAT, &ktspec);
 > -	if (datagrams > 0 && put_compat_timespec(&ktspec, timeout))
 > +	if (datagrams > 0 && compat_put_timespec(&ktspec, timeout))
 >  		datagrams = -EFAULT;
 >  

Can we rename one of each of those functions ?
It's not really surprising they got mixed up given they look so alike.

It looks like an accident just waiting to happen again.

	Dave


       reply	other threads:[~2014-01-31 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140131025453.B594B660CA3@gitolite.kernel.org>
2014-01-31 17:50 ` Dave Jones [this message]
2014-01-31 18:06   ` x86, x32: Correct invalid use of user timespec in the kernel H. Peter Anvin
2014-01-31 18:45     ` Linus Torvalds
2014-01-31 19:00       ` H. Peter Anvin
2014-01-31 19:13       ` H. Peter Anvin
2014-01-31 22:37       ` H. Peter Anvin
2014-02-01 19:07         ` Linus Torvalds

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=20140131175009.GA27231@redhat.com \
    --to=davej@redhat.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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