Re: [PATCH] ACPI, APEI, EINJ, limit the range of einj_param

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

 



于 2012/3/1 3:34, Luck, Tony 写道:
After combination the opinions from Ying and Tony, the current fix is the
simplest. Any other changes will make codes more complex. So I prefer to
keep current style. What's your opinion?

Not sure which one you mean as "the current fix" (they are both one line,
adding a check for param_extension - so neither looks simpler than the
other :-).

My opinion is that Ying's suggestion to make einj_get_parameter_address()
return NULL is the right one.

-Tony

Sorry, here *current fix* means my patch.
I'm afraid your version as below implies some logic errors:

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index 4ca087d..3d3816f 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -238,7 +238,7 @@ static void *einj_get_parameter_address(void)
 			return v5param;
 		}
 	}
-	if (paddrv4) {
+	if (param_extension && paddrv4) {
 		struct einj_parameter *v4param;

 		v4param = acpi_os_map_memory(paddrv4, sizeof(*v4param));


Because if working under ACPI4.x without param_extension support, there
is possible that einj_param has meaning (maybe containing address info?),
but we just ignore it under current implementation. Maybe in future we
need it so I don't hope to return NULL so early. OTOH, my fix is just
ignore einj_param in current logic, not very destructive.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux