[merged] drivers-acpi-apei-einjc-allow-empty-trigger-error-action-table.patch removed from -mm tree

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

 



The patch titled
     Subject: drivers/acpi/apei/einj.c: allow empty Trigger Error Action Table
has been removed from the -mm tree.  Its filename was
     drivers-acpi-apei-einjc-allow-empty-trigger-error-action-table.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
Subject: drivers/acpi/apei/einj.c: allow empty Trigger Error Action Table

When troubleshooting some BIOS code I encounter strange errors about
firmware bugs.  On closer inspection I found that the Trigger table
returned from the firmware was empty but the header looked OK:

header_size = 16
table_size = 16
entry_count = 0

When looking at einj.c I found that this header would result in the error
I was receiving.  I took a quick look at the docs and from what I can tell
this is a valid header, yes?

According to the ACPI spec [1] section 18.6.4 the TRIGGER_ERROR action
table can consists of zero elements.

[1] Advanced Configuration and Power Interface Specification
    Revision 5.0, December 6, 2011
	http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf

Signed-off-by: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: Huang Ying <ying.huang@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/acpi/apei/einj.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN drivers/acpi/apei/einj.c~drivers-acpi-apei-einjc-allow-empty-trigger-error-action-table drivers/acpi/apei/einj.c
--- a/drivers/acpi/apei/einj.c~drivers-acpi-apei-einjc-allow-empty-trigger-error-action-table
+++ a/drivers/acpi/apei/einj.c
@@ -184,7 +184,7 @@ static int einj_check_trigger_header(str
 	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) /
@@ -225,6 +225,11 @@ static int __einj_error_trigger(u64 trig
 			   "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),
_

Patches currently in -mm which might be from niklas.soderlund@xxxxxxxxxxxx are

linux-next.patch

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


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux