diff options
| author | Vincent Li <[email protected]> | 2009-09-22 23:45:38 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-09-23 14:39:40 +0000 |
| commit | cba8aafe1e07dfc8bae5ba78be8e02883bd34d31 (patch) | |
| tree | 473586963e635921613db5e4ae8ac339ae497a18 /fs/proc/array.c | |
| parent | fs/proc/task_mmu.c v1: fix clear_refs_write() input sanity check (diff) | |
| download | kernel-cba8aafe1e07dfc8bae5ba78be8e02883bd34d31.tar.gz kernel-cba8aafe1e07dfc8bae5ba78be8e02883bd34d31.zip | |
fs/proc/base.c: fix proc_fault_inject_write() input sanity check
Remove obfuscated zero-length input check and return -EINVAL instead of
-EIO error to make the error message clear to user. Add whitespace
stripping. No functionality changes.
The old code:
echo 1 > /proc/pid/make-it-fail (ok)
echo 1foo > /proc/pid/make-it-fail (-bash: echo: write error: Input/output error)
The new code:
echo 1 > /proc/pid/make-it-fail (ok)
echo 1foo > /proc/pid/make-it-fail (-bash: echo: write error: Invalid argument)
This patch is conservative in changes to not breaking existing
scripts/applications.
Signed-off-by: Vincent Li <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions
