public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Avan Anishchuk <matimatik@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Subject: Re: [GIT PULL] SLAB include file dependency fixes + kmemtrace updates
Date: Tue, 7 Apr 2009 13:30:39 +0800	[thread overview]
Message-ID: <20090407053039.GA22854@localhost> (raw)
In-Reply-To: <alpine.LFD.2.00.0904062142110.4010@localhost.localdomain>

On Tue, Apr 07, 2009 at 12:45:37PM +0800, Linus Torvalds wrote:
> 
> 
> On Mon, 6 Apr 2009, Linus Torvalds wrote:
> > 
> > It bisected past them. I'm getting worried that it's timing-related, 
> > because nothing that remains looks even remotely interesting for that Mac 
> > mini, but right now:
> > 
> >  - bad: 56fcef75117a153f298b3fe54af31053f53997dd
> >  - good: bb233fdfc7b7cefe45bfa2e8d1b24e79c60a48e5
> > 
> > and there's not a whole lot of commits in between.
> 
> It's c3b1b1cbf002e65a3cabd479e68b5f35886a26db: 'ramfs: add support for 
> "mode=" mount option'.
> 
> And I checked. Reverting it at the tip fixes it. So no random timing 
> fluctuations.
> 
> So that commit causes some random SLAB corruption, that then (depending 
> apparently on luck) may or may not crash in some odd random places later.
> 
> Wu?

Maybe this bug?

Thanks,
Fengguang
---
ramfs: fix double freeing s_fs_info

On a failed ramfs mount, s_fs_info will be freed twice in ramfs_fill_super()
and ramfs_kill_sb(). Fix it by saving s_fs_info only on success.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index a404fb8..7dbb433 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -225,7 +225,6 @@ static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
 		err = -ENOMEM;
 		goto fail;
 	}
-	sb->s_fs_info = fsi;
 
 	err = ramfs_parse_options(data, &fsi->mount_opts);
 	if (err)
@@ -249,6 +248,7 @@ static int ramfs_fill_super(struct super_block * sb, void * data, int silent)
 		goto fail;
 	}
 	sb->s_root = root;
+	sb->s_fs_info = fsi;
 	return 0;
 fail:
 	kfree(fsi);

  parent reply	other threads:[~2009-04-07  5:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-05 19:39 [GIT PULL] SLAB include file dependency fixes + kmemtrace updates Ingo Molnar
2009-04-05 19:56 ` Linus Torvalds
2009-04-05 20:02   ` Linus Torvalds
2009-04-07  1:51 ` Linus Torvalds
2009-04-07  3:51   ` Linus Torvalds
2009-04-07  4:20     ` Linus Torvalds
2009-04-07  4:45       ` Linus Torvalds
2009-04-07  5:02         ` Wu Fengguang
2009-04-07  5:28         ` [patch] ramfs: add support for "mode=" mount option, fix Ingo Molnar
2009-04-07  5:55           ` Wu Fengguang
2009-04-07  6:03             ` Ingo Molnar
2009-04-07  6:16               ` [PATCH] ramfs: fix double freeing s_fs_info on failed mount Wu Fengguang
2009-04-07  6:53                 ` Ingo Molnar
2009-04-07  7:05                   ` Wu Fengguang
2009-04-07  6:20             ` [PATCH] ramfs: add support for "mode=" mount option, fix Ingo Molnar
2009-04-07  5:30         ` Wu Fengguang [this message]
2009-04-07  4:58   ` [GIT PULL] SLAB include file dependency fixes + kmemtrace updates Ingo Molnar

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=20090407053039.GA22854@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=eduard.munteanu@linux360.ro \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matimatik@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox