Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286733
b: refs/heads/master
c: 4c40aed
h: refs/heads/master
i:
  286731: 7c8ec89
v: v3
  • Loading branch information
Niklas Söderlund authored and Len Brown committed Jan 24, 2012
1 parent c9bf05b commit 78bc9a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1001a3a307ca2425c028fd23b8ad05ad8bb048dd
refs/heads/master: 4c40aed869a200a621b53bcb491c5ee8a34ef5f1
7 changes: 6 additions & 1 deletion trunk/drivers/acpi/apei/einj.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static int einj_check_trigger_header(struct acpi_einj_trigger *trigger_tab)
if (trigger_tab->header_size != sizeof(struct acpi_einj_trigger))
return -EINVAL;
if (trigger_tab->table_size > PAGE_SIZE ||
trigger_tab->table_size <= trigger_tab->header_size)
trigger_tab->table_size < trigger_tab->header_size)
return -EINVAL;
if (trigger_tab->entry_count !=
(trigger_tab->table_size - trigger_tab->header_size) /
Expand Down Expand Up @@ -340,6 +340,11 @@ static int __einj_error_trigger(u64 trigger_paddr, u32 type,
"The trigger error action table is invalid\n");
goto out_rel_header;
}

/* No action structures in the TRIGGER_ERROR table, nothing to do */
if (!trigger_tab->entry_count)
goto out_rel_header;

rc = -EIO;
table_size = trigger_tab->table_size;
r = request_mem_region(trigger_paddr + sizeof(*trigger_tab),
Expand Down

0 comments on commit 78bc9a8

Please sign in to comment.