public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e80cf94
)
syscall_fs: stop pipe() working with a r/o fs backing it
author
Alan Cox
<alan@linux.intel.com>
Wed, 8 Nov 2017 15:52:47 +0000
(15:52 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Wed, 8 Nov 2017 15:52:47 +0000
(15:52 +0000)
Kernel/syscall_fs.c
patch
|
blob
|
history
diff --git
a/Kernel/syscall_fs.c
b/Kernel/syscall_fs.c
index
b4e0721
..
c4b1605
100644
(file)
--- a/
Kernel/syscall_fs.c
+++ b/
Kernel/syscall_fs.c
@@
-324,6
+324,11
@@
arg_t _pipe(void)
goto nogood2;
}
+ if (ino->c_flags & CRDONLY) {
+ udata.u_error = EROFS;
+ goto nogood3;
+ }
+
udata.u_files[u2] = oft2;
of_tab[oft1].o_ptr = 0;
@@
-345,6
+350,8
@@
arg_t _pipe(void)
uputw(u2, fildes + 1);
return (0);
+ nogood3:
+ i_deref(ino);
nogood2:
oft_deref(oft1);
udata.u_files[u1] = NO_FILE;