public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Yinghai Lu <yhlu.kernel@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: linux-next: Tree for September 3
Date: Thu, 4 Sep 2008 00:15:58 -0700	[thread overview]
Message-ID: <20080904001558.875f58b1.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080903230129.806d54af.akpm@linux-foundation.org>

On Wed, 3 Sep 2008 23:01:29 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:

> I'll see if I cen reproduce the bug I'm
> actually tring to find with E100=n.

OK, this regression[*] bisects down to

commit b689ad2b010f09626a6158e1213a075a1aa9f299
Author: Alan Cox <alan@redhat.com>
Date:   Wed Sep 3 10:12:18 2008 +1000

    tty-kref-get-current-tty
    
    We now return a kref covered tty reference. That ensures the tty structure
    doesn't go away when you have a return from get_current_tty. This is not
    enough to protect you from most of the resources being freed behind your
    back - yet.
    

This got a bit ugly, because tty-kref-get-current-tty fixes a pile of
compilation errors which were introduced in the innediately preceding
patch (tty-kref-modcount, I think).  I roughly fixed those up by hand:

--- a/drivers/char/tty_io.c~b
+++ a/drivers/char/tty_io.c
@@ -1283,7 +1283,7 @@ static int init_dev(struct tty_driver *d
 		o_tty = alloc_tty_struct();
 		if (!o_tty)
 			goto free_mem_out;
-		if (!try_module_get(driver->other)) {
+		if (!try_module_get(driver->owner)) {
 			/* This cannot in fact currently happen */
 			free_tty_struct(o_tty);
 			o_tty = NULL;
@@ -1408,7 +1408,7 @@ end_init:
 free_mem_out:
 	kfree(o_tp);
 	if (o_tty) {
-		module_put(o_tty->driver);
+		module_put(o_tty->driver->owner);
 		free_tty_struct(o_tty);
 	}
 	kfree(ltp);
@@ -1469,7 +1469,7 @@ static void release_one_tty(struct kref 
 	tty->magic = 0;
 	/* FIXME: locking on tty->driver->refcount */
 	tty->driver->refcount--;
-	module_put(driver->owner);
+	module_put(tty->driver->owner);
 
 	file_list_lock();
 	list_del_init(&tty->tty_files);
_


I cannot find any of these patches on a mailing list.

I cannot revert tty-kref-get-current-tty and I can't immediately spot
the bug in it.

I could revert the whole tty tree, but I'd prefer that you do it,
please.  I've been trying for two days to get a -mm out, but I'm
building on a foundation of straw :(


[*] symptoms: there are no login prompts appearing on the VT consoles. 
sshd works OK (will it did, but I had to disable the net driver due to
networking bisect breakage).

config: http://userweb.kernel.org/~akpm/config-sony.txt
dmesg: http://userweb.kernel.org/~akpm/dmesg-sony-2.txt

  reply	other threads:[~2008-09-04  7:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03  9:16 linux-next: Tree for September 3 Stephen Rothwell
2008-09-04  2:32 ` [PATCH] hid: fix gyration build error Randy Dunlap
2008-09-04  6:52   ` Jiri Slaby
2008-09-04  8:06     ` Jiri Kosina
2008-09-04  4:42 ` linux-next: Tree for September 3 Andrew Morton
2008-09-04  4:46 ` Andrew Morton
2008-09-04  4:54   ` Andrew Morton
2008-09-04  4:57     ` Stephen Rothwell
2008-09-04  5:05       ` Andrew Morton
2008-09-04  5:20         ` Stephen Rothwell
2008-09-04  6:01           ` Andrew Morton
2008-09-04  7:15             ` Andrew Morton [this message]
2008-09-04  7:48               ` Stephen Rothwell
2008-09-04  9:19               ` Alan Cox
2008-09-04  9:21               ` Alan Cox
2008-09-04 11:01               ` Alan Cox
2008-09-04 14:35               ` Alan Cox
2008-09-04  5:26         ` Linus Torvalds
2008-09-04  5:42           ` Andrew Morton
2008-09-04  5:00     ` Stephen Rothwell
2008-09-04  5:21   ` Linus Torvalds
2008-09-04  5:33     ` Andrew Morton
2008-09-04  7:14       ` Yinghai Lu
2008-09-04  8:00         ` Andrew Morton
2008-09-04  8:23         ` Linus Torvalds
2008-09-04  8:02       ` Linus Torvalds
2008-09-04  8:25         ` Andrew Morton
2008-09-04  8:37           ` Andrew Morton
2008-09-04  9:03             ` Linus Torvalds
2008-09-04  8:50           ` Linus Torvalds
2008-09-04  8:57             ` Andrew Morton
2008-09-04  9:07               ` Linus Torvalds
2008-09-04 17:45                 ` Andrew Morton
2008-09-04 18:05                   ` Linus Torvalds
2008-09-04 18:34                     ` Andrew Morton
2008-09-04 20:31                       ` Eric W. Biederman
2008-09-04 20:41                         ` Andrew Morton
2008-09-04 21:03                           ` Eric W. Biederman
2008-09-04 22:22                             ` Andrew Morton
2008-09-04 22:45                       ` Thomas Gleixner
2008-09-04 23:17                         ` Linus Torvalds
2008-09-05  5:39                           ` Arjan van de Ven
2008-09-04 23:17                         ` Andrew Morton
2008-09-04 23:25                           ` Linus Torvalds
2008-09-04 23:27                           ` Thomas Gleixner
2008-09-05 11:04                             ` Ingo Molnar
2008-09-05 17:49                               ` Andrew Morton
2008-09-09  4:39             ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2009-09-03 11:59 Stephen Rothwell
2010-09-03  3:52 Stephen Rothwell

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=20080904001558.875f58b1.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    --cc=yhlu.kernel@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox