Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754553Ab3J3Off (ORCPT ); Wed, 30 Oct 2013 10:35:35 -0400 Received: from arkanian.console-pimps.org ([212.110.184.194]:48069 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962Ab3J3Ofe (ORCPT ); Wed, 30 Oct 2013 10:35:34 -0400 Date: Wed, 30 Oct 2013 14:35:27 +0000 From: Matt Fleming To: Seiji Aguchi Cc: "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , "matt.fleming@intel.com" , "tony.luck@intel.com" , Tomoki Sekiyama , "dle-develop@lists.sourceforge.net" Subject: Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed Message-ID: <20131030143527.GB8193@console-pimps.org> References: <52584373.3010202@hds.com> <20131017131821.GH10834@console-pimps.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 960 Lines: 23 On Fri, 18 Oct, at 10:30:58PM, Seiji Aguchi wrote: > The scanning and deleting logic is still needed. In case an entry(A) > is found, the pointer is saved to psi->data. And efi_pstore_read() > passes the entry(A) to a pstore filesystem by releasing > __efivars->lock. > > And then, the pstore filesystem calls efi_pstore_read() again and the > same entry(A), which is saved to psi->data, is used for re-scanning a > sysfs-list. (That is why list_for_each_entry_safe_from () is used in > efi_pstore_sysfs_entry_iter().) > > So, to protect the entry(A), the logic is needed because, in pstore > filesystem, __efivars->lock Is released. Very good point. -- Matt Fleming, Intel Open Source Technology Center -- 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/