All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-efi@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H . Peter Anvin" <hpa@zytor.com>
Cc: Pan Bian <bianpan2016@163.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	linux-kernel@vger.kernel.org,
	Matt Fleming <matt@codeblueprint.co.uk>,
	stable@vger.kernel.org
Subject: [PATCH 2/3] efi/esrt: use memunmap rather kfree to free the remapping
Date: Wed,  6 Dec 2017 09:50:09 +0000	[thread overview]
Message-ID: <20171206095010.24170-3-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20171206095010.24170-1-ard.biesheuvel@linaro.org>

From: Pan Bian <bianpan2016@163.com>

The remapping result of memremap should be freed with memunmap, not
kfree.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 drivers/firmware/efi/esrt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
index 7aae2483fcb9..c47e0c6ec00f 100644
--- a/drivers/firmware/efi/esrt.c
+++ b/drivers/firmware/efi/esrt.c
@@ -428,7 +428,7 @@ static int __init esrt_sysfs_init(void)
 err_remove_esrt:
 	kobject_put(esrt_kobj);
 err:
-	kfree(esrt);
+	memunmap(esrt);
 	esrt = NULL;
 	return error;
 }
-- 
2.11.0

  parent reply	other threads:[~2017-12-06  9:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06  9:50 [GIT PULL 0/3] EFI fixes for v4.15 Ard Biesheuvel
2017-12-06  9:50 ` Ard Biesheuvel
2017-12-06  9:50 ` [PATCH 1/3] efi: move some sysfs files to be read-only by root Ard Biesheuvel
2017-12-06 20:29   ` [tip:efi/urgent] efi: Move " tip-bot for Greg Kroah-Hartman
2017-12-06  9:50 ` Ard Biesheuvel [this message]
2017-12-06 20:30   ` [tip:efi/urgent] efi/esrt: Use memunmap() instead of kfree() to free the remapping tip-bot for Pan Bian
2017-12-06  9:50 ` [PATCH 3/3] efi: add comment to avoid future expanding of sysfs systab Ard Biesheuvel
2017-12-06  9:50   ` Ard Biesheuvel
2017-12-06 20:30   ` [tip:efi/urgent] efi: Add " tip-bot for Dave Young
2017-12-06 17:20 ` [GIT PULL 0/3] EFI fixes for v4.15 Ingo Molnar
2017-12-06 17:20   ` Ingo Molnar

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=20171206095010.24170-3-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=bianpan2016@163.com \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.