[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SN6PR02MB4157122885FDCA366F84BF29D488A@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Wed, 7 May 2025 15:48:11 +0000
From: Michael Kelley <mhklinux@...look.com>
To: "longli@...uxonhyperv.com" <longli@...uxonhyperv.com>, "K. Y. Srinivasan"
<kys@...rosoft.com>, Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu
<wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, "linux-hyperv@...r.kernel.org"
<linux-hyperv@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
CC: Long Li <longli@...rosoft.com>, "stable@...r.kernel.org"
<stable@...r.kernel.org>
Subject: RE: [Patch v3 3/5] uio_hv_generic: Align ring size to system page
From: longli@...uxonhyperv.com <longli@...uxonhyperv.com> Sent: Monday, May 5, 2025 5:57 PM
>
> Following the ring header, the ring data should align to system page
> boundary. Adjust the size if necessary.
>
> Cc: stable@...r.kernel.org
> Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus")
> Signed-off-by: Long Li <longli@...rosoft.com>
> ---
> drivers/uio/uio_hv_generic.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
> index 08385b04c4ab..cb2e7e0e1540 100644
> --- a/drivers/uio/uio_hv_generic.c
> +++ b/drivers/uio/uio_hv_generic.c
> @@ -256,6 +256,9 @@ hv_uio_probe(struct hv_device *dev,
> if (!ring_size)
> ring_size = SZ_2M;
>
> + /* Adjust ring size if necessary to have it page aligned */
> + ring_size = VMBUS_RING_SIZE(ring_size);
> +
> pdata = devm_kzalloc(&dev->device, sizeof(*pdata), GFP_KERNEL);
> if (!pdata)
> return -ENOMEM;
> --
> 2.34.1
>
Reviewed-by: Michael Kelley <mhklinux@...look.com>
Powered by blists - more mailing lists