[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_NheILh0exTxoo1@liuwe-devbox-ubuntu-v2.tail21d00.ts.net>
Date: Mon, 7 Apr 2025 05:24:08 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Naman Jain <namjain@...ux.microsoft.com>
Cc: Nuno Das Neves <nunodasneves@...ux.microsoft.com>,
linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
wei.liu@...nel.org, kys@...rosoft.com, haiyangz@...rosoft.com,
mhklinux@...look.com, decui@...rosoft.com
Subject: Re: [PATCH] Drivers: hv: Fix bad pointer dereference in
hv_get_partition_id
On Thu, Apr 03, 2025 at 01:54:37PM +0530, Naman Jain wrote:
>
>
> On 4/1/2025 11:02 PM, Nuno Das Neves wrote:
> > '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@...ux.microsoft.com>
> > ---
> > This patch is a fixup for:
> > e96204e5e96e hyperv: Move hv_current_partition_id to arch-generic code
>
> You can add Fixes: tag, so that it gets ported to previous kernel, in case,
> it does not make it to 6.14.
This does not need to be ported to older kernels because the bug was
never released.
Wei.
>
>
> Regards,
> Naman
>
> >
> > 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);
>
Powered by blists - more mailing lists