lkml.org 
[lkml]   [2010]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3] firmware_class: fix memory leak - free allocated pages
    On Sun, May 02, 2010 at 11:21:21AM +0300, Tomas Winkler wrote:
    > From: David Woodhouse <David.Woodhouse@intel.com>
    >
    > 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: Greg Kroah-Hartman <gregkh@suse.de>
    > 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>
    > ---
    > V2: fix authorship of the patch
    > V3: fix const struct firmware breakage

    Thanks, this looks much better, I've applied it now.

    greg k-h


    \
     
     \ /
      Last update: 2010-05-03 19:07    [W:0.020 / U:31.776 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site