diff options
author | 2011-04-03 00:09:26 +0900 | |
---|---|---|
committer | 2011-04-19 09:37:06 +1000 | |
commit | 2a086e5d3a23570735f75b784d29b93068070833 (patch) | |
tree | 43949632ba2e1c8ed4a8169d64c406d66ce36f23 /kernel/sysctl.c | |
parent | capabilities: delete all CAP_INIT macros (diff) | |
download | wireguard-linux-2a086e5d3a23570735f75b784d29b93068070833.tar.xz wireguard-linux-2a086e5d3a23570735f75b784d29b93068070833.zip |
TOMOYO: Fix race on updating profile's comment line.
In tomoyo_write_profile() since 2.6.34, a lock was by error missing when
replacing profile's comment line. If multiple threads attempted
echo '0-COMMENT=comment' > /sys/kernel/security/tomoyo/profile
in parallel, garbage collector will fail to kfree() the old value.
Protect the replacement using a lock. Also, keep the old value rather than
replace with empty string when out of memory error has occurred.
Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/sysctl.c')
0 files changed, 0 insertions, 0 deletions