Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755217AbbHYPU5 (ORCPT ); Tue, 25 Aug 2015 11:20:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60289 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbbHYPU4 (ORCPT ); Tue, 25 Aug 2015 11:20:56 -0400 Date: Tue, 25 Aug 2015 17:18:26 +0200 From: Oleg Nesterov To: Rusty Russell Cc: "Paul E. McKenney" , Ingo Molnar , Linus Torvalds , Peter Zijlstra , Tejun Heo , linux-kernel@vger.kernel.org Subject: [PATCH 0/1] params: don't ignore the rest of cmdline if parse_one() fails Message-ID: <20150825151826.GA29462@redhat.com> References: <20150821174230.GA17867@redhat.com> <20150822163810.GV11078@linux.vnet.ibm.com> <20150824153431.GB24949@redhat.com> <20150824183126.GA8388@redhat.com> <871tesjh29.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871tesjh29.fsf@rustcorp.com.au> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1736 Lines: 46 On 08/25, Rusty Russell wrote: > > Oleg Nesterov writes: > > On 08/24, Oleg Nesterov wrote: > >> > >> I booted the kernel with the additional patch below, and nothing bad has > >> happened, > > > > Until I tried reboot it once with "locktorture.verbose=true" paramater. > > It didn't boot. > > > > This is because parse_args() just aborts after it hits the error, so other > > arguments at the same initcall level are simply ignored. > > > > Fixed by the patch below, but I simply can't believe nobody hit this (imo) > > bug before. > > > > Why does parse_args() do this?? I simply can't understand why parse_args() > > adds more random and hard-to-understand problems if one of the args ("=true" > > in this particular case) is wrong. > > > > Yes, the patch below is probably oversimplified / incomplete but imho the > > current behaviour is confusing. At least I was greatly confused ;) At least > > (I think) it makes sense to let the user know that the rest of command line > > was probably ignored. > > This is nice, but please save and return the error properly; modules need > this too. OK, thanks, please see the patch. > I think nobody hit this before because they notice that they screwed up > the commandline and it didn't boot. Yes, I didn't know parse_args() works this way. Besides, I didn't notice the "invalid for parameter" error message on the serial console, so I thought that the kernel panic was somehow caused by the patch I tried to test. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/