patch 'vhost: fix offset while mapping log base address' has been queued to stable release 22.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 23 23:16:09 CEST 2024


Hi,

FYI, your patch has been queued to stable release 22.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/25/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/659d8ff0cfebd42336ca147c840f453d9d37482d

Thanks.

Luca Boccassi

---
>From 659d8ff0cfebd42336ca147c840f453d9d37482d 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 80d6d50ba9..8c7b38fb35 100644
--- a/.mailmap
+++ b/.mailmap
@@ -166,6 +166,7 @@ Bert van Leeuwen <bert.vanleeuwen at netronome.com>
 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>
 Bing Zhao <bingz at nvidia.com> <bingz at mellanox.com> <bing.zhao at hxt-semitech.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 8d7d04059c..d665d6c7d9 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
 	 * mmap from 0 to workaround a hugepage mmap bug: mmap will
 	 * 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) {
 		VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:41.626590214 +0100
+++ 0029-vhost-fix-offset-while-mapping-log-base-address.patch	2024-10-23 22:16:40.467941496 +0100
@@ -1 +1 @@
-From bdd96d8ac76ca412165b2d1bbd3701e978246d8e Mon Sep 17 00:00:00 2001
+From 659d8ff0cfebd42336ca147c840f453d9d37482d 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 80d6d50ba9..8c7b38fb35 100644
@@ -22,3 +23,3 @@
-@@ -183,6 +183,7 @@ Bhagyada Modali <bhagyada.modali at amd.com>
- Bharat Mota <bharat.mota at broadcom.com> <bmota at vmware.com>
- Bhuvan Mital <bhuvan.mital at amd.com>
+@@ -166,6 +166,7 @@ Bert van Leeuwen <bert.vanleeuwen at netronome.com>
+ Bhagyada Modali <bhagyada.modali at amd.com>
+ Bharat Mota <bmota at vmware.com>
@@ -31 +32 @@
-index 5f470da38a..0893ae80bb 100644
+index 8d7d04059c..d665d6c7d9 100644
@@ -34 +35 @@
-@@ -2399,7 +2399,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
+@@ -2269,7 +2269,7 @@ vhost_user_set_log_base(struct virtio_net **pdev,
@@ -40 +40,0 @@
- 	alignment = get_blk_size(fd);
@@ -42,0 +43 @@
+ 		VHOST_LOG_CONFIG(dev->ifname, ERR, "mmap log base failed!\n");


More information about the stable mailing list