Fix data corruption in bnxt_re
Resolves: RHEL-77285 Signed-off-by: Kamal Heib <kheib@redhat.com>
This commit is contained in:
parent
7bc635263a
commit
7fac014ff5
@ -0,0 +1,34 @@
|
|||||||
|
From 9558f227b158291bc3eb7044938d711e388802ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: Selvin Xavier <selvin.xavier@broadcom.com>
|
||||||
|
Date: Mon, 10 Mar 2025 07:38:03 -0700
|
||||||
|
Subject: [PATCH] bnxt_re/lib: Fix the data copy during the low latency push
|
||||||
|
path
|
||||||
|
|
||||||
|
The pointer used in the destination buffer is not correctly
|
||||||
|
type casted, because of which the data gets corrupted while copying.
|
||||||
|
The issue is seen in the previous adapters that has the low latency
|
||||||
|
push enabled. Fixing the pointer casting.
|
||||||
|
|
||||||
|
Fixes: 52d0870c3eac ("bnxt_re/lib: Enable low latency push")
|
||||||
|
Reported-By: Kamal Heib <kheib@redhat.com>
|
||||||
|
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
|
||||||
|
---
|
||||||
|
providers/bnxt_re/main.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/providers/bnxt_re/main.h b/providers/bnxt_re/main.h
|
||||||
|
index 7a9d48e1cf01..067b0c18df8d 100644
|
||||||
|
--- a/providers/bnxt_re/main.h
|
||||||
|
+++ b/providers/bnxt_re/main.h
|
||||||
|
@@ -598,7 +598,7 @@ static inline void bnxt_re_copy_data_to_pb(struct bnxt_re_push_buffer *pbuf,
|
||||||
|
int indx;
|
||||||
|
|
||||||
|
for (indx = 0; indx < idx; indx++) {
|
||||||
|
- dst = (uintptr_t *)(pbuf->pbuf + 2 * (indx + offset));
|
||||||
|
+ dst = (uintptr_t *)(pbuf->pbuf) + 2 * indx + offset;
|
||||||
|
src = (uintptr_t *)(pbuf->wqe[indx]);
|
||||||
|
mmio_write64(dst, *src);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
@ -10,6 +10,7 @@ Summary: RDMA core userspace libraries and daemons
|
|||||||
License: GPLv2 or BSD
|
License: GPLv2 or BSD
|
||||||
Url: https://github.com/linux-rdma/rdma-core
|
Url: https://github.com/linux-rdma/rdma-core
|
||||||
Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
Source: https://github.com/linux-rdma/rdma-core/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0001: 0001-bnxt_re-lib-Fix-the-data-copy-during-the-low-latency.patch
|
||||||
Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch
|
Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch
|
||||||
# Do not build static libs by default.
|
# Do not build static libs by default.
|
||||||
%define with_static %{?_with_static: 1} %{?!_with_static: 0}
|
%define with_static %{?_with_static: 1} %{?!_with_static: 0}
|
||||||
@ -280,6 +281,7 @@ easy, object-oriented access to IB verbs.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch 0001 -p1
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
%patch 9999 -p1
|
%patch 9999 -p1
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user