diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-08-14 09:31:17 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-08-14 09:31:17 -0700 |
commit | b7be2a1de3f5c0827a4f8ccb6a18342d9d4dc446 (patch) | |
tree | 7761d178103d5b37a2784dd13cb402474a573cfe /drivers/firmware | |
parent | 6285098f212ef8d8f05a69f0e3a7d4f421dd0ed7 (diff) | |
parent | 352cb8677f83a6cf2139151578c8c79785d2d4bf (diff) |
Merge tag 'v4.1.5' into linux-linaro-lsk-v4.1lsk-v4.1-15.08
This is the 4.1.5 stable release
* tag 'v4.1.5': (124 commits)
Linux 4.1.5
perf symbols: Store if there is a filter in place
xfs: remote attributes need to be considered data
xfs: remote attribute headers contain an invalid LSN
drm/nouveau/drm/nv04-nv40/instmem: protect access to priv->heap by mutex
drm/nouveau: hold mutex when calling nouveau_abi16_fini()
drm/nouveau/kms/nv50-: guard against enabling cursor on disabled heads
drm/nouveau/fbcon/nv11-: correctly account for ring space usage
qla2xxx: kill sessions/log out initiator on RSCN and port down events
qla2xxx: fix command initialization in target mode.
qla2xxx: Remove msleep in qlt_send_term_exchange
qla2xxx: release request queue reservation.
qla2xxx: Fix hardware lock/unlock issue causing kernel panic.
intel_pstate: Add get_scaling cpu_defaults param to Knights Landing
iscsi-target: Fix iser explicit logout TX kthread leak
iscsi-target: Fix iscsit_start_kthreads failure OOPs
iscsi-target: Fix use-after-free during TPG session shutdown
IB/ipoib: Fix CONFIG_INFINIBAND_IPOIB_CM
NFS: Fix a memory leak in nfs_do_recoalesce
NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked
...
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efi/cper.c | 15 | ||||
-rw-r--r-- | drivers/firmware/efi/efi.c | 5 |
2 files changed, 17 insertions, 3 deletions
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c index 4fd9961d552e..d42537425438 100644 --- a/drivers/firmware/efi/cper.c +++ b/drivers/firmware/efi/cper.c @@ -305,10 +305,17 @@ const char *cper_mem_err_unpack(struct trace_seq *p, return ret; } -static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem) +static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, + int len) { struct cper_mem_err_compact cmem; + /* Don't trust UEFI 2.1/2.2 structure with bad validation bits */ + if (len == sizeof(struct cper_sec_mem_err_old) && + (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { + pr_err(FW_WARN "valid bits set for fields beyond structure\n"); + return; + } if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) printk("%s""error_status: 0x%016llx\n", pfx, mem->error_status); if (mem->validation_bits & CPER_MEM_VALID_PA) @@ -405,8 +412,10 @@ static void cper_estatus_print_section( } else if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) { struct cper_sec_mem_err *mem_err = (void *)(gdata + 1); printk("%s""section_type: memory error\n", newpfx); - if (gdata->error_data_length >= sizeof(*mem_err)) - cper_print_mem(newpfx, mem_err); + if (gdata->error_data_length >= + sizeof(struct cper_sec_mem_err_old)) + cper_print_mem(newpfx, mem_err, + gdata->error_data_length); else goto err_section_too_small; } else if (!uuid_le_cmp(*sec_type, CPER_SEC_PCIE)) { diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index e14363d12690..63226e9036a1 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -57,6 +57,11 @@ bool efi_runtime_disabled(void) static int __init parse_efi_cmdline(char *str) { + if (!str) { + pr_warn("need at least one option\n"); + return -EINVAL; + } + if (parse_option_str(str, "noruntime")) disable_runtime = true; |