fault-inject: add /proc/<pid>/fail-nth
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 14 Jul 2017 21:50:00 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jul 2017 22:05:13 +0000 (15:05 -0700)
commit168c42bc56d8d47f67f2a5206506cd4ba3c18475
tree7e82690179b0b796505e493452f04c60df3613d9
parent1203c8e6fb0aa1e9c39d2323607a74c3adc34fd8
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 /"

Link: http://lkml.kernel.org/r/1491490561-10485-6-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/fault-injection/fault-injection.txt
fs/proc/base.c