From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50262 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754905AbcBXDoN (ORCPT ); Tue, 23 Feb 2016 22:44:13 -0500 Subject: Patch "devm_memremap_release(): fix memremap'd addr handling" has been added to the 4.4-stable tree To: toshi.kani@hpe.com, akpm@linux-foundation.org, dan.j.williams@intel.com, gregkh@linuxfoundation.org, hch@lst.de, ross.zwisler@linux.intel.com, torvalds@linux-foundation.org, willy@linux.intel.com Cc: , From: Date: Tue, 23 Feb 2016 19:24:18 -0800 Message-ID: <145628425814866@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled devm_memremap_release(): fix memremap'd addr handling to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: devm_memremap_release-fix-memremap-d-addr-handling.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 9273a8bbf58a15051e53a777389a502420ddc60e Mon Sep 17 00:00:00 2001 From: Toshi Kani Date: Wed, 17 Feb 2016 13:11:29 -0800 Subject: devm_memremap_release(): fix memremap'd addr handling From: Toshi Kani commit 9273a8bbf58a15051e53a777389a502420ddc60e upstream. The pmem driver calls devm_memremap() to map a persistent memory range. When the pmem driver is unloaded, this memremap'd range is not released so the kernel will leak a vma. Fix devm_memremap_release() to handle a given memremap'd address properly. Signed-off-by: Toshi Kani Acked-by: Dan Williams Cc: Christoph Hellwig Cc: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/memremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -111,7 +111,7 @@ EXPORT_SYMBOL(memunmap); static void devm_memremap_release(struct device *dev, void *res) { - memunmap(res); + memunmap(*(void **)res); } static int devm_memremap_match(struct device *dev, void *res, void *match_data) Patches currently in stable-queue which might be from toshi.kani@hpe.com are queue-4.4/x86-uaccess-64-handle-the-caching-of-4-byte-nocache-copies-properly-in-__copy_user_nocache.patch queue-4.4/devm_memremap_release-fix-memremap-d-addr-handling.patch queue-4.4/x86-mm-fix-vmalloc_fault-to-handle-large-pages-properly.patch queue-4.4/x86-uaccess-64-make-the-__copy_user_nocache-assembly-code-more-readable.patch