radix_tree_tag_get() is not as safe as the docs make out [ver #2]
[safe/jmp/linux-2.6] / lib / dynamic_debug.c
index 833139c..d6b8b9b 100644 (file)
 #include <linux/list.h>
 #include <linux/sysctl.h>
 #include <linux/ctype.h>
+#include <linux/string.h>
 #include <linux/uaccess.h>
 #include <linux/dynamic_debug.h>
 #include <linux/debugfs.h>
+#include <linux/slab.h>
 
 extern struct _ddebug __start___verbose[];
 extern struct _ddebug __stop___verbose[];
@@ -164,7 +166,7 @@ static void ddebug_change(const struct ddebug_query *query,
 
                        if (!newflags)
                                dt->num_enabled--;
-                       else if (!dp-flags)
+                       else if (!dp->flags)
                                dt->num_enabled++;
                        dp->flags = newflags;
                        if (newflags) {
@@ -209,8 +211,7 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
                char *end;
 
                /* Skip leading whitespace */
-               while (*buf && isspace(*buf))
-                       buf++;
+               buf = skip_spaces(buf);
                if (!*buf)
                        break;  /* oh, it was trailing whitespace */