[PATCH 2/2] set_task_comm: kill the pointless memset() + wmb()

2013-03-16 Thread Oleg Nesterov
set_task_comm() does memset() + wmb() before strlcpy(). This buys nothing but adds 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 can't not

[PATCH 2/2] set_task_comm: kill the pointless memset() + wmb()

2013-03-16 Thread Oleg Nesterov
set_task_comm() does memset() + wmb() before strlcpy(). This buys nothing but adds 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 can't not