Fix data corruption in bnxt_re

Resolves: RHEL-89179
Signed-off-by: Kamal Heib <kheib@redhat.com>
This commit is contained in:
Kamal Heib 2025-04-30 22:50:02 -04:00
parent 89d903e4fd
commit 2614defbd4
2 changed files with 41 additions and 1 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
Name: rdma-core
Version: 54.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: RDMA core userspace libraries and daemons
# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license
@ -10,6 +10,7 @@ Summary: RDMA core userspace libraries and daemons
License: GPLv2 or BSD
Url: https://github.com/linux-rdma/rdma-core
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
Patch9998: 9998-kernel-boot-Do-not-perform-device-rename-on-OPA-devi.patch
Patch9999: 9999-udev-keep-NAME_KERNEL-as-default-interface-naming-co.patch
# Do not build static libs by default.
@ -266,6 +267,7 @@ easy, object-oriented access to IB verbs.
%prep
%setup -q
%patch0001 -p1
%if 0%{?fedora}
%patch9998 -p1
%endif
@ -618,6 +620,10 @@ fi
%endif
%changelog
* Wed Apr 30 2025 Kamal Heib <kheib@redhat.com>
- Fix data corruption in bnxt_re
- Resolves: RHEL-89179
* Tue Oct 29 2024 Kamal Heib <kheib@redhat.com> - 54.0-1
- Rebase to upstream release v54.0
- Resolves: RHEL-52886, RHEL-54647, RHEL-51876