]> 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>
Wed, 20 Mar 2013 04:07:45 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:23:01 +0000 (15:23 +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)
 {