Red Hat Bugzilla – Bug 460102
kernel: alsa: asoc: fix double free and memory leak in many codec drivers [mrg-1]
Last modified: 2009-01-22 05:44:47 EST
Description of problem: Many SoC audio codec drivers have improper freeing of memory in error paths. * codec is allocated in the platform device probe function, but is not freed there in case of error. Instead it is freed in the i2c device probe function's error path. However the success or failure of both functions is not linked, so this could result in a double free (if the platform device is successfully probed, the i2c device probing fails and then the platform driver is unregistered.) * codec->private_data is allocated in many platform device probe functions but not freed in their error paths.
Proposed upstream patch: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3051e41ab7daaa59d4564f20b25dcb8c03f35f2b
Created attachment 314967 [details] Upstream patch for this issue
We need to backport the wm87{31,50,53}.c bits to the realtime kernel.
Patch added to -90
Found upstream commit 3051e41ab7daaa59d4564f20b25dcb8c03f35f2b in mrg-rt.git as commit 7c9f16c4853ba6c2774f15291c6594a0ceba5315 mrg-rt.git commit is found included in the mrg-rt.git branch mrg-rt-2.6.24.7-93 for the wm87{31,50,53} drivers.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-0009.html