mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
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: [email protected]
Fixes: 95096f2fbd ("uio-hv-generic: new userspace i/o driver for VMBus")
Signed-off-by: Long Li <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wei Liu <[email protected]>
Message-ID: <[email protected]>
This commit is contained in:
1 parent
c951ab8fd3
commit
0315fef2af
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user