Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751094Ab0D1IXY (ORCPT ); Wed, 28 Apr 2010 04:23:24 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:36945 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744Ab0D1IXW (ORCPT ); Wed, 28 Apr 2010 04:23:22 -0400 MIME-Version: 1.0 In-Reply-To: References: <20100425193658.GA24039@kroah.com> <1272295140.2434.8.camel@yio.site> <1272372187.5484.3981.camel@macbook.infradead.org> From: Kay Sievers Date: Wed, 28 Apr 2010 10:23:05 +0200 Message-ID: Subject: Re: request_firmware API exhaust memory To: David Woodhouse Cc: dhowells@redhat.com, Tomas Winkler , Greg KH , Johannes Berg , "Rafael J. Wysocki" , Emmanuel Grumbach , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 966 Lines: 30 On Tue, Apr 27, 2010 at 15:34, Kay Sievers wrote: > On Tue, Apr 27, 2010 at 14:43, David Woodhouse wrote: >> This untested patch attempts to put the page array into the 'struct >> firmware' so that we can free it from release_firmware(). > > Looks good. Seems to work without problems and without leaking memory. > > Misses only the member in the struct firmware though. :) Thomas, any chance to test David's patch, if that solves the issues you've seen? Just add the missing line: --- 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; }; Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/