All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andrew Morton <akpm@osdl.org>, Tejun Heo <tj@home-tj.org>
Cc: mingo@elte.hu, diffie@gmail.com, linux-kernel@vger.kernel.org,
	diffie@blazebox.homeip.net, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Andries Brouwer <Andries.Brouwer@cwi.nl>
Subject: Re: 2.6.10-rc1-mm3
Date: Tue, 9 Nov 2004 00:05:09 -0800	[thread overview]
Message-ID: <20041109080509.GA10724@kroah.com> (raw)
In-Reply-To: <20041109071455.GA11643@kroah.com>

On Mon, Nov 08, 2004 at 11:14:55PM -0800, Greg KH wrote:
> On Mon, Nov 08, 2004 at 09:27:47PM -0800, Andrew Morton wrote:
> > Greg KH <greg@kroah.com> wrote:
> > >
> > > So I don't see how that could be failing here.  And why I don't see this
> > >  on my boxes...
> > 
> > OK, progress.  The oops is due to CONFIG_LEGACY_PTY_COUNT=512.  I assume
> > anything greater than 256 will trigger it.
> > 
> > - tty_register_driver() calls tty_register_device() for 512 devices.
> > 
> > - tty_register_device() calls pty_line_name() for the 512 devices, but
> >   pty_line_name() only understands 256 devices.  After that, it starts
> >   returning duplicated names.
> > 
> > - class_simple_device_add() gets an -EEXIST return from
> >   class_device_register() and then tries to kfree local variable s_dev, but
> >   it's already free.  Presumably all that icky refcounting under
> >   class_device_register() did this for us already.  Can you fix this one
> >   Greg?  Just enable slab debugging, set CONFIG_LEGACY_PTY_COUNT=512 and
> >   watch the fun.
> 
> Ick, yeah, I just tested that.  I don't know why that's happening, I'll
> go fix it up now.

Ah, found it.  Was caused by a patch from Tejun Heo <tj@home-tj.org>
that went into the tree in my last round of driver core changes.

Tejun, the call to unlink() in the error path in kobject_add() does a
kobject_put().  Your patch added an extra kobject_put() which caused bad
things to happen when we failed.

Andrew, does the patch below fix the issue for you?  It fixed my test
case.

thanks,

greg k-h

 Subject: Remove extra kobject_put() in kobject_add() error path.

 Also document the thing so no one tries to "fix" it again...
 
 Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


--- a/lib/kobject.c	2004-11-05 10:06:33 -08:00
+++ b/lib/kobject.c	2004-11-08 23:58:02 -08:00
@@ -181,10 +181,10 @@ int kobject_add(struct kobject * kobj)
 
 	error = create_dir(kobj);
 	if (error) {
+		/* Does the kobject_put() for us */
 		unlink(kobj);
 		if (parent)
 			kobject_put(parent);
-		kobject_put(kobj);
 	} else {
 		kobject_hotplug(kobj, KOBJ_ADD);
 	}

  reply	other threads:[~2004-11-09  8:08 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-06 19:04 2.6.10-rc1-mm3 Paul Blazejowski
2004-11-07 10:48 ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-07 17:24   ` 2.6.10-rc1-mm3 Paul Blazejowski
2004-11-08  7:59   ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-08  7:42     ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-08 22:42       ` 2.6.10-rc1-mm3 Greg KH
2004-11-09  5:27         ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-09  7:14           ` 2.6.10-rc1-mm3 Greg KH
2004-11-09  8:05             ` Greg KH [this message]
2004-11-09  8:15               ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-09  8:27                 ` 2.6.10-rc1-mm3 Greg KH
2004-11-09 12:11               ` 2.6.10-rc1-mm3 Tejun Heo
2004-11-09  7:53           ` 2.6.10-rc1-mm3 Olivier Poitrey
2004-11-09  8:22             ` 2.6.10-rc1-mm3 Arjan van de Ven
2004-11-09  9:25               ` 2.6.10-rc1-mm3 Olivier Poitrey
2004-11-09 10:37               ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-09  9:39                 ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-09 10:44                   ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-09 10:33           ` 2.6.10-rc1-mm3 Andries Brouwer
2004-11-11  1:52             ` 2.6.10-rc1-mm3 H. Peter Anvin
2004-11-09 18:24           ` 2.6.10-rc1-mm3 Paul Blazejowski
  -- strict thread matches above, loose matches on Subject: below --
2004-11-08 12:34 2.6.10-rc1-mm3 Karsten Wiese
2004-11-08 21:40 ` 2.6.10-rc1-mm3 Karsten Wiese
2004-11-08 22:25   ` 2.6.10-rc1-mm3 linux-os
2004-11-08 23:30   ` 2.6.10-rc1-mm3 Chris Wright
     [not found] <20041105001328.3ba97e08.akpm@osdl.org.suse.lists.linux.kernel>
     [not found] ` <418B5C70.7090206@kolivas.org.suse.lists.linux.kernel>
2004-11-05 11:53   ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:16     ` 2.6.10-rc1-mm3 Con Kolivas
2004-11-05 12:23       ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05  8:13 2.6.10-rc1-mm3 Andrew Morton
2004-11-05  9:41 ` 2.6.10-rc1-mm3 Lorenzo Allegrucci
2004-11-05 10:17   ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-05 10:48     ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:36       ` 2.6.10-rc1-mm3 Lorenzo Allegrucci
2004-11-05 10:22   ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 10:38     ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 11:09     ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 11:17       ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 11:24         ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 11:43           ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:15           ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 12:22             ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:57               ` 2.6.10-rc1-mm3 Rafael J. Wysocki
2004-11-05 13:02                 ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 17:47                   ` 2.6.10-rc1-mm3 Rafael J. Wysocki
2004-11-05 11:20       ` 2.6.10-rc1-mm3 Russell King
2004-11-05 11:30         ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 10:17 ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 15:54   ` 2.6.10-rc1-mm3 Michael Baehr
2004-11-05 10:56 ` 2.6.10-rc1-mm3 Con Kolivas
2004-11-05 18:07 ` 2.6.10-rc1-mm3 Rafael J. Wysocki
2004-11-05 18:07 ` 2.6.10-rc1-mm3 Adam Heath
2004-11-06  7:16 ` 2.6.10-rc1-mm3 Pasi Savolainen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041109080509.GA10724@kroah.com \
    --to=greg@kroah.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=diffie@blazebox.homeip.net \
    --cc=diffie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tj@home-tj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.