]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
random: use lockless method of accessing and updating f->reg_idx
authorTheodore Ts'o <tytso@mit.edu>
Wed, 7 Jun 2017 23:01:32 +0000 (19:01 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:52:22 +0000 (19:52 +0200)
commit77dcc4b901562869171c67ea1fb473cc20cff183
treecb5eef6dbfb6d0c9783f8aa5d69c312eb5d4daf7
parentbd63ed219ea24f7be43687a18ae6544b91a430ae
random: use lockless method of accessing and updating f->reg_idx

commit 92e75428ffc90e2a0321062379f883f3671cfebe upstream.

Linus pointed out that there is a much more efficient way of avoiding
the problem that we were trying to address in commit 9dfa7bba35ac0:
"fix race in drivers/char/random.c:get_reg()".

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c