From: Steven Rostedt Date: Mon, 12 May 2008 19:20:48 +0000 (+0200) Subject: ftrace - fix dynamic ftrace memory leak X-Git-Tag: v2.6.27-rc1~1102^2^2~1^2~109 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37ad508419f0fdfda7b378756eb1f35cfd26d96d;p=pandora-kernel.git ftrace - fix dynamic ftrace memory leak The ftrace dynamic function update allocates a record to store the instruction pointers that are being modified. If the modified instruction pointer fails to update, then the record is marked as failed and nothing more is done. Worse, if the modification fails, but the record ip function is still called, it will allocate a new record and try again. In just a matter of time, will this cause a serious memory leak and crash the system. This patch plugs this memory leak. When a record fails, it is included back into the pool of records to be used. Now a record may fail over and over again, but the number of allocated records will not increase. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed