On Thu, Sep 08, 2016 at 05:47:13PM +0200, Romain Perier wrote: > > I was wondering something. hwrng_unregister does not check the kref > reference counter of the object... so technically if the current > rng_device is in use, with or without devm... calling > platform->remove will break the driver anyway because > hwrng_unregister will unbind the device from /dev/hwrng. What I mean > is that I think that we had this issue even without > devm_hwrng_register. > > Herbert, could you confirm ? Right. remove can happen at any time and the driver needs to cope with it by returning an error from data_read if the hardware disappears in the middle of an operation. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html