Re: [tip:x86/efi2] efivars: efivar_entry API

From: Matt Fleming
Date: Fri Apr 26 2013 - 05:56:01 EST


On 24/04/13 00:55, Seiji Aguchi wrote:
> Hi,
>
> I tested a current tip tree to check if the new API works.
> But pstore_erase() doesn't work...
> I'm checking the source code right now.
>
> Seiji

[...]

> Call Trace:
> [<ffffffff8143001f>] efi_pstore_erase+0xdf/0x130
> [<ffffffff81200038>] ? cap_socket_create+0x8/0x10
> [<ffffffff811ea491>] pstore_unlink+0x41/0x60
> [<ffffffff811741ff>] vfs_unlink+0x9f/0x110
> [<ffffffff8117813b>] do_unlinkat+0x18b/0x280
> [<ffffffff81178472>] sys_unlinkat+0x22/0x40
> [<ffffffff81542402>] system_call_fastpath+0x16/0x1b

Does this patch fix things?

---

diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
index 47ae712..b820593 100644
--- a/drivers/firmware/efi/efi-pstore.c
+++ b/drivers/firmware/efi/efi-pstore.c
@@ -173,7 +173,7 @@ static int efi_pstore_erase(enum pstore_type_id type, u64 id, int count,
struct timespec time, struct pstore_info *psi)
{
struct pstore_erase_data edata;
- struct efivar_entry *entry;
+ struct efivar_entry *entry = NULL;
char name[DUMP_NAME_LEN];
efi_char16_t efi_name[DUMP_NAME_LEN];
int found, i;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/