* hfsplus: Missing O_LARGEFILE check
@ 2008-09-23 12:49 Alan Cox
2008-09-23 13:13 ` [PATCH] hfsplus: Missing O_LARGEFILE check (correct diff this time) Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2008-09-23 12:49 UTC (permalink / raw)
To: linux-fsdevel, akpm
hfsplus: O_LARGEFILE checking is missing
From: Alan Cox <alan@redhat.com>
Closes #8490
---
fs/hfsplus/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index b085d64..04af5a0 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -254,6 +254,8 @@ static int hfsplus_file_open(struct inode *inode, struct file *file)
{
if (HFSPLUS_IS_RSRC(inode))
inode = HFSPLUS_I(inode).rsrc_inode;
+ if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
+ return -EOVERFLOW;
atomic_inc(&HFSPLUS_I(inode).opencnt);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] hfsplus: Missing O_LARGEFILE check (correct diff this time)
2008-09-23 12:49 hfsplus: Missing O_LARGEFILE check Alan Cox
@ 2008-09-23 13:13 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2008-09-23 13:13 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-fsdevel, akpm
Sorry wrong version. Correct one attached
hfsplus: O_LARGEFILE checking is missing
From: Alan Cox <alan@redhat.com>
Closes #8490
---
fs/hfsplus/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index b085d64..963be64 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -254,6 +254,8 @@ static int hfsplus_file_open(struct inode *inode, struct file *file)
{
if (HFSPLUS_IS_RSRC(inode))
inode = HFSPLUS_I(inode).rsrc_inode;
+ if (!(file->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
+ return -EOVERFLOW;
atomic_inc(&HFSPLUS_I(inode).opencnt);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-23 13:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23 12:49 hfsplus: Missing O_LARGEFILE check Alan Cox
2008-09-23 13:13 ` [PATCH] hfsplus: Missing O_LARGEFILE check (correct diff this time) Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).