summaryrefslogtreecommitdiffstats
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorMiroslav Benes <mbenes@suse.cz>2017-12-21 14:40:43 +0100
committerJiri Kosina <jkosina@suse.cz>2018-01-11 17:36:07 +0100
commit8869016d3a58cbe7c31c70f4f008a92122b271c7 (patch)
tree02ebd2a73b91b135034353426d3430e3b28c7832 /kernel/cred.c
parentc99a2be790b07752d8cc694434d3450afd4c5a00 (diff)
downloadtalos-op-linux-8869016d3a58cbe7c31c70f4f008a92122b271c7.tar.gz
talos-op-linux-8869016d3a58cbe7c31c70f4f008a92122b271c7.zip
livepatch: add locking to force and signal functions
klp_send_signals() and klp_force_transition() do not acquire klp_mutex, because it seemed to be superfluous. A potential race in klp_send_signals() was harmless and there was nothing in klp_force_transition() which needed to be synchronized. That changed with the addition of klp_forced variable during the review process. There is a small window now, when klp_complete_transition() does not see klp_forced set to true while all tasks have been already transitioned to the target state. module_put() is called and the module can be removed. Acquire klp_mutex in sysfs callback to prevent it. Do the same for the signal sending just to be sure. There is no real downside to that. Fixes: c99a2be790b07 ("livepatch: force transition to finish") Fixes: 43347d56c8d9d ("livepatch: send a fake signal to all blocking tasks") Reported-by: Jason Baron <jbaron@akamai.com> Signed-off-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.com> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel/cred.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud