RE: efi_pstore: question about how to remove create_sysfs_entry() from a write callback.

2012-08-14 Thread Seiji Aguchi
> > Something like this (pseudo) may work: > > /* Loop until we have all entries in efivars. */ while (1) { > variable_name = kzalloc(1024, GFP_KERNEL ); > spin_lock_irqsave(&efivars->lock); > bool found = false; > while (1) { > ret = ops->get_next_variable(variable_name) > if (

Re: efi_pstore: question about how to remove create_sysfs_entry() from a write callback.

2012-08-14 Thread Mike Waychison
; Matthew >> Garrett (m...@redhat.com); dzic...@redhat.com; dle- >> deve...@lists.sourceforge.net; Satoru Moriya >> Subject: RE: efi_pstore: question about how to remove create_sysfs_entry() >> from a write callback. >> >> > Can we not serialize this with &efivar

RE: efi_pstore: question about how to remove create_sysfs_entry() from a write callback.

2012-08-14 Thread Seiji Aguchi
Tuesday, August 14, 2012 2:52 PM > To: Mike Waychison > Cc: linux-kernel@vger.kernel.org; Luck, Tony (tony.l...@intel.com); Matthew > Garrett (m...@redhat.com); dzic...@redhat.com; dle- > deve...@lists.sourceforge.net; Satoru Moriya > Subject: RE: efi_pstore: question about how

RE: efi_pstore: question about how to remove create_sysfs_entry() from a write callback.

2012-08-14 Thread Seiji Aguchi
> Can we not serialize this with &efivars->lock if it is updated to disable > interrupts? A loop in the workqueue that locks, iterates through > ->get_next_variable, and compares against searches in > efivars->list should work, no? If my understanding is correct, your pseudo code is as follows.

Re: efi_pstore: question about how to remove create_sysfs_entry() from a write callback.

2012-08-14 Thread Mike Waychison
On Tue, Aug 14, 2012 at 9:05 AM, Seiji Aguchi wrote: > Hi, > > I'm sending an email to discuss how to remove create_sysfs_entry() from a > write callback. > > [Problem] > > Current efi_pstore creates sysfs entries ,which enable users to access to > NVRAM, in a write callback. > If a kernel panic

efi_pstore: question about how to remove create_sysfs_entry() from a write callback.

2012-08-14 Thread Seiji Aguchi
Hi, I'm sending an email to discuss how to remove create_sysfs_entry() from a write callback. [Problem] Current efi_pstore creates sysfs entries ,which enable users to access to NVRAM, in a write callback. If a kernel panic happens in interrupt contexts, pstore may fail because it could sleep