Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164825025
D55845.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
477 B
Referenced Files
None
Subscribers
None
D55845.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h
--- a/sys/compat/linuxkpi/common/include/linux/fs.h
+++ b/sys/compat/linuxkpi/common/include/linux/fs.h
@@ -368,8 +368,8 @@
size_t buf_remain = buf_size - *ppos;
ssize_t num_read;
- if (buf_remain < 0 || buf_remain > buf_size)
- return -EINVAL;
+ if (*ppos >= buf_size || read_size == 0)
+ return (0);
if (read_size > buf_remain)
read_size = buf_remain;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 5:36 AM (1 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36000647
Default Alt Text
D55845.diff (477 B)
Attached To
Mode
D55845: LinuxKPI: Better handling of zero-size and off-the-end reads
Attached
Detach File
Event Timeline
Log In to Comment