]> git.baikalelectronics.ru Git - kernel.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)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 7 Jun 2017 23:01:32 +0000 (19:01 -0400)
commitbd20d3f066e39f28b85c08d972bcf88a58fabbe5
treeb06b973a94111993fa11672556d0e0c9d1bd134d
parentcd2786e1ec779c1b24f9bada27a07155f7266b8d
random: use lockless method of accessing and updating f->reg_idx

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

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
drivers/char/random.c