From: Oleg Nesterov Date: Tue, 30 Apr 2013 22:28:19 +0000 (-0700) Subject: set_task_comm: kill the pointless memset() + wmb() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~88^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12eaaf309a798973d215f7f21aa5a67a760ed7c8;p=pandora-kernel.git set_task_comm: kill the pointless memset() + wmb() set_task_comm() does memset() + wmb() before strlcpy(). This buys nothing and to add to the confusion, the comment is wrong. - We do not need memset() to be "safe from non-terminating string reads", the final char is always zero and we never change it. - wmb() is paired with nothing, it cannot prevent from printing the mixture of the old/new data unless the reader takes the lock. Signed-off-by: Oleg Nesterov Cc: Andi Kleen Cc: John Stultz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed