Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 351072 Details for
Bug 473444
[PATCH] fs: generic_file_llseek_size() should recognize invalid whence values
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix issue
0001-fs-generic_file_llseek_size-should-recognize-invalid.patch (text/plain), 1.14 KB, created by
Richard Yao (RETIRED)
on 2013-06-16 01:10:45 UTC
(
hide
)
Description:
Patch to fix issue
Filename:
MIME Type:
Creator:
Richard Yao (RETIRED)
Created:
2013-06-16 01:10:45 UTC
Size:
1.14 KB
patch
obsolete
>From fa05d85147f0932e7d0e347bab598c7ad2d11757 Mon Sep 17 00:00:00 2001 >From: Richard Yao <ryao@gentoo.org> >Date: Sat, 15 Jun 2013 20:48:38 -0400 >Subject: [PATCH] fs: generic_file_llseek_size() should recognize invalid > whence values > >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. > >Signed-off-by: Richard Yao <ryao@gentoo.org> >--- > fs/read_write.c | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/fs/read_write.c b/fs/read_write.c >index 0343000..54b8808 100644 >--- a/fs/read_write.c >+++ b/fs/read_write.c >@@ -81,6 +81,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence, > switch (whence) { > case SEEK_END: > offset += eof; >+ case SEEK_SET: > break; > case SEEK_CUR: > /* >@@ -118,6 +119,8 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence, > return -ENXIO; > offset = eof; > break; >+ default: >+ return -EINVAL; > } > > return lseek_execute(file, inode, offset, maxsize); >-- >1.8.1.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 473444
: 351072