]> Git Repo - linux.git/commit - lib/fault-inject.c
fault-inject: simplify access check for fail-nth
authorAkinobu Mita <[email protected]>
Fri, 14 Jul 2017 21:49:57 +0000 (14:49 -0700)
committerLinus Torvalds <[email protected]>
Fri, 14 Jul 2017 22:05:13 +0000 (15:05 -0700)
commit1203c8e6fb0aa1e9c39d2323607a74c3adc34fd8
tree67fc0c8911aec1b7c4bfdfc90305c2ff72b081a0
parentbfc740938d151001cb1158580796f8f3be3bf0c1
fault-inject: simplify access check for fail-nth

The fail-nth file is created with 0666 and the access is permitted if
and only if the task is current.

This file is owned by the currnet user.  So we can create it with 0644
and allow the owner to write it.  This enables to watch the status of
task->fail_nth from another processes.

[[email protected]: don't convert unsigned type value as signed int]
Link: http://lkml.kernel.org/r/[email protected]
[[email protected]: avoid unwanted data race to task->fail_nth]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Akinobu Mita <[email protected]>
Acked-by: Dmitry Vyukov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/proc/base.c
lib/fault-inject.c
This page took 0.053846 seconds and 4 git commands to generate.