From: Richard Guy Briggs Date: Sat, 15 Mar 2014 22:42:34 +0000 (-0400) Subject: audit: get comm using lock to avoid race in string printing X-Git-Tag: fixes-against-v3.18-rc2~31^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9eab339b197a6903043d272295dcb716ff739b21;p=pandora-kernel.git audit: get comm using lock to avoid race in string printing When task->comm is passed directly to audit_log_untrustedstring() without getting a copy or using the task_lock, there is a race that could happen that would output a NULL (\0) in the output string that would effectively truncate the rest of the report text after the comm= field in the audit, losing fields. Use get_task_comm() to get a copy while acquiring the task_lock to prevent this and to prevent the result from being a mixture of old and new values of comm. Signed-off-by: Tetsuo Handa Signed-off-by: Richard Guy Briggs --- Reading git-diff-tree failed