Before we start extending the existing mechanisms, I think we need to really think about a better solution. Since there already appears to be a workaround for the problem, then this should give us some time to analyze this. >-----Original Message----- >From: Lin, Ming M >Sent: Wednesday, July 01, 2009 11:27 PM >To: Len Brown >Cc: Thomas Renninger; Moore, Robert; Zhao, Yakui; linux-acpi >Subject: Re: [PATCH] ACPICA: Revert "ACPICA: Remove obsolete >acpi_os_validate_address interface" > >On Thu, 2009-07-02 at 10:03 +0800, Len Brown wrote: >> I can't apply a patch that adds a known memory leak, >> even if it removes a conflict between drivers. >> >> The reason is that there is a workaround for the driver conflict, >> but no workaround for the memory leak. > >Here is a prototype simple patch, please review to see if it is the >right way to go. > >1) add a new field "count" to struct acpi_res_list. > > When inserting, if the region(addr, len) is already in the resource > list, we just increase "count", otherwise, the region is inserted > with count=1. > > When deleting, the "count" is decreased, if it's decreased to 0, > the region is deleted from the resource list. > > With "count", the region with same address and length can only be > inserted to the resource list once, so prevent potential memory leak. > >2) add a new function acpi_os_invalidate_address, which is called when > region is deleted. > -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html