Linux EFI development
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ivan Hu <ivan.hu-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Matt Fleming
	<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
	Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] efi/efi_test: drop useless kfree
Date: Tue, 2 May 2017 22:48:35 +0800	[thread overview]
Message-ID: <20170502144835.3jpwrdw6shnfr5g2@ThinkPad> (raw)
In-Reply-To: <a8b99581-70e3-bf9a-bf62-4b13a8cc292c-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

On Tue, May 02, 2017 at 03:11:45PM +0800, ivanhu wrote:
> 
> 
> On 04/29/2017 09:42 AM, Geliang Tang wrote:
> > Drop useless kfree when memdup_user() failed, since we have already
> > called kfree in memdup_user().
> > 
> > Signed-off-by: Geliang Tang <geliangtang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >   drivers/firmware/efi/test/efi_test.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
> > index 08129b7..00332ae 100644
> > --- a/drivers/firmware/efi/test/efi_test.c
> > +++ b/drivers/firmware/efi/test/efi_test.c
> > @@ -261,10 +261,8 @@ static long efi_runtime_set_variable(unsigned long arg)
> >   	}
> >   	data = memdup_user(setvariable.data, setvariable.data_size);
> > -	if (IS_ERR(data)) {
> > -		kfree(name);
> You mean "name" or "data"?
> 

Sorry, it's my mistake. The original code is correct. Please ignore this
patch.

-Geliang

> Cheers,
> Ivan
> 
> > +	if (IS_ERR(data))
> >   		return PTR_ERR(data);
> > -	}
> >   	status = efi.set_variable(name, &vendor_guid,
> >   				setvariable.attributes,

  parent reply	other threads:[~2017-05-02 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29  1:42 [PATCH 1/2] efi/efi_test: use memdup_user Geliang Tang
     [not found] ` <d0d524b81d55b4e5f1708d5441e655c75365c0b8.1493383416.git.geliangtang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-29  1:42   ` [PATCH 2/2] efi/efi_test: drop useless kfree Geliang Tang
     [not found]     ` <427b03b5f10b41014818b9e78f79da9581b213df.1493383416.git.geliangtang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-02  7:11       ` ivanhu
     [not found]         ` <a8b99581-70e3-bf9a-bf62-4b13a8cc292c-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2017-05-02 14:48           ` Geliang Tang [this message]
2017-05-05 20:53 ` [PATCH 1/2] efi/efi_test: use memdup_user Matt Fleming
2017-05-08  8:18   ` ivanhu
     [not found]     ` <0d6b6b9e-de5c-4eb2-f46a-d26ae058fa42-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2017-05-10 10:35       ` Matt Fleming

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=20170502144835.3jpwrdw6shnfr5g2@ThinkPad \
    --to=geliangtang-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ivan.hu-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
    /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