[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190625092740.homiljqkygecwete@e107158-lin.cambridge.arm.com>
Date: Tue, 25 Jun 2019 10:27:40 +0100
From: Qais Yousef <qais.yousef@....com>
To: Nicholas Piggin <npiggin@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org,
Frederic Weisbecker <frederic@...nel.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2] kernel/isolation: Assert that a housekeeping CPU
comes up at boot time
On 06/25/19 10:17, Nicholas Piggin wrote:
> With the change to allow the boot CPU0 to be isolated, it is possible
> to specify command line options that result in no housekeeping CPU
> online at boot.
>
> An 8 CPU system booted with "nohz_full=0-6 maxcpus=4", for example.
>
> It is not easily possible at housekeeping init time to know all the
> various SMP options that will result in an invalid configuration, so
> this patch adds a sanity check after SMP init, to ensure that a
> housekeeping CPU has been onlined.
>
> The panic is undesirable, but it's better than the alternative of an
> obscure non deterministic failure. The panic will reliably happen
> when advanced parameters are used incorrectly.
>
> Signed-off-by: Nicholas Piggin <npiggin@...il.com>
> ---
> v2: Fix a NULL pointer dereference when not overriding housekeeping,
> noticed by kernel test robot and Qais, who fixed it and verified
> the fix (thanks!)
Glad I could help. But for the record my problem wasn't a NULL pointer
dereference and simply the loop didn't hit the condition to 'return 0' so I hit
the panic.
I tested that the fix does indeed skip the verification if no nohz_full nor
isolcpus is passed. But I didn't do the reverse check, although from the code
this flag is only set in housekeeping_setup() so it should continue to work as
intended.
Thanks!
--
Qais Yousef
Powered by blists - more mailing lists