]> git.baikalelectronics.ru Git - kernel.git/commit
devm_memremap_release(): fix memremap'd addr handling
authorToshi Kani <toshi.kani@hpe.com>
Wed, 17 Feb 2016 21:11:29 +0000 (13:11 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Feb 2016 00:23:24 +0000 (16:23 -0800)
commit495827ad1e085f6f4bb7b3a59c2739e8149151ae
treedbca348bd6669d01ff60d896aba9de9f2b26f7c0
parent5bc0d1815e36fea87718b5bf18a2569e09ae012c
devm_memremap_release(): fix memremap'd addr handling

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 <toshi.kani@hpe.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/memremap.c