From: Thomas Meyer <thomas@m3y3r.de>
To: cbouatmailru@gmail.com, ccross@android.com,
keescook@chromium.org, tony.luck@intel.com,
matt.fleming@intel.com, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] efi, pstore: Cocci spatch "memdup.spatch"
Date: Sat, 01 Jun 2013 11:40:02 +0200 [thread overview]
Message-ID: <1370079602.29224.8.camel@localhost.localdomain> (raw)
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
--- a/drivers/firmware/efi/efi-pstore.c
+++ b/drivers/firmware/efi/efi-pstore.c
@@ -79,10 +79,9 @@ static int efi_pstore_read_func(struct e
&entry->var.DataSize, entry->var.Data);
size = entry->var.DataSize;
- *cb_data->buf = kmalloc(size, GFP_KERNEL);
+ *cb_data->buf = kmemdup(entry->var.Data, size, GFP_KERNEL);
if (*cb_data->buf == NULL)
return -ENOMEM;
- memcpy(*cb_data->buf, entry->var.Data, size);
return size;
}
next reply other threads:[~2013-06-01 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 9:40 Thomas Meyer [this message]
[not found] ` <1370079602.29224.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2013-06-01 17:11 ` [PATCH] efi, pstore: Cocci spatch "memdup.spatch" Kees Cook
2013-06-03 10:17 ` Matt Fleming
[not found] ` <20130603101756.GH2004-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-06-03 17:19 ` Luck, Tony
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=1370079602.29224.8.camel@localhost.localdomain \
--to=thomas@m3y3r.de \
--cc=cbouatmailru@gmail.com \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=tony.luck@intel.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