public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Dumbre, Saket" <saket.dumbre@intel.com>
Subject: Re: [PATCH v1 05/26] ACPICA: Fix NULL pointer dereference in acpi_ev_address_space_dispatch()
Date: Mon, 16 Mar 2026 10:46:16 -0700	[thread overview]
Message-ID: <a0ef8b7a-ced8-4384-9d88-e98629596a3b@roeck-us.net> (raw)
In-Reply-To: <3030574.e9J7NaK4W3@rafael.j.wysocki>

Hi,

On Wed, Jan 14, 2026 at 01:20:17PM +0100, Rafael J. Wysocki wrote:
> From: Alexey Simakov <bigalex934@gmail.com>
> 
> Cover a missed execution path with a new check.
> 
> Fixes: 0acf24ad7e10 ("ACPICA: Add support for PCC Opregion special context data")
> Link: https://github.com/acpica/acpica/commit/f421dd9dd897
> Signed-off-by: Alexey Simakov <bigalex934@gmail.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/acpi/acpica/evregion.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
> index fa3475da7ea9..b6198f73c81d 100644
> --- a/drivers/acpi/acpica/evregion.c
> +++ b/drivers/acpi/acpica/evregion.c
> @@ -163,7 +163,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
>  			return_ACPI_STATUS(AE_NOT_EXIST);
>  		}
>  
> -		if (region_obj->region.space_id == ACPI_ADR_SPACE_PLATFORM_COMM) {
> +		if (field_obj
> +		    && region_obj->region.space_id ==
> +		    ACPI_ADR_SPACE_PLATFORM_COMM) {
>  			struct acpi_pcc_info *ctx =
>  			    handler_desc->address_space.context;
>  
Google's experimental AI review agent provided the following feedback:

 If this setup block is executed with a NULL `field_obj`, it will skip
 initializing `ctx->length` and `ctx->subspace_id` even though they do not
 depend on `field_obj`.

 Additionally, because this initialization is part of the
 `!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)` block, the setup flag
 will be set shortly after this. Does this mean that if the first call has a
 NULL `field_obj`, the region will be marked as setup complete, and a
 subsequent call with a valid `field_obj` will never initialize
 `ctx->internal_buffer`? Should the `field_obj` check only guard the
 assignment of `ctx->internal_buffer`?

Please let me know if this is a real concern or not to help improve the agent.

Thanks,
Guenter

  reply	other threads:[~2026-03-16 17:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 12:14 [PATCH v1 00/26] ACPICA: ACPICA 20251212 Rafael J. Wysocki
2026-01-14 12:16 ` [PATCH v1 01/26] ACPICA: Add support for the new ACPI Table: DTPR Rafael J. Wysocki
2026-01-14 12:17 ` [PATCH v1 02/26] ACPICA: ACPICA: replace ACPI_FREE() with acpi_ut_delete_object_desc() Rafael J. Wysocki
2026-01-14 12:18 ` [PATCH v1 03/26] ACPICA: Add UUID for Microsoft fan extensions Rafael J. Wysocki
2026-01-14 12:19 ` [PATCH v1 04/26] ACPICA: Add UUIDs associated with TPM 2.0 devices Rafael J. Wysocki
2026-01-14 12:20 ` [PATCH v1 05/26] ACPICA: Fix NULL pointer dereference in acpi_ev_address_space_dispatch() Rafael J. Wysocki
2026-03-16 17:46   ` Guenter Roeck [this message]
2026-03-17 20:44     ` Rafael J. Wysocki
     [not found]       ` <SJ0PR11MB500584283698C48BD431BE5D804BA@SJ0PR11MB5005.namprd11.prod.outlook.com>
2026-03-24  4:21         ` Guenter Roeck
2026-01-14 12:21 ` [PATCH v1 06/26] ACPICA: Add KEYP table definition Rafael J. Wysocki
2026-01-14 12:21 ` [PATCH v1 07/26] ACPICA: Add support for the Microsoft display mux _OSI string Rafael J. Wysocki
2026-01-14 12:22 ` [PATCH v1 08/26] ACPICA: iASL: Add definitions for the IOVT table Rafael J. Wysocki
2026-01-14 12:23 ` [PATCH v1 09/26] ACPICA: Add DTPR table support for the ASL compiler Rafael J. Wysocki
2026-01-14 12:24 ` [PATCH v1 10/26] ACPICA: Define DTPR structure related info tables and data template Rafael J. Wysocki
2026-01-14 12:25 ` [PATCH v1 11/26] ACPICA: Abort AML bytecode execution when executing AML_FATAL_OP Rafael J. Wysocki
2026-01-14 12:26 ` [PATCH v1 12/26] ACPICA: ACPI 6.4: PPTT: include all fields in subtable type1 Rafael J. Wysocki
2026-01-14 12:27 ` [PATCH v1 13/26] ACPICA: Fix asltests using the Fatal() opcode Rafael J. Wysocki
2026-01-14 12:29 ` [PATCH v1 14/26] ACPICA: Add GICv5 MADT structures Rafael J. Wysocki
2026-01-14 12:29 ` [PATCH v1 15/26] ACPICA: Add Arm IORT IWB node definitions Rafael J. Wysocki
2026-01-14 12:31 ` [PATCH v1 16/26] ACPICA: actbl2.h: ACPI 6.6: RAS2: Update Parameter Block structure Rafael J. Wysocki
2026-01-14 12:31 ` [PATCH v1 17/26] ACPICA: actbl3.h: ACPI 6.6: SRAT: New flag in Memory Affinity Structure Rafael J. Wysocki
2026-01-14 12:32 ` [PATCH v1 18/26] ACPICA: ACPI 6.6: Add _VDM (Voltage Domain) object Rafael J. Wysocki
2026-01-14 12:33 ` [PATCH v1 19/26] ACPICA: Create auxiliary ACPI_TPR_AUX_SR structure for iASL compiler Rafael J. Wysocki
2026-01-14 12:34 ` [PATCH v1 20/26] ACPICA: Fix Segmentation Fault error related to DTPR Rafael J. Wysocki
2026-01-14 12:35 ` [PATCH v1 21/26] ACPICA: Verify DTPR and TPR Instance buffer pointers Rafael J. Wysocki
2026-01-14 12:36 ` [PATCH v1 22/26] ACPICA: Cleanup comments and DTPR Table handle functions Rafael J. Wysocki
2026-01-14 12:37 ` [PATCH v1 23/26] ACPICA: Align comments in TPRn-related structures Rafael J. Wysocki
2026-01-14 12:38 ` [PATCH v1 24/26] ACPICA: Logfile: Changes for version 20251212 Rafael J. Wysocki
2026-01-14 12:39 ` [PATCH v1 25/26] ACPICA: Replace TPRn Base and Limit registers Rafael J. Wysocki
2026-01-14 12:40 ` [PATCH v1 26/26] ACPICA: Refactor for TPR Base/Limit registers bitmasks Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0ef8b7a-ced8-4384-9d88-e98629596a3b@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=saket.dumbre@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox