From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbWI3SVA (ORCPT ); Sat, 30 Sep 2006 14:21:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751364AbWI3SVA (ORCPT ); Sat, 30 Sep 2006 14:21:00 -0400 Received: from sp604003mt.neufgp.fr ([84.96.92.56]:37010 "EHLO smTp.neuf.fr") by vger.kernel.org with ESMTP id S1751357AbWI3SU7 (ORCPT ); Sat, 30 Sep 2006 14:20:59 -0400 Date: Sat, 30 Sep 2006 20:20:28 +0200 From: Vincent Legoll Subject: [PATCH] off-by-one in kernel command line option parsing To: linux-kernel@vger.kernel.org Cc: torvalds@osdl.org, ak@suse.de, Vincent Legoll Message-id: <451EB56C.9020105@online.fr> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_0r9P6g6u3EoNEuEzCdHdrQ)" User-Agent: Thunderbird 1.5.0.7 (X11/20060919) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --Boundary_(ID_0r9P6g6u3EoNEuEzCdHdrQ) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Here is a patch for what I think is a bug in the kernel, please comment / apply as appropriate. Generated by cg-mkpatch from a fairly recent git tree. Cross-compile tested. -- Vincent Legoll --Boundary_(ID_0r9P6g6u3EoNEuEzCdHdrQ) Content-type: text/plain; name=opt-parse.patch Content-transfer-encoding: 7BIT Content-disposition: inline; filename=opt-parse.patch fix memcmp() off-by-one nolapic is 7 chars long --- commit aa2cb4b05c437005ccff44084678948c99aa62b3 tree 54ddca6ab0ef9a29bb1ff0f452b1eaccce7b33a1 parent 4ed4b5475211fab6a0ad00eed2f9297395e7598e author Vincent Legoll Sat, 30 Sep 2006 18:52:53 +0200 committer Vincent Legoll Sat, 30 Sep 2006 18:52:53 +0200 arch/i386/kernel/setup.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index f168220..72bbf22 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -869,7 +869,7 @@ #ifdef CONFIG_X86_LOCAL_APIC lapic_enable(); /* disable local APIC */ - else if (!memcmp(from, "nolapic", 6)) + else if (!memcmp(from, "nolapic", 7)) lapic_disable(); #endif /* CONFIG_X86_LOCAL_APIC */ --Boundary_(ID_0r9P6g6u3EoNEuEzCdHdrQ)--