public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: Thomas Meyer <thomas@m3y3r.de>
Cc: 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: Re: [PATCH] efi, pstore: Cocci spatch "memdup.spatch"
Date: Mon, 3 Jun 2013 11:17:56 +0100	[thread overview]
Message-ID: <20130603101756.GH2004@console-pimps.org> (raw)
In-Reply-To: <1370079602.29224.8.camel@localhost.localdomain>

On Sat, 01 Jun, at 11:40:02AM, Thomas Meyer wrote:
> 
> 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;
>  }

Who wants to pick this one up? Tony?

-- 
Matt Fleming, Intel Open Source Technology Center

  parent reply	other threads:[~2013-06-03 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01  9:40 [PATCH] efi, pstore: Cocci spatch "memdup.spatch" Thomas Meyer
     [not found] ` <1370079602.29224.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2013-06-01 17:11   ` Kees Cook
2013-06-03 10:17 ` Matt Fleming [this message]
     [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=20130603101756.GH2004@console-pimps.org \
    --to=matt@console-pimps.org \
    --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=thomas@m3y3r.de \
    --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