pm_qos: clean up racy global "name" variable
authorJonathan Corbet <corbet@lwn.net>
Thu, 6 Aug 2009 19:35:44 +0000 (13:35 -0600)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 14 Oct 2009 13:31:10 +0000 (15:31 +0200)
commit1a6deaea3584fd7af1cad492b1fe0867060b45db
tree83e6f420efe2622c76fba4becd74dd9087cccf59
parente6fe07a014c7a3466dcd1a387a9ac04d84c2703c
pm_qos: clean up racy global "name" variable

"name" is a poor name for a file-global variable.  It was used in three
different functions, with no mutual exclusion.  But it's just a tiny,
temporary string; let's just move it onto the stack in the functions that
need it.  Also use snprintf() just in case.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
LKML-Reference: <20091010153349.113570550@linutronix.de>
Acked-by: Mark Gross <mgross@linux.intel.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/pm_qos_params.c