Re: [RFC][PATCH 3/7] efivars: New efivar_entry API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-02-08 at 22:13 +0000, Seiji Aguchi wrote:
> Please don't allocate memory dynamically in the efi_pstore_write()
> because efi_pstore_write() is 
> called in an interrupt context like oops and panic.

efi_pstore_write() already calls efivar_create_sysfs_entry() which does
kzalloc() anyway. Obviously this needs fixing, but it doesn't need to be
done in this series. Unless there's some pstore patches that fix that
somewhere? I know you sent some patches that moved things to a thread,
unfortunately I haven't had chance to look at them.

> Also, a whole process of query_info() + entry_set() should be
> protected by a single spin lock()
> Because if efi_pstore_write() runs concurrently, a result of
> query_info() may be meaningless...
> 
> So, how about introducing query_info_nolock and entry_set_nolock()?
> 
> spin_lock()
> query_info_nolock()
> entry_set_nolock()
> spin_unlock()
> 
> IMO, efivarfs_file_write() should be fixed as above.

Isn't the write() path protected by ->buf_lock? I didn't think it was
possible to have two CPUs in the write() path simultaneously.

-- 
Matt Fleming, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux