lkml.org 
[lkml]   [2007]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.24-rc4-mm1 kobject changes broken with hvcs driver on powerpc
On Fri, Dec 07, 2007 at 12:28:58AM +0530, Balbir Singh wrote:
> Greg KH wrote:
>
> >> Why release the spinlock here? It's done after the count is incremented.
> >> This patch does not seem correct.
> >
> > Doh, you are correct, I'll make sure that I fix this up before applying
> > it.
> >
> > thanks,
> >
> > greg k-h
>
> Hi, Greg,
>
> I ran some tests with the fixed up version of this patch and the system
> fails to come up.
>
> I see the WARN_ON in lib/kref.c:33 and the system fails to boot beyond
> that point. I have not yet found time to debug it though.

That's not good, that warning means that someone has tried to use this
kref _before_ it was initialized, so there is a logic error in the code
that was previously being papered over with the lack of this message in
the kobject code.

I do have this same message availble as a patch for the kobject core, it
would be interesting if you could just run 2.6.24-rc4 with just this
patch:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-01-driver/kobject-warn.patch

it might take some fuzz to fit properly, but all you really want to do
is add:
WARN_ON(atomic_read(&kobj->kref.refcount));
before the kref_init() call in kobject_init().

thanks,

greg k-h


\
 
 \ /
  Last update: 2007-12-06 21:47    [W:0.173 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site