commit | 15b66cd54291186011f733cc750263f320b8a0a4 | [log] [tgz] |
---|---|---|
author | Herbert Xu <herbert@gondor.apana.org.au> | Tue Dec 23 16:40:18 2014 +1100 |
committer | Herbert Xu <herbert@gondor.apana.org.au> | Fri Dec 26 08:33:34 2014 +1100 |
tree | 3b95b884c9381f5fb6a7ea4286df2288d61ba4ac | |
parent | 77584ee57434813b50fc85cde995a6271a5081b7 [diff] |
hwrng: core - Fix current_rng init/cleanup race yet again The kref solution is still buggy because we were only focusing on the register/unregister race. The same race affects the setting of current_rng through sysfs. This patch fixes it by using kref_get_unless_zero. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>