|
Tomas Bzatek |
aa9c0e |
From 26e4343c2ba2db7a3c5696bbf61bb87942ac02bb Mon Sep 17 00:00:00 2001
|
|
Tomas Bzatek |
aa9c0e |
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
Tomas Bzatek |
aa9c0e |
Date: Thu, 13 Apr 2023 17:28:42 +0200
|
|
Tomas Bzatek |
aa9c0e |
Subject: [PATCH 11/18] nbft: Fix nbft_ssns_flags endianness test
|
|
Tomas Bzatek |
aa9c0e |
|
|
Tomas Bzatek |
aa9c0e |
Missing flags endianness conversion leading to ssns_ext_info
|
|
Tomas Bzatek |
aa9c0e |
not being parsed on s390x and armhf.
|
|
Tomas Bzatek |
aa9c0e |
---
|
|
Tomas Bzatek |
aa9c0e |
src/nvme/nbft.c | 4 ++--
|
|
Tomas Bzatek |
aa9c0e |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Tomas Bzatek |
aa9c0e |
|
|
Tomas Bzatek |
aa9c0e |
diff --git a/src/nvme/nbft.c b/src/nvme/nbft.c
|
|
Tomas Bzatek |
aa9c0e |
index f91d21b..940dd8e 100644
|
|
Tomas Bzatek |
aa9c0e |
--- a/src/nvme/nbft.c
|
|
Tomas Bzatek |
aa9c0e |
+++ b/src/nvme/nbft.c
|
|
Tomas Bzatek |
aa9c0e |
@@ -169,7 +169,7 @@ static int read_ssns_exended_info(struct nbft_info *nbft,
|
|
Tomas Bzatek |
aa9c0e |
"invalid ID in SSNS extended info descriptor");
|
|
Tomas Bzatek |
aa9c0e |
verify(raw_ssns_ei->version == 1,
|
|
Tomas Bzatek |
aa9c0e |
"invalid version in SSNS extended info descriptor");
|
|
Tomas Bzatek |
aa9c0e |
- verify(le16_to_cpu(raw_ssns_ei->ssns_index) == le16_to_cpu(ssns->index),
|
|
Tomas Bzatek |
aa9c0e |
+ verify(le16_to_cpu(raw_ssns_ei->ssns_index) == ssns->index,
|
|
Tomas Bzatek |
aa9c0e |
"SSNS index doesn't match extended info descriptor index");
|
|
Tomas Bzatek |
aa9c0e |
|
|
Tomas Bzatek |
aa9c0e |
if (!(le32_to_cpu(raw_ssns_ei->flags) & NBFT_SSNS_EXT_INFO_VALID))
|
|
Tomas Bzatek |
aa9c0e |
@@ -292,7 +292,7 @@ static int read_ssns(struct nbft_info *nbft,
|
|
Tomas Bzatek |
aa9c0e |
goto fail;
|
|
Tomas Bzatek |
aa9c0e |
|
|
Tomas Bzatek |
aa9c0e |
/* SSNS extended info */
|
|
Tomas Bzatek |
aa9c0e |
- if (raw_ssns->flags & NBFT_SSNS_EXTENDED_INFO_IN_USE) {
|
|
Tomas Bzatek |
aa9c0e |
+ if (le16_to_cpu(raw_ssns->flags) & NBFT_SSNS_EXTENDED_INFO_IN_USE) {
|
|
Tomas Bzatek |
aa9c0e |
struct nbft_ssns_ext_info *ssns_extended_info;
|
|
Tomas Bzatek |
aa9c0e |
|
|
Tomas Bzatek |
aa9c0e |
if (!get_heap_obj(raw_ssns, ssns_extended_info_desc_obj, 0,
|
|
Tomas Bzatek |
aa9c0e |
--
|
|
Tomas Bzatek |
aa9c0e |
2.39.2
|
|
Tomas Bzatek |
aa9c0e |
|