On Tue, Sep 23, 2025 at 11:43:12AM +0800, Herbert Xu wrote:
On Mon, Sep 15, 2025 at 05:02:15PM +0100, Jonathan McDowell wrote:diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 018316f54621..1682a9f1b28c 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c @@ -341,6 +341,10 @@ static ssize_t rng_current_store(struct device *dev, if (sysfs_streq(buf, "")) { err = enable_best_rng(); + } else if (sysfs_streq(buf, "none")) { + if (current_rng) + cur_rng_set_by_user = 1;Shouldn't this be set unconditionally?
Yes, I guess so. I'd been guided by enable_best_rng() which only clears it if it changes the current RNG, but re-reading I agree that's probably the wrong thing here.
J. -- 101 things you can't have too much of : 16 - Time.
