From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932556Ab3BIUMk (ORCPT ); Sat, 9 Feb 2013 15:12:40 -0500 Received: from arkanian.console-pimps.org ([212.110.184.194]:41149 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932499Ab3BIUMi (ORCPT ); Sat, 9 Feb 2013 15:12:38 -0500 Message-ID: <1360440755.7515.322.camel@mfleming-mobl1.ger.corp.intel.com> Subject: Re: [PATCH v5 -next 2/2]efi_pstore: Introducing workqueue updating sysfs entries From: Matt Fleming To: Seiji Aguchi Cc: "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , "Luck, Tony (tony.luck@intel.com)" , "mikew@google.com" , "cbouatmailru@gmail.com" , "dzickus@redhat.com" , "dle-develop@lists.sourceforge.net" , Satoru Moriya Date: Sat, 09 Feb 2013 20:12:35 +0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2013-01-24 at 00:41 +0000, Seiji Aguchi wrote: > [Problem] > efi_pstore creates sysfs entries, which enable users to access to NVRAM, > in a write callback. If a kernel panic happens in an interrupt context, > it may fail because it could sleep due to dynamic memory allocations during > creating sysfs entries. > > [Patch Description] > This patch removes sysfs operations from a write callback by introducing > a workqueue updating sysfs entries which is scheduled after the write > callback is called. > > Also, the workqueue is kicked in a just oops case. > A system will go down in other cases such as panic, clean shutdown and emergency > restart. And we don't need to create sysfs entries because there is no chance for > users to access to them. > > efi_pstore will be robust against a kernel panic in an interrupt context with this patch. > > Signed-off-by: Seiji Aguchi > --- > drivers/firmware/efivars.c | 85 +++++++++++++++++++++++++++++++++++++++++--- > include/linux/efi.h | 3 +- > 2 files changed, 82 insertions(+), 6 deletions(-) Acked-by: Matt Fleming -- Matt Fleming, Intel Open Source Technology Center