linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Nyberg <alexn@dsv.su.se>
To: neilb@cse.unsw.edu.au
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] Errenous sizeof use in raid1
Date: Wed, 23 Feb 2005 13:30:33 +0100	[thread overview]
Message-ID: <1109161833.2249.27.camel@boxen> (raw)

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;



                 reply	other threads:[~2005-02-23 12:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1109161833.2249.27.camel@boxen \
    --to=alexn@dsv.su.se \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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;
as well as URLs for NNTP newsgroup(s).