Hello all.
This patch adds a FIFO/pipe check to posix_fadvise system call.
If the specified file descriptor is pipe or FIFO, the system call
returns ESPIPE error.
Thank you.
Signed-off-by: Valentine Barshak <[email protected]>
--- a/mm/fadvise.c 2005-10-10 22:54:29.000000000 +0400
+++ b/mm/fadvise.c 2005-12-06 23:04:19.980711464 +0300
@@ -37,6 +37,11 @@
if (!file)
return -EBADF;
+ if (S_ISFIFO(file->f_dentry->d_inode->i_mode)) {
+ ret = -ESPIPE;
+ goto out;
+ }
+
mapping = file->f_mapping;
if (!mapping || len < 0) {
ret = -EINVAL;
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]