From: Nuno Das Neves <nunodasneves@linux.microsoft.com>
To: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
wei.liu@kernel.org
Cc: kys@microsoft.com, haiyangz@microsoft.com, mhklinux@outlook.com,
decui@microsoft.com,
Nuno Das Neves <nunodasneves@linux.microsoft.com>
Subject: [PATCH] Drivers: hv: Fix bad pointer dereference in hv_get_partition_id
Date: Tue, 1 Apr 2025 10:32:17 -0700 [thread overview]
Message-ID: <1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com> (raw)
'output' is already a pointer to the output argument, it should be
passed directly to hv_do_hypercall() without the '&' operator.
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
---
This patch is a fixup for:
e96204e5e96e hyperv: Move hv_current_partition_id to arch-generic code
drivers/hv/hv_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index b3b11be11650..a7d7494feaca 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);
--
2.34.1
next reply other threads:[~2025-04-01 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 17:32 Nuno Das Neves [this message]
2025-04-02 4:15 ` Michael Kelley
2025-04-03 8:24 ` Naman Jain
2025-04-07 5:24 ` Wei Liu
2025-04-07 5:42 ` Wei Liu
2025-04-03 14:02 ` Markus Elfring
2025-04-07 5:24 ` Wei Liu
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=1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com \
--to=nunodasneves@linux.microsoft.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=wei.liu@kernel.org \
/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
all inboxes | Powered by JetHome®