[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220123215536.vsbv7n36govrzqbd@liuwe-devbox-debian-v2>
Date: Sun, 23 Jan 2022 21:55:36 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Yanming Liu <yanminglr@...il.com>
Cc: linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
"Andrea Parri (Microsoft)" <parri.andrea@...il.com>,
Andres Beltran <lkmlabelt@...il.com>,
Dexuan Cui <decui@...rosoft.com>, Wei Liu <wei.liu@...nel.org>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [PATCH] Drivers: hv: balloon: account for vmbus packet header in
max_pkt_size
On Thu, Jan 20, 2022 at 04:20:52AM +0800, Yanming Liu wrote:
> Commit adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V
> out of the ring buffer") introduced a notion of maximum packet size in
> vmbus channel and used that size to initialize a buffer holding all
> incoming packet along with their vmbus packet header. hv_balloon uses
> the default maximum packet size VMBUS_DEFAULT_MAX_PKT_SIZE which matches
> its maximum message size, however vmbus_open expects this size to also
> include vmbus packet header. This leads to 4096 bytes
> dm_unballoon_request messages being truncated to 4080 bytes. When the
> driver tries to read next packet it starts from a wrong read_index,
> receives garbage and prints a lot of "Unhandled message: type:
> <garbage>" in dmesg.
>
> Allocate the buffer with HV_HYP_PAGE_SIZE more bytes to make room for
> the header.
>
> Fixes: adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer")
> Suggested-by: Michael Kelley (LINUX) <mikelley@...rosoft.com>
> Suggested-by: Andrea Parri (Microsoft) <parri.andrea@...il.com>
> Signed-off-by: Yanming Liu <yanminglr@...il.com>
Applied to hyperv-fixes. Thanks.
Powered by blists - more mailing lists