> > If memchr argument is longer than strlen(kp->name), there will be someYes, it will casuse duplicate filenames in sysfs. For me, the "nousb" will cause the "usbcore" created twice. Yes, "name" should be added, thanks. Regards dave ==================================================== Signed-off-by: Dave Young <hidave.darkstar@gmail.com> --- kernel/params.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff -upr linux/kernel/params.c linux.new/kernel/params.c --- linux/kernel/params.c 2007-10-08 14:30:06.000000000 +0800 +++ linux.new/kernel/params.c 2007-10-09 09:16:55.000000000 +0800 @@ -592,11 +592,17 @@ static void __init param_sysfs_builtin(v for (i=0; i < __stop___param - __start___param; i++) { char *dot; + size_t kplen; kp = &__start___param[i]; + kplen = strlen(kp->name); /* We do not handle args without periods. */ - dot = memchr(kp->name, '.', MAX_KBUILD_MODNAME); + if (kplen > MAX_KBUILD_MODNAME) { + DEBUGP("kernel parameter name is too long: %s\n", kp->name); + continue; + } + dot = memchr(kp->name, '.', kplen); if (!dot) { DEBUGP("couldn't find period in %s\n", kp->name); continue; -
| monstr | [PATCH 27/56] microblaze_v2: support for a.out |
| Andrew Morton | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| mdew . | Re: [patch] CFS scheduler, v4 |
| Gabriel C | Re: 2.6.21-mm1 |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Willy Tarreau | Re: [PATCH] tcp: splice as many packets as possible at once |
| Linus Torvalds | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
