]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
argv_split-teach-it-to-handle-mutable-strings-fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 26 Mar 2013 23:25:04 +0000 (10:25 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Apr 2013 07:29:23 +0000 (18:29 +1100)
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/argv_split.c

index fa7d30abd5d462c219003c1472d51b34fed8ca04..cac7ec49e14978485b33794e8f8e08d6f6118b93 100644 (file)
@@ -51,6 +51,10 @@ EXPORT_SYMBOL(argv_free);
  * considered to be a single argument separator.  The returned array
  * is always NULL-terminated.  Returns NULL on memory allocation
  * failure.
+ *
+ * The source string at `str' may be undergoing concurrent alteration via
+ * userspace sysctl activity (at least).  The argv_split() implementation
+ * attempts to handle this gracefully by taking a local copy to work on.
  */
 char **argv_split(gfp_t gfp, const char *str, int *argcp)
 {