diff --git a/[refs] b/[refs] index bb21649589cc..9f137b8115fa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e105b8bfc769b0545b6f0f395179d1e43cbee822 +refs/heads/master: 9f255651fb41c111ee35a2ae632df8ce9bd61def diff --git a/trunk/lib/kobject.c b/trunk/lib/kobject.c index dcade0543bd2..744401571ed7 100644 --- a/trunk/lib/kobject.c +++ b/trunk/lib/kobject.c @@ -216,13 +216,19 @@ static int kobject_add_internal(struct kobject *kobj) static int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list vargs) { - /* Free the old name, if necessary. */ - kfree(kobj->name); + const char *old_name = kobj->name; + char *s; kobj->name = kvasprintf(GFP_KERNEL, fmt, vargs); if (!kobj->name) return -ENOMEM; + /* ewww... some of these buggers have '/' in the name ... */ + s = strchr(kobj->name, '/'); + if (s) + s[0] = '!'; + + kfree(old_name); return 0; }