]> www.infradead.org Git - users/dwmw2/linux.git/commit
tomoyo: Use atomic_t for statistics counter
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Thu, 2 Jan 2020 03:53:49 +0000 (12:53 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Feb 2020 18:18:02 +0000 (18:18 +0000)
commit9db441e545d5dd91a97726ea0e9776fe80d8eba4
tree81a9813cda607cc53827fa34ce8b05933b2cf668
parenta5491f38c7299b4b27d83d88f208ec05e73e0e3d
tomoyo: Use atomic_t for statistics counter

commit a8772fad0172aeae339144598b809fd8d4823331 upstream.

syzbot is reporting that there is a race at tomoyo_stat_update() [1].
Although it is acceptable to fail to track exact number of times policy
was updated, convert to atomic_t because this is not a hot path.

[1] https://syzkaller.appspot.com/bug?id=a4d7b973972eeed410596e6604580e0133b0fc04

Reported-by: syzbot <syzbot+efea72d4a0a1d03596cd@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/tomoyo/common.c