From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 424DF335BA; Mon, 7 Apr 2025 05:24:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744003478; cv=none; b=joC4x6AaKILCvYB1cAawMClxUv10I7lF3BIWjjXdcSFZEuKCJFNYUGmQgGBM/mmcl++vj7wHTlyTjxVVh3RPoOFXwRsbw0OEUsRnTXWlr+ilA1vB9V8OObLE+QxmxOZvUTBkAN+wEPJna/AA/G2YqAHxaDPheYN3ir5ciQIGeWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744003478; c=relaxed/simple; bh=NYxOraE5tY452HW4mFZLuhv+m94cgUKS1yX2m1YM3Og=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tcrUhfX2MKhUObGzHy7M3w1Ci4Ugbv2fI1N7Hag+sqB/hlZ00Wkk556SHdKVdzskSHd2XY0PP6d51vS8O8Zc3BhL5jNQcavI13Nc5nQH2FKao5f0t1naVdTeGuFODdD+fpcrVCdwfOMKbhQIP/ql7wEZCc0dHgxvSOMyaY6U0to= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WgG5tsHy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WgG5tsHy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97164C4CEDD; Mon, 7 Apr 2025 05:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744003477; bh=NYxOraE5tY452HW4mFZLuhv+m94cgUKS1yX2m1YM3Og=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WgG5tsHygFfrBSIEk6tPsXidti3vgIP0WCLtSJ44pg4tgfROGKcuXuuKixRIbve1I uEwp0Kpp27EsVQwe8cL6AR5Vmi1eQOEtC4V3MojCN6Ne8+Q2NF9K/IylJMR+DNmP4l tqQGBN3KO8lB7aRhG9z2nPbXa4HeJ+NXtJY+gsQlG8ef1cyT77RzWHNqBI23vG6kqj dWuDadeoNPsLBxLCPn/5JgITDDizM1r5NMuY/V1eolFL6Os8djiCPhvwdm9PUzs/aA QpufR7W5gUTW0zJDlcLxhbi7+ac9IECSqHkCTuTbiIgAZFsXhxXJAi6ec23/TtOIO+ kKQdrCY2TBZgg== Date: Mon, 7 Apr 2025 05:24:36 +0000 From: Wei Liu To: Nuno Das Neves Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, wei.liu@kernel.org, kys@microsoft.com, haiyangz@microsoft.com, mhklinux@outlook.com, decui@microsoft.com Subject: Re: [PATCH] Drivers: hv: Fix bad pointer dereference in hv_get_partition_id Message-ID: References: <1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1743528737-20310-1-git-send-email-nunodasneves@linux.microsoft.com> On Tue, Apr 01, 2025 at 10:32:17AM -0700, 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 Applied to hyperv-fixes. Thanks. > --- > 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 >