On Fri, 11 Oct, at 02:29:07PM, Seiji Aguchi wrote:
> Change from v2:
> - Move dynamic memory allocation to efi_pstore_read() before holding
>   efivars->lock to protect entry->var.Data.
> - Access to entry->scanning while holding efivars->lock.
> - Move a comment about a returned value from efi_pstore_read_func() to
>   efi_pstore_read() because "size < 0" case may happen in efi_pstore_read().

It seems to me that because you're no longer dropping __efivars->lock
when reading from the EFI variable store, you actually don't need all
the ->scanning and ->deleting logic because anything that sets those
flags runs to completion while holding the lock.

Can't the patch be simplified to just allocating data.buf at the
beginning of efi_pstore_read()? Also, it would be a good idea to
introduce a #define for the 1024 magic number, e.g.

#define EFIVARS_DATA_SIZE_MAX   1024

-- 
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to