linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Errenous sizeof use in raid1
@ 2005-02-23 12:30 Alexander Nyberg
  0 siblings, 0 replies; only message in thread
From: Alexander Nyberg @ 2005-02-23 12:30 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid

This isn't a real bug as the smallest slab-size is 32 bytes 
but please apply for consistency.

Found by the Coverity tool.

Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>

===== drivers/md/raid1.c 1.105 vs edited =====
--- 1.105/drivers/md/raid1.c	2005-01-08 06:44:10 +01:00
+++ edited/drivers/md/raid1.c	2005-02-23 13:23:21 +01:00
@@ -1346,7 +1346,7 @@ static int raid1_reshape(mddev_t *mddev,
 		if (conf->mirrors[d].rdev)
 			return -EBUSY;
 
-	newpoolinfo = kmalloc(sizeof(newpoolinfo), GFP_KERNEL);
+	newpoolinfo = kmalloc(sizeof(*newpoolinfo), GFP_KERNEL);
 	if (!newpoolinfo)
 		return -ENOMEM;
 	newpoolinfo->mddev = mddev;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-23 12:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-23 12:30 [PATCH] Errenous sizeof use in raid1 Alexander Nyberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).