Blame SOURCES/0001-sbitmapq-remove-struct-and-member-validation-in-sbit.patch

ae0abc
From 364b2e413c69daf189d2bc0238e3ba9b0dcbd937 Mon Sep 17 00:00:00 2001
ae0abc
From: Lianbo Jiang <lijiang@redhat.com>
ae0abc
Date: Mon, 23 May 2022 18:04:13 +0800
ae0abc
Subject: [PATCH 01/15] sbitmapq: remove struct and member validation in
ae0abc
 sbitmapq_init()
ae0abc
ae0abc
Let's remove the struct and member validation from sbitmapq_init(), which
ae0abc
will help the crash to display the actual error when the sbitmapq fails.
ae0abc
ae0abc
Without the patch:
ae0abc
  crash> sbitmapq ffff8e99d0dc8010
ae0abc
  sbitmapq: command not supported or applicable on this architecture or kernel
ae0abc
ae0abc
With the patch:
ae0abc
  crash> sbitmapq ffff8e99d0dc8010
ae0abc
ae0abc
  sbitmapq: invalid structure member offset: sbitmap_queue_alloc_hint
ae0abc
          FILE: sbitmap.c  LINE: 365  FUNCTION: sbitmap_queue_context_load()
ae0abc
ae0abc
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
ae0abc
---
ae0abc
 sbitmap.c | 24 ------------------------
ae0abc
 1 file changed, 24 deletions(-)
ae0abc
ae0abc
diff --git a/sbitmap.c b/sbitmap.c
ae0abc
index 96a61e6c2c71..7693eef6cebd 100644
ae0abc
--- a/sbitmap.c
ae0abc
+++ b/sbitmap.c
ae0abc
@@ -525,30 +525,6 @@ void sbitmapq_init(void)
ae0abc
 	MEMBER_OFFSET_INIT(sbq_wait_state_wait_cnt, "sbq_wait_state", "wait_cnt");
ae0abc
 	MEMBER_OFFSET_INIT(sbq_wait_state_wait, "sbq_wait_state", "wait");
ae0abc
 
ae0abc
-	if (!VALID_SIZE(sbitmap_word) ||
ae0abc
-			!VALID_SIZE(sbitmap) ||
ae0abc
-			!VALID_SIZE(sbitmap_queue) ||
ae0abc
-			!VALID_SIZE(sbq_wait_state) ||
ae0abc
-			INVALID_MEMBER(sbitmap_word_depth) ||
ae0abc
-			INVALID_MEMBER(sbitmap_word_word) ||
ae0abc
-			INVALID_MEMBER(sbitmap_word_cleared) ||
ae0abc
-			INVALID_MEMBER(sbitmap_depth) ||
ae0abc
-			INVALID_MEMBER(sbitmap_shift) ||
ae0abc
-			INVALID_MEMBER(sbitmap_map_nr) ||
ae0abc
-			INVALID_MEMBER(sbitmap_map) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_sb) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_alloc_hint) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_wake_batch) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_wake_index) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_ws) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_ws_active) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_round_robin) ||
ae0abc
-			INVALID_MEMBER(sbitmap_queue_min_shallow_depth) ||
ae0abc
-			INVALID_MEMBER(sbq_wait_state_wait_cnt) ||
ae0abc
-			INVALID_MEMBER(sbq_wait_state_wait)) {
ae0abc
-		command_not_supported();
ae0abc
-	}
ae0abc
-
ae0abc
 	sb_flags |= SB_FLAG_INIT;
ae0abc
 }
ae0abc
 
ae0abc
-- 
ae0abc
2.30.2
ae0abc