Skip to content

Commit

Permalink
rcu: Prevent uninitialized string in RCU CPU stall info
Browse files Browse the repository at this point in the history
An uninitialized string may be displayed at the end of the rcu_preempt
detected stall info such as

0: (1 GPs behind) idle=075/140000000000000/0 =8?^D=8?^D
                                             ^^^^^^^^^^
if CONFIG_RCU_FAST_NO_HZ is not defined.

This trivial patch clears the string in this case.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Carsten Emde authored and Paul E. McKenney committed Jul 2, 2012
1 parent d711817 commit 1c17e4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/rcutree_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -2224,6 +2224,7 @@ static void print_cpu_stall_fast_no_hz(char *cp, int cpu)

static void print_cpu_stall_fast_no_hz(char *cp, int cpu)
{
*cp = '\0';
}

#endif /* #else #ifdef CONFIG_RCU_FAST_NO_HZ */
Expand Down

0 comments on commit 1c17e4d

Please sign in to comment.