Linux-HyperV List
 help / color / mirror / Atom feed
From: ALOK TIWARI <alok.a.tiwari@oracle.com>
To: Michael Kelley <mhklinux@outlook.com>,
	"kys@microsoft.com" <kys@microsoft.com>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	"decui@microsoft.com" <decui@microsoft.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [External] : RE: [PATCH 2/3] drivers: hv: vmbus: Fix sscanf format specifier in target_cpu_store()
Date: Mon, 15 Sep 2025 18:31:02 +0530	[thread overview]
Message-ID: <2871837b-b766-49d5-b7a8-49af7f367781@oracle.com> (raw)
In-Reply-To: <SN6PR02MB41577DBA5D2C981ACEC4D9DED40AA@SN6PR02MB4157.namprd02.prod.outlook.com>



On 9/14/2025 9:57 AM, Michael Kelley wrote:
> From: Alok Tiwari<alok.a.tiwari@oracle.com> Sent: Saturday, September 13, 2025 12:25 PM
>> The target_cpu_store() function parses the target CPU from the sysfs
>> buffer using sscanf(). The format string currently uses "%uu", which
>> is invalid and causes incorrect parsing.
> The %uu format string definitely looks invalid, but I'm not seeing
> incorrect parsing.  For example, this command works:
> 
> # echo 5 >/sys/bus/vmbus/devices/<uuid>/channels/<nn>/cpu
> 
> and the target cpu is indeed changed to "5".  A two-digit value also
> works:
> 
> # echo 14 >/sys/bus/vmbus/devices/<uuid>/channels/<nn>/cpu
> 
> What are the details of the incorrect parsing that you are seeing?
> 
> Michael

Thanks Michael,

You are right, The compiler ignores the extra "u", so there is no 
incorrect parsing at runtime. My wording was misleading. This change 
should be treated as a cleanup/cosmetic change rather than a real fix.


Thanks,
Alok

  reply	other threads:[~2025-09-15 13:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-13 19:24 [PATCH 1/3] drivers: hv: vmbus: Fix sysfs output format for ring buffer index Alok Tiwari
2025-09-13 19:24 ` [PATCH 2/3] drivers: hv: vmbus: Fix sscanf format specifier in target_cpu_store() Alok Tiwari
2025-09-14  4:27   ` Michael Kelley
2025-09-15 13:01     ` ALOK TIWARI [this message]
2025-09-13 19:24 ` [PATCH 3/3] drivers: hv: vmbus: Fix typos in vmbus_drv.c Alok Tiwari
2025-09-18  3:53   ` Michael Kelley
2025-09-18  3:49 ` [PATCH 1/3] drivers: hv: vmbus: Fix sysfs output format for ring buffer index Michael Kelley
2025-09-30 23:32 ` 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=2871837b-b766-49d5-b7a8-49af7f367781@oracle.com \
    --to=alok.a.tiwari@oracle.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