linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@linuxpower.ca>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: pee@erkkila.org, Helge Hafting <helgehaf@aitel.hist.no>,
	William Lee Irwin III <wli@holomorphy.com>,
	Andrew Morton <akpm@digeo.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 2.5.70-mm1 bootcrash, possibly RAID-1
Date: Thu, 29 May 2003 03:32:15 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.50.0305290331330.940-100000@montezuma.mastecende.com> (raw)
In-Reply-To: <Pine.LNX.4.50.0305290313030.940-100000@montezuma.mastecende.com>

How does the following patch look for the double free.

On Thu, 29 May 2003, Zwane Mwaikambo wrote:

> slab error in cache_free_debugcheck(): cache `size-32': double free, or memory before object was overwritten
> Call Trace:
>  [<c0148da3>] kfree+0xf3/0x2e0
>  [<c0366a64>] raid0_run+0x234/0x250
>  [<c0366a64>] raid0_run+0x234/0x250
>  [<c012529a>] printk+0x1ca/0x280
>  [<c0371fa4>] do_md_run+0x2f4/0x560
>  [<c0371fbb>] do_md_run+0x30b/0x560
>  [<c012529a>] printk+0x1ca/0x280
>  [<c03724f2>] autorun_array+0x82/0xa0
>  [<c012529a>] printk+0x1ca/0x280
>  [<c03726ff>] autorun_devices+0x1ef/0x230
>  [<c0375569>] autostart_arrays+0x29/0xba
>  [<c036f8f6>] mddev_put+0x16/0xb0
>  [<c0250728>] capable+0x18/0x40
>  [<c03737de>] md_ioctl+0x56e/0x5a0
>  [<c0169759>] blkdev_open+0x29/0x30
>  [<c015f0dc>] dentry_open+0x14c/0x230
>  [<c0148c2a>] kmem_cache_free+0x1ca/0x250
>  [<c02a2f0b>] blkdev_ioctl+0x8b/0x3b1
>  [<c01747d6>] sys_ioctl+0x156/0x310
>  [<c056f6b7>] md_run_setup+0x57/0x80
>  [<c056ef28>] prepare_namespace+0x8/0xa0
>  [<c01050fb>] init+0x5b/0x210
>  [<c01050a0>] init+0x0/0x210
>  [<c01070e5>] kernel_thread_helper+0x5/0x10

Index: linux-2.5/drivers/md/raid0.c
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/md/raid0.c,v
retrieving revision 1.31
diff -u -p -B -r1.31 raid0.c
--- linux-2.5/drivers/md/raid0.c	27 May 2003 04:06:15 -0000	1.31
+++ linux-2.5/drivers/md/raid0.c	29 May 2003 06:35:17 -0000
@@ -85,10 +85,8 @@ static int create_strip_zones (mddev_t *
 	conf->devlist = kmalloc(sizeof(mdk_rdev_t*)*
 				conf->nr_strip_zones*mddev->raid_disks,
 				GFP_KERNEL);
-	if (!conf->devlist) {
-		kfree(conf);
+	if (!conf->devlist)
 		return 1;
-	}
 
 	memset(conf->strip_zone, 0,sizeof(struct strip_zone)*
 				   conf->nr_strip_zones);
@@ -194,7 +192,6 @@ static int create_strip_zones (mddev_t *
 	return 0;
  abort:
 	kfree(conf->devlist);
-	kfree(conf->strip_zone);
 	return 1;
 }
 
-- 
function.linuxpower.ca
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2003-05-29  7:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 11:22 2.5.67-mm1 Andrew Morton
2003-04-08 13:01 ` 2.5.67-mm1 William Lee Irwin III
2003-04-08 13:17 ` 2.5.67-mm1 Ed Tomlinson
2003-04-08 15:31   ` 2.5.67-mm1 Randy.Dunlap
2003-04-08 15:39     ` 2.5.67-mm1 Ed Tomlinson
2003-04-08 16:14       ` 2.5.67-mm1 Randy.Dunlap
2003-04-08 16:18     ` 2.5.67-mm1 Ed Tomlinson
2003-04-08 16:10   ` 2.5.67-mm1 Andrew Morton
2003-04-08 16:50     ` 2.5.67-mm1 Ed Tomlinson
2003-04-08 14:08 ` 2.5.67-mm1 William Lee Irwin III
2003-04-08 16:43 ` 2.5.67-mm1 Helge Hafting
2003-04-09  9:42 ` 2.5.67-mm1 cause framebuffer crash at bootup Helge Hafting
     [not found]   ` <20030409030534.619f7fa0.akpm@digeo.com>
2003-04-09 10:05     ` Andrew Morton
     [not found]   ` <20030409031845.185d853f.akpm@digeo.com>
2003-04-09 10:18     ` Andrew Morton
2003-04-09 20:30       ` Randy.Dunlap
2003-05-28 11:14 ` 2.5.67-mm1 bootcrash, possibly IDE or RAID Helge Hafting
2003-05-28 11:13   ` William Lee Irwin III
2003-05-28 11:34     ` 2.5.70-mm1 " Helge Hafting
2003-05-28 11:35       ` William Lee Irwin III
2003-05-28 22:59         ` 2.5.70-mm1 bootcrash, possibly RAID-1 Helge Hafting
2003-05-28 23:18           ` Andrew Morton
2003-05-28 23:30           ` Paul E. Erkkila
2003-05-29  1:08             ` Neil Brown
2003-05-29  7:14               ` Zwane Mwaikambo
2003-05-29  7:32                 ` Zwane Mwaikambo [this message]
2003-05-30  1:59                   ` Neil Brown
2003-05-31 16:13                     ` Paul E. Erkkila
2003-05-29  4:27           ` Alain Toussaint
2003-05-29 13:22           ` John Stoffel

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=Pine.LNX.4.50.0305290331330.940-100000@montezuma.mastecende.com \
    --to=zwane@linuxpower.ca \
    --cc=akpm@digeo.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=pee@erkkila.org \
    --cc=wli@holomorphy.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