Commit 0315fef2 authored by Long Li's avatar Long Li Committed by Wei Liu
Browse files

uio_hv_generic: Align ring size to system page



Following the ring header, the ring data should align to system page
boundary. Adjust the size if necessary.

Cc: stable@vger.kernel.org
Fixes: 95096f2f ("uio-hv-generic: new userspace i/o driver for VMBus")
Signed-off-by: default avatarLong Li <longli@microsoft.com>
Reviewed-by: default avatarMichael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1746492997-4599-4-git-send-email-longli@linuxonhyperv.com


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
Message-ID: <1746492997-4599-4-git-send-email-longli@linuxonhyperv.com>
parent c951ab8f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -243,6 +243,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;