All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Richard Yao <ryao@gentoo.org>
Cc: linux-fsdevel@vger.kernel.org, kernel@gentoo.org,
	zfs-devel@zfsonlinux.org
Subject: Re: [PATCH] fs: generic_file_llseek_size() should recognize invalid whence values
Date: Fri, 28 Jun 2013 04:09:59 +0100	[thread overview]
Message-ID: <20130628030959.GD4165@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1372386158-11076-3-git-send-email-ryao@gentoo.org>

On Thu, Jun 27, 2013 at 10:22:38PM -0400, Richard Yao wrote:
> generic_file_llseek_size() handles whence values in a switch statement,
> but it lacks cases for both SEEK_SET and invalid values. This causes it
> to treat all invalid whence values as SEEK_SET, which is wrong.
> 
> We fix that by adding a case for SEEK_SET and a default case.

NAK.  Validation of whence is done before we even get to vfs_llseek().
Leaving it to ->llseek() instances would've been an insanity.

  parent reply	other threads:[~2013-06-28  3:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28  2:22 [PATCH] iterate_bdevs() should be exported Richard Yao
     [not found] ` <1372386158-11076-1-git-send-email-ryao-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2013-06-28  2:22   ` [PATCH] fs: Export iterate_bdevs Richard Yao
2013-06-28  2:22   ` [PATCH] fs: generic_file_llseek_size() should recognize invalid whence values Richard Yao
     [not found]     ` <1372386158-11076-3-git-send-email-ryao-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2013-06-28  2:24       ` Richard Yao
2013-06-28  3:09     ` Al Viro [this message]
     [not found]       ` <20130628030959.GD4165-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2013-06-28  3:42         ` Richard Yao
  -- strict thread matches above, loose matches on Subject: below --
2013-06-16  0:55 Richard Yao

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=20130628030959.GD4165@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=kernel@gentoo.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ryao@gentoo.org \
    --cc=zfs-devel@zfsonlinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.