aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-05-02 11:21:21 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-02 10:26:46 -0700
commit725e3ec1822fc30dae921690d3074f540d533c1d (patch)
tree0a25c7b540ab23cec3744dcb61a42e413bcdabec /include
parente638333dcda47890094921861f24a2ec859fe0e6 (diff)
firmware_class: fix memory leak - free allocated pages
commit dd336c554d8926c3348a2d5f2a5ef5597f6d1a06 upstream. fix memory leak introduced by the patch 6e03a201bbe: firmware: speed up request_firmware() 1. vfree won't release pages there were allocated explicitly and mapped using vmap. The memory has to be vunmap-ed and the pages needs to be freed explicitly 2. page array is moved into the 'struct firmware' so that we can free it from release_firmware() and not only in fw_dev_release() The fix doesn't break the firmware load speed. Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Singed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/firmware.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 043811f0d277..53d1e6c4f848 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -12,6 +12,7 @@
struct firmware {
size_t size;
const u8 *data;
+ struct page **pages;
};
struct device;