* Regression caused by commit cc56f7de7f00d188c7c4da1e9861581853b9e92f
@ 2010-06-25 20:18 Tim Gardner
2010-06-28 3:11 ` Changli Gao
0 siblings, 1 reply; 4+ messages in thread
From: Tim Gardner @ 2010-06-25 20:18 UTC (permalink / raw)
To: xiaosuo; +Cc: linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
Fat fingered the original email and didn't get the fsdevel address correct.
-----------------------
Hi,
I have bisected a strange regression down to this commit that you made.
If I apply the attached patch (which restores the original 2 lines of
code), then everything works correctly. I apologize, but I don't have a
simple reproducer. The gist of the problem is that Java cannot decrypt a
file under certain circumstances, e.g., "ERROR
javax.crypto.BadPaddingException: pad block corrupted". There is more
information in the bug report at http://bugs.launchpad.net/bugs/588861 ,
but not all of it is helpful.
Any thoughts?
rtg
--
Tim Gardner tim.gardner@canonical.com
[-- Attachment #2: 0001-fs-Restore-previously-removed-f_op-checks.patch --]
[-- Type: text/x-patch, Size: 1283 bytes --]
>From 8565505534da369292d593e174255cf5c398f703 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Fri, 25 Jun 2010 13:53:55 -0600
Subject: [PATCH] fs: Restore previously removed f_op checks.
BugLink: http://bugs.launchpad.net/bugs/588861
commit cc56f7de7f00d188c7c4da1e9861581853b9e92f removed
a check for output file f_op and f_op->sendpage. This appears
to have caused a regression in the ability of Java
to read and decrypt files. This would be simpler if
there was an easy reproducer, but so far the only way I've
been able to get it to fail is within the Maverick
UEC environment.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
fs/read_write.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 9c04852..3203ca1 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -845,6 +845,8 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
if (!(out_file->f_mode & FMODE_WRITE))
goto fput_out;
retval = -EINVAL;
+ if (!out_file->f_op || !out_file->f_op->sendpage)
+ goto fput_out;
in_inode = in_file->f_path.dentry->d_inode;
out_inode = out_file->f_path.dentry->d_inode;
retval = rw_verify_area(WRITE, out_file, &out_file->f_pos, count);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Regression caused by commit cc56f7de7f00d188c7c4da1e9861581853b9e92f
2010-06-25 20:18 Regression caused by commit cc56f7de7f00d188c7c4da1e9861581853b9e92f Tim Gardner
@ 2010-06-28 3:11 ` Changli Gao
2010-06-28 13:53 ` Tim Gardner
0 siblings, 1 reply; 4+ messages in thread
From: Changli Gao @ 2010-06-28 3:11 UTC (permalink / raw)
To: tim.gardner; +Cc: linux-fsdevel, Miklos Szeredi, Jens Axboe
On Sat, Jun 26, 2010 at 4:18 AM, Tim Gardner <tim.gardner@canonical.com> wrote:
> Fat fingered the original email and didn't get the fsdevel address correct.
>
> -----------------------
> Hi,
>
> I have bisected a strange regression down to this commit that you made. If I
> apply the attached patch (which restores the original 2 lines of code), then
> everything works correctly. I apologize, but I don't have a simple
> reproducer. The gist of the problem is that Java cannot decrypt a file under
> certain circumstances, e.g., "ERROR javax.crypto.BadPaddingException: pad
> block corrupted". There is more information in the bug report at
> http://bugs.launchpad.net/bugs/588861 , but not all of it is helpful.
>
> Any thoughts?
>
It seems the target of sendfile(2) isn't a socket, and the current
sendfile(2) code can't handle non-socket target correctly. Please try
this patch: http://marc.info/?l=linux-fsdevel&m=127488508224173&w=2 .
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regression caused by commit cc56f7de7f00d188c7c4da1e9861581853b9e92f
2010-06-28 3:11 ` Changli Gao
@ 2010-06-28 13:53 ` Tim Gardner
2010-06-28 13:58 ` Changli Gao
0 siblings, 1 reply; 4+ messages in thread
From: Tim Gardner @ 2010-06-28 13:53 UTC (permalink / raw)
To: Changli Gao; +Cc: linux-fsdevel, Miklos Szeredi, Jens Axboe
On 06/27/2010 09:11 PM, Changli Gao wrote:
> On Sat, Jun 26, 2010 at 4:18 AM, Tim Gardner<tim.gardner@canonical.com> wrote:
>> Fat fingered the original email and didn't get the fsdevel address correct.
>>
>> -----------------------
>> Hi,
>>
>> I have bisected a strange regression down to this commit that you made. If I
>> apply the attached patch (which restores the original 2 lines of code), then
>> everything works correctly. I apologize, but I don't have a simple
>> reproducer. The gist of the problem is that Java cannot decrypt a file under
>> certain circumstances, e.g., "ERROR javax.crypto.BadPaddingException: pad
>> block corrupted". There is more information in the bug report at
>> http://bugs.launchpad.net/bugs/588861 , but not all of it is helpful.
>>
>> Any thoughts?
>>
>
> It seems the target of sendfile(2) isn't a socket, and the current
> sendfile(2) code can't handle non-socket target correctly. Please try
> this patch: http://marc.info/?l=linux-fsdevel&m=127488508224173&w=2 .
>
Thanks - this patch appears to have fixed 'pad block corrupted' error.
Is it queued for 2.6.35-rc4 ?
rtg
--
Tim Gardner tim.gardner@canonical.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regression caused by commit cc56f7de7f00d188c7c4da1e9861581853b9e92f
2010-06-28 13:53 ` Tim Gardner
@ 2010-06-28 13:58 ` Changli Gao
0 siblings, 0 replies; 4+ messages in thread
From: Changli Gao @ 2010-06-28 13:58 UTC (permalink / raw)
To: tim.gardner; +Cc: linux-fsdevel, Miklos Szeredi, Jens Axboe
On Mon, Jun 28, 2010 at 9:53 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
>
> Thanks - this patch appears to have fixed 'pad block corrupted' error. Is it
> queued for 2.6.35-rc4 ?
>
I have not heard any thing from Jens. :( It seems that it isn't applied.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-28 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-25 20:18 Regression caused by commit cc56f7de7f00d188c7c4da1e9861581853b9e92f Tim Gardner
2010-06-28 3:11 ` Changli Gao
2010-06-28 13:53 ` Tim Gardner
2010-06-28 13:58 ` Changli Gao
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).