Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Tejun Heo
Miao Xie wrote: > on 2007-11-12 22:08 Tejun Heo wrote: >> It isn't strictly a bug. If the ->show() op fills full PAGE_SIZE and >> returns PAGE_SIZE, the user will get full PAGE_SIZE bytes correctly, so >> it will work. However, considering normal use cases, return value of >> PAGE_SIZE very

Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Miao Xie
on 2007-11-12 22:08 Tejun Heo wrote: It isn't strictly a bug. If the ->show() op fills full PAGE_SIZE and returns PAGE_SIZE, the user will get full PAGE_SIZE bytes correctly, so it will work. However, considering normal use cases, return value of PAGE_SIZE very likely indicates an error

Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Tejun Heo
Miao Xie wrote: > Hi,everyone. > I found that there is a off-by-one problem in the following code. > > Version:2.6.24-rc2 > File:fs/sysfs/file.c:118-122 > Function:fill_read_buffer > > count =

Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Tejun Heo
Miao Xie wrote: Hi,everyone. I found that there is a off-by-one problem in the following code. Version:2.6.24-rc2 File:fs/sysfs/file.c:118-122 Function:fill_read_buffer count = ops-show(kobj,

Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Miao Xie
on 2007-11-12 22:08 Tejun Heo wrote: It isn't strictly a bug. If the -show() op fills full PAGE_SIZE and returns PAGE_SIZE, the user will get full PAGE_SIZE bytes correctly, so it will work. However, considering normal use cases, return value of PAGE_SIZE very likely indicates an error

Re: [PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-12 Thread Tejun Heo
Miao Xie wrote: on 2007-11-12 22:08 Tejun Heo wrote: It isn't strictly a bug. If the -show() op fills full PAGE_SIZE and returns PAGE_SIZE, the user will get full PAGE_SIZE bytes correctly, so it will work. However, considering normal use cases, return value of PAGE_SIZE very likely

[PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-08 Thread Miao Xie
Hi,everyone. I found that there is a off-by-one problem in the following code. Version:2.6.24-rc2 File: fs/sysfs/file.c:118-122 Function: fill_read_buffer count = ops->show(kobj,

[PATCH] sysfs: fix off-by-one error in fill_read_buffer

2007-11-08 Thread Miao Xie
Hi,everyone. I found that there is a off-by-one problem in the following code. Version:2.6.24-rc2 File: fs/sysfs/file.c:118-122 Function: fill_read_buffer count = ops-show(kobj,