All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Sterba <dave@jikos.cz>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	bugzilla-daemon <bugzilla-daemon@bugzilla.kernel.org>,
	bugme-daemon <bugme-daemon@bugzilla.kernel.org>,
	fox <fox@murder.cz>
Subject: Re: [Bugme-new] [Bug 29302] New: Null pointer dereference with large max_sectors_kb
Date: Fri, 18 Feb 2011 15:18:51 -0500	[thread overview]
Message-ID: <1298059754-sup-2258@think> (raw)
In-Reply-To: <20110218115603.5f235b07.akpm@linux-foundation.org>

Excerpts from Andrew Morton's message of 2011-02-18 14:56:03 -0500:
> On Fri, 18 Feb 2011 14:16:12 -0500
> Chris Mason <chris.mason@oracle.com> wrote:
> 
> > Are there any more kernel messages involved before the oops starts? 
> 
> The full dmesg is in bugzilla. https://bugzilla.kernel.org/show_bug.cgi?id=29302

Ok, so it isn't part of the open devices code that prints errors, my
guess is we're failing to read a good super.

Could you please mkfs.btrfs /dev/xxx, sync, then btrfsck /dev/xxx, I want
to make sure things are really getting written.

Here's a patch that makes sure we have a good bdev after scanning,
hopefully it will let us debug things without your box going boom.

-chris

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d39a989..d8f7ee0 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -757,6 +757,10 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
 	tree_root->fs_info = fs_info;
 
 	bdev = fs_devices->latest_bdev;
+	if (!bdev) {
+		printk(KERN_CRIT "btrfs read devices failed on %s\n", dev_name);
+		goto error_close_devices;
+	}
 	s = sget(fs_type, btrfs_test_super, btrfs_set_super, tree_root);
 	if (IS_ERR(s))
 		goto error_s;

  reply	other threads:[~2011-02-18 20:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-29302-10286@https.bugzilla.kernel.org/>
2011-02-17 23:37 ` [Bugme-new] [Bug 29302] New: Null pointer dereference with large max_sectors_kb Andrew Morton
2011-02-18 17:43   ` David Sterba
2011-02-18 19:16     ` Chris Mason
2011-02-18 19:56       ` Andrew Morton
2011-02-18 20:18         ` Chris Mason [this message]
2011-02-20 11:06           ` Tomas Zvala
2011-02-21 15:08             ` Chris Mason
2011-02-28 12:26               ` Tomas Zvala

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=1298059754-sup-2258@think \
    --to=chris.mason@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=dave@jikos.cz \
    --cc=fox@murder.cz \
    --cc=linux-btrfs@vger.kernel.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.