summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/rsxface.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/rsxface.c')
-rw-r--r--sys/contrib/dev/acpica/rsxface.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/rsxface.c b/sys/contrib/dev/acpica/rsxface.c
index 81c0968..5105e9a 100644
--- a/sys/contrib/dev/acpica/rsxface.c
+++ b/sys/contrib/dev/acpica/rsxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsxface - Public interfaces to the resource manager
- * $Revision: 15 $
+ * $Revision: 18 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -123,7 +123,7 @@
#include "acresrc.h"
#define _COMPONENT ACPI_RESOURCES
- MODULE_NAME ("rsxface")
+ ACPI_MODULE_NAME ("rsxface")
/*******************************************************************************
@@ -157,7 +157,7 @@ AcpiGetIrqRoutingTable (
ACPI_STATUS Status;
- FUNCTION_TRACE ("AcpiGetIrqRoutingTable ");
+ ACPI_FUNCTION_TRACE ("AcpiGetIrqRoutingTable ");
/*
@@ -166,13 +166,17 @@ AcpiGetIrqRoutingTable (
* we also need a valid pointer in the buffer. If it's a zero buffer length,
* we'll be returning the needed buffer size, so keep going.
*/
- if ((!DeviceHandle) ||
- (!RetBuffer) ||
- ((!RetBuffer->Pointer) && (RetBuffer->Length)))
+ if (!DeviceHandle)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ Status = AcpiUtValidateBuffer (RetBuffer);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
Status = AcpiRsGetPrtMethodData (DeviceHandle, RetBuffer);
return_ACPI_STATUS (Status);
}
@@ -210,7 +214,7 @@ AcpiGetCurrentResources (
ACPI_STATUS Status;
- FUNCTION_TRACE ("AcpiGetCurrentResources");
+ ACPI_FUNCTION_TRACE ("AcpiGetCurrentResources");
/*
@@ -219,13 +223,17 @@ AcpiGetCurrentResources (
* we also need a valid pointer in the buffer. If it's a zero buffer length,
* we'll be returning the needed buffer size, so keep going.
*/
- if ((!DeviceHandle) ||
- (!RetBuffer) ||
- ((RetBuffer->Length) && (!RetBuffer->Pointer)))
+ if (!DeviceHandle)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ Status = AcpiUtValidateBuffer (RetBuffer);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
Status = AcpiRsGetCrsMethodData (DeviceHandle, RetBuffer);
return_ACPI_STATUS (Status);
}
@@ -260,7 +268,7 @@ AcpiGetPossibleResources (
ACPI_STATUS Status;
- FUNCTION_TRACE ("AcpiGetPossibleResources");
+ ACPI_FUNCTION_TRACE ("AcpiGetPossibleResources");
/*
@@ -269,13 +277,17 @@ AcpiGetPossibleResources (
* we also need a valid pointer in the buffer. If it's a zero buffer length,
* we'll be returning the needed buffer size, so keep going.
*/
- if ((!DeviceHandle) ||
- (!RetBuffer) ||
- ((RetBuffer->Length) && (!RetBuffer->Pointer)))
+ if (!DeviceHandle)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ Status = AcpiUtValidateBuffer (RetBuffer);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
Status = AcpiRsGetPrsMethodData (DeviceHandle, RetBuffer);
return_ACPI_STATUS (Status);
}
@@ -307,7 +319,7 @@ AcpiSetCurrentResources (
ACPI_STATUS Status;
- FUNCTION_TRACE ("AcpiSetCurrentResources");
+ ACPI_FUNCTION_TRACE ("AcpiSetCurrentResources");
/*
OpenPOWER on IntegriCloud