From: Nuno Das Neves Date: Tue, 1 Apr 2025 17:32:17 +0000 (-0700) Subject: Drivers: hv: Fix bad pointer dereference in hv_get_partition_id X-Git-Tag: v6.15-rc5~34^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=261ffd53cc8e91e6484a3170a1ddf59a16696667;p=thirdparty%2Fkernel%2Flinux.git Drivers: hv: Fix bad pointer dereference in hv_get_partition_id 'output' is already a pointer to the output argument, it should be passed directly to hv_do_hypercall() without the '&' operator. Fixes: e96204e5e96e ("hyperv: Move hv_current_partition_id to arch-generic code") Signed-off-by: Nuno Das Neves Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com> --- diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c index b3b11be116500..a7d7494feaca1 100644 --- a/drivers/hv/hv_common.c +++ b/drivers/hv/hv_common.c @@ -307,7 +307,7 @@ void __init hv_get_partition_id(void) local_irq_save(flags); output = *this_cpu_ptr(hyperv_pcpu_input_arg); - status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, &output); + status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, output); pt_id = output->partition_id; local_irq_restore(flags);