On 3/23/23 14:29, Maxime Ripard wrote:
On Thu, Mar 23, 2023 at 02:16:52PM +0200, Matti Vaittinen wrote:
This is the description of what was happening:
https://lore.kernel.org/dri-devel/20221117165311.vovrc7usy4efiytl@houat/
Thanks Maxime. Do I read this correcty. The devm_ unwinding not being
done when root_device_register() is used is not because
root_device_unregister() would not trigger the unwinding - but rather
because DRM code on top of this device keeps the refcount increased?
If this is the case, then it sounds like a DRM specific issue to me.
Whether it is a feature or bug is beyond my knowledge. Still, I would
not say using the root_device_[un]register() in generic code is not
feasible - unless all other subsytems have similar refcount handling.
Sure thing using root_device_register() root_device_unregister() in DRM
does not work as such. This, however, does not mean the generic kunit
helpers should use platform_devices to force unwinding?
Well, It's almost the best season for ice-fishing in Finland so opening
a can of worms is not that bad, right? :)
Thanks for the education people! I did learn a thing or two Today.
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~