patch 'vhost: fix offset while mapping log base address' has been queued to stable release 21.11.9
Kevin Traynor
ktraynor at redhat.com
Wed Nov 27 18:17:30 CET 2024
Hi,
FYI, your patch has been queued to stable release 21.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/53079bcb2e65ac74ed7ffb04a2e80d74fc3376cb
Thanks.
Kevin
---
>From 53079bcb2e65ac74ed7ffb04a2e80d74fc3376cb Mon Sep 17 00:00:00 2001
From: Bill Xiang <xiangwencheng at dayudpu.com>
Date: Mon, 8 Jul 2024 14:57:49 +0800
Subject: [PATCH] vhost: fix offset while mapping log base address
[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ]
For sanity the offset should be the last parameter of mmap.
Fixes: fbc4d248b198 ("vhost: fix offset while mmaping log base address")
Signed-off-by: Bill Xiang <xiangwencheng at dayudpu.com>
Reviewed-by: Chenbo Xia <chenbox at nvidia.com>
---
.mailmap | 1 +
lib/vhost/vhost_user.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 39f81c0e7d..5d6a7701d7 100644
--- a/.mailmap
+++ b/.mailmap
@@ -165,4 +165,5 @@ Bhagyada Modali <bhagyada.modali at amd.com>
Bharat Mota <bmota at vmware.com>
Bill Hong <bhong at brocade.com>
+Bill Xiang <xiangwencheng at dayudpu.com>
Billy McFall <bmcfall at redhat.com>
Billy O'Mahony <billy.o.mahony at intel.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index ca0618f627..8416aa25b7 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2325,5 +2325,5 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
* fail when offset is not page size aligned.
*/
- addr = mmap(0, size + off, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off);
close(fd);
if (addr == MAP_FAILED) {
--
2.47.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-11-27 17:17:39.033594415 +0000
+++ 0023-vhost-fix-offset-while-mapping-log-base-address.patch 2024-11-27 17:17:38.180269140 +0000
@@ -1 +1 @@
-From bdd96d8ac76ca412165b2d1bbd3701e978246d8e Mon Sep 17 00:00:00 2001
+From 53079bcb2e65ac74ed7ffb04a2e80d74fc3376cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bdd96d8ac76ca412165b2d1bbd3701e978246d8e ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index ed4ea17c4c..544e62df7d 100644
+index 39f81c0e7d..5d6a7701d7 100644
@@ -22,2 +23,2 @@
-@@ -184,4 +184,5 @@ Bharat Mota <bharat.mota at broadcom.com> <bmota at vmware.com>
- Bhuvan Mital <bhuvan.mital at amd.com>
+@@ -165,4 +165,5 @@ Bhagyada Modali <bhagyada.modali at amd.com>
+ Bharat Mota <bmota at vmware.com>
@@ -29 +30 @@
-index 5f470da38a..0893ae80bb 100644
+index ca0618f627..8416aa25b7 100644
@@ -32 +33 @@
-@@ -2400,5 +2400,5 @@ vhost_user_set_log_base(struct virtio_net **pdev,
+@@ -2325,5 +2325,5 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -37 +37,0 @@
- alignment = get_blk_size(fd);
@@ -38,0 +39 @@
+ if (addr == MAP_FAILED) {
More information about the stable
mailing list