[PATCH v3 14/16] rtc: utilize new cdev_device_add helper function

Alexandre Belloni alexandre.belloni at free-electrons.com
Tue Mar 7 14:41:35 PST 2017


On 06/03/2017 at 00:04:30 -0700, Logan Gunthorpe wrote:
> Mostly straightforward, but we had to remove the rtc_dev_add/del_device
> functions as they split up the cdev_add and the device_add.
> 
> Doing this also revealed that there was likely another subtle bug:
> seeing cdev_add was done after device_register, the cdev probably
> was not ready before device_add when the uevent occurs. This would
> race with userspace, if it tried to use the device directly after
> the uevent. This is fixed just by using the new helper function.
> 
> Signed-off-by: Logan Gunthorpe <logang at deltatee.com>

I think I already acked v2 but
Acked-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the linux-mtd mailing list