From: Herbert Xu Date: Tue, 23 Dec 2014 05:40:18 +0000 (+1100) Subject: hwrng: core - Fix current_rng init/cleanup race yet again X-Git-Tag: fixes-v4.0-rc1~106^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b66cd54291186011f733cc750263f320b8a0a4;p=pandora-kernel.git 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 --- Reading git-diff-tree failed