Re: [PATCH] x86: mcheck: call put_device on device_register failure

From: Levente Kurusa
Date: Sat Nov 30 2013 - 06:45:13 EST


2013-11-30 12:32, Borislav Petkov:
> On Sat, Nov 30, 2013 at 12:25:44PM +0100, Levente Kurusa wrote:
>> Now this tree makes me wonder if there are devices where the author
>> forgot to set a device_release or when the put_device is not called. I
>> will take a look into this.
>
> kobject_cleanup() warns about !t->release already.

Yes, I saw that as well. By that I meant that by doing some identifier searches
for device_register and then checking whether they call put_device and have device_release
registered. Also, I wonder if it would be beneficial to have a generic device_release? Most
of the drivers I quickly swept through only call kfree(). Wouldn't a generic one save
some space?

>
> If you want to fix actual issues and not waste time with potential
> issues which have never actually triggered, try building a couple of
> randconfigs and look at the output :-)

Yes, I do that daily usually, but most of the time I only get some uninitialized warnings. :-)

>
> Also, we have "make W=" which gives you even more :-)

What does that do? Never heard of it yet.

--
Regards,
Levente Kurusa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/