lkml.org 
[lkml]   [2009]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kobjects: mark cleaned up kobjects as unitialized
On Wed, Nov 25, 2009 at 07:27:47AM -0800, Greg KH wrote:
> > but basically you can demonstrate the problem with this simple code:
> >
> > struct device dev;
> > while(1) {
> > dev->release = dummy_release_function_that_does_nothing;
>
> WTF!!!
>
> Ugh, if I see one more person try to "trick" the kernel from reporting
> this error by providing a "dummy" release function, I'm going to go find
> a kitten to kick.
>
> Seriously, why are you blatently ignoring the warning that the kernel is
> trying to be nice and give to you? Do we just invent messages that need
> to be worked around?

Oh, and before anyone thinks that I'm being too harsh here, again, refer
to Documentation/kobject.txt:
Note that the kernel will warn you if you forget to provide a
release() method. Do not try to get rid of this warning by
providing an "empty" release function; you will be mocked
mercilessly by the kobject maintainer if you attempt this.

Hence my mocking.

thanks,

greg k-h


\
 
 \ /
  Last update: 2009-11-25 16:43    [W:0.041 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site