Commit 168c42bc authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

fault-inject: add /proc/<pid>/fail-nth

fail-nth interface is only created in /proc/self/task/<current-tid>/.
This change also adds it in /proc/<pid>/.

This makes shell based tool a bit simpler.

	$ bash -c "builtin echo 100 > /proc/self/fail-nth && exec ls /"


Signed-off-by: default avatarAkinobu Mita <>
Cc: Dmitry Vyukov <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 1203c8e6
......@@ -136,7 +136,8 @@ use the boot option:
o proc entries
- /proc/self/task/<current-tid>/fail-nth:
- /proc/<pid>/fail-nth:
- /proc/self/task/<tid>/fail-nth:
Write to this file of integer N makes N-th call in the task fail.
Read from this file returns a integer value. A value of '0' indicates
......@@ -2962,6 +2962,7 @@ static const struct pid_entry tgid_base_stuff[] = {
REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),
REG("fail-nth", 0644, proc_fail_nth_operations),
REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment