diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-05-01 00:28:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 02:04:07 +0200 |
commit | 12eaaf309a798973d215f7f21aa5a67a760ed7c8 (patch) | |
tree | 6be40c0ec42f7cf8eb5d09c31e1f36cc21499720 /Documentation/video4linux | |
parent | fs, proc: truncate /proc/pid/comm writes to first TASK_COMM_LEN bytes (diff) | |
download | linux-12eaaf309a798973d215f7f21aa5a67a760ed7c8.tar.xz linux-12eaaf309a798973d215f7f21aa5a67a760ed7c8.zip |
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 <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/video4linux')
0 files changed, 0 insertions, 0 deletions