Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbcD3Wqq (ORCPT ); Sat, 30 Apr 2016 18:46:46 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36053 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbcD3Wqp (ORCPT ); Sat, 30 Apr 2016 18:46:45 -0400 Date: Sat, 30 Apr 2016 23:46:41 +0100 From: Matt Fleming To: Arnd Bergmann Cc: "Compostella, Jeremy" , Ingo Molnar , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] efibc: avoid stack overflow warning Message-ID: <20160430224641.GQ2839@codeblueprint.co.uk> References: <1461952128-2135409-1-git-send-email-arnd@arndb.de> <20160430201449.GL2839@codeblueprint.co.uk> <18565207.dPI1UNgYiO@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18565207.dPI1UNgYiO@wuerfel> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 835 Lines: 20 On Sun, 01 May, at 12:34:29AM, Arnd Bergmann wrote: > > The sys_restart() system call takes a mutex before calling kernel_restart() > or kernel_poweroff(). > > I've had a closer look now and found that there are a few other > callers of kernel_restart, so I guess if you restart using sysctl > at the exact same time as calling /sbin/reboot, things may break. Right. Or if the dm-verify-target driver saw an error. > It's not something we'd have to worry about in practice, but it does > make my patch incorrect. Should we come up with a different way to > do it? Jeremy proposed a patch to dynamically allocate the memory, which I think is the correct way to go given that our (reasonable) assumptions about reboot notifier concurrency are not guaranteed, https://lkml.kernel.org/r/87h9eked24.fsf@jcompost-MOBL1.tl.intel.com