All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Yao <ryao-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
To: Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org,
	zfs-devel-VKpPRiiRko4/ohRxsw7f2g@public.gmane.org
Subject: Re: [PATCH] fs: generic_file_llseek_size() should recognize invalid whence values
Date: Thu, 27 Jun 2013 23:42:49 -0400	[thread overview]
Message-ID: <51CD0639.2000703@gentoo.org> (raw)
In-Reply-To: <20130628030959.GD4165-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On 06/27/2013 11:09 PM, Al Viro wrote:
> 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.
> 

Agreed. That patch was written before I spotted that and was not meant
to go out. It came along for the ride because my outgoing/ folder was dirty.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

  parent reply	other threads:[~2013-06-28  3:42 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
     [not found]       ` <20130628030959.GD4165-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2013-06-28  3:42         ` Richard Yao [this message]
  -- 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=51CD0639.2000703@gentoo.org \
    --to=ryao-abrp7r+bbdudnm+yrofe0a@public.gmane.org \
    --cc=kernel-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    --cc=zfs-devel-VKpPRiiRko4/ohRxsw7f2g@public.gmane.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.