linux-stable/drivers/firmware
Matt Fleming 12abcfde1a efi, pstore: Remove entry from list when erasing
We need to remove the entry from the EFI variable list before we erase
it from the variable store and free the associated state, otherwise it's
possible to hit the following crash,

  BUG: unable to handle kernel NULL pointer dereference at (null)
  IP: [<ffffffff8142ea0f>] __efivar_entry_iter+0xcf/0x120
  PGD 19483f067 PUD 195426067 PMD 0
  Oops: 0000 [#1] SMP
  [...]
  Call Trace:
   [<ffffffff81430ebf>] efi_pstore_erase+0xef/0x140
   [<ffffffff81003138>] ? math_error+0x288/0x2d0
   [<ffffffff811ea491>] pstore_unlink+0x41/0x60
   [<ffffffff811741ff>] vfs_unlink+0x9f/0x110
   [<ffffffff8117813b>] do_unlinkat+0x18b/0x280
   [<ffffffff8116d7e6>] ? sys_newfstatat+0x36/0x50
   [<ffffffff81178472>] sys_unlinkat+0x22/0x40
   [<ffffffff81543282>] system_call_fastpath+0x16/0x1b

Reported-by: Seiji Aguchi <seiji.aguchi@hds.com>
Tested-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-04-30 16:03:02 +01:00
..
efi efi, pstore: Remove entry from list when erasing 2013-04-30 16:03:02 +01:00
google Linux 3.9 2013-04-30 11:42:13 +01:00
dcdbas.c Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
dcdbas.h
dell_rbu.c sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
dmi-id.c dmi-id: fix a memory leak in dmi_id_init error path 2010-08-05 13:53:34 -07:00
dmi-sysfs.c firmware: Fix unaligned memory accesses in dmi-sysfs 2011-02-25 16:10:03 -08:00
dmi_scan.c dmi_scan: fix missing check for _DMI_ signature in smbios_present() 2013-03-08 15:05:34 -08:00
edd.c [SCSI] edd: Treat "XPRS" host bus type the same as "PCI" 2011-10-31 13:26:19 +04:00
iscsi_ibft.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
iscsi_ibft_find.c efi: Make 'efi_enabled' a function to query EFI facilities 2013-01-30 11:51:59 -08:00
Kconfig efivars: Move pstore code into the new EFI directory 2013-04-17 13:24:01 +01:00
Makefile efi: split efisubsystem from efivars 2013-04-17 13:27:06 +01:00
memmap.c memory-hotplug: remove /sys/firmware/memmap/X sysfs 2013-02-23 17:50:12 -08:00
pcdp.c pcdp: use early_ioremap/early_iounmap to access pcdp table 2012-07-30 17:25:11 -07:00
pcdp.h Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00