Skip to content

Commit 261ffd5

Browse files
NunoDasNevesliuw
authored andcommitted
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: e96204e ("hyperv: Move hv_current_partition_id to arch-generic code") Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com>
1 parent 0af2f6b commit 261ffd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hv/hv_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ void __init hv_get_partition_id(void)
307307

308308
local_irq_save(flags);
309309
output = *this_cpu_ptr(hyperv_pcpu_input_arg);
310-
status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, &output);
310+
status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, output);
311311
pt_id = output->partition_id;
312312
local_irq_restore(flags);
313313

0 commit comments

Comments
 (0)