Re: [PATCH] fs: generic_file_llseek_size() should recognize invalid whence values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux