Re: [PATCH 3/5] hwrng: core - Do not register device opportunistically

2014-12-25 Thread Herbert Xu
On Wed, Dec 24, 2014 at 09:59:41AM +1030, Rusty Russell wrote: > > Does this break userspace by creating a device which will just return > -ENODEV on read? Sure, callers *should* handle it... If somebody complains we could easily fix this by making open fail. In fact, if such applications exist

Re: [PATCH 3/5] hwrng: core - Do not register device opportunistically

2014-12-25 Thread Rusty Russell
Herbert Xu writes: > Currently we only register the device when a valid RNG is added. > However the way it's done is buggy because we test whether there > is a current RNG to determine whether we need to register. As > the current RNG may be missing due to a reinitialisation error > this can lead

[PATCH 3/5] hwrng: core - Do not register device opportunistically

2014-12-22 Thread Herbert Xu
Currently we only register the device when a valid RNG is added. However the way it's done is buggy because we test whether there is a current RNG to determine whether we need to register. As the current RNG may be missing due to a reinitialisation error this can lead to a reregistration of the de