[PATCH 1/4] sbitmapq: a cleanup in the sbitmapq_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lets remove the member's validity check from sbitmapq_init(), which will
help the crash to display the actual error when the sbitmapq fails.

Without the patch:
  crash> sbitmapq ffff8e99d0dc8010
  sbitmapq: command not supported or applicable on this architecture or kernel

With the patch:
  crash> sbitmapq ffff8e99d0dc8010

  sbitmapq: invalid structure member offset: sbitmap_queue_alloc_hint
          FILE: sbitmap.c  LINE: 365  FUNCTION: sbitmap_queue_context_load()

Signed-off-by: Lianbo Jiang <lijiang@xxxxxxxxxx>
---
 sbitmap.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/sbitmap.c b/sbitmap.c
index 96a61e6c2c71..7693eef6cebd 100644
--- a/sbitmap.c
+++ b/sbitmap.c
@@ -525,30 +525,6 @@ void sbitmapq_init(void)
 	MEMBER_OFFSET_INIT(sbq_wait_state_wait_cnt, "sbq_wait_state", "wait_cnt");
 	MEMBER_OFFSET_INIT(sbq_wait_state_wait, "sbq_wait_state", "wait");
 
-	if (!VALID_SIZE(sbitmap_word) ||
-			!VALID_SIZE(sbitmap) ||
-			!VALID_SIZE(sbitmap_queue) ||
-			!VALID_SIZE(sbq_wait_state) ||
-			INVALID_MEMBER(sbitmap_word_depth) ||
-			INVALID_MEMBER(sbitmap_word_word) ||
-			INVALID_MEMBER(sbitmap_word_cleared) ||
-			INVALID_MEMBER(sbitmap_depth) ||
-			INVALID_MEMBER(sbitmap_shift) ||
-			INVALID_MEMBER(sbitmap_map_nr) ||
-			INVALID_MEMBER(sbitmap_map) ||
-			INVALID_MEMBER(sbitmap_queue_sb) ||
-			INVALID_MEMBER(sbitmap_queue_alloc_hint) ||
-			INVALID_MEMBER(sbitmap_queue_wake_batch) ||
-			INVALID_MEMBER(sbitmap_queue_wake_index) ||
-			INVALID_MEMBER(sbitmap_queue_ws) ||
-			INVALID_MEMBER(sbitmap_queue_ws_active) ||
-			INVALID_MEMBER(sbitmap_queue_round_robin) ||
-			INVALID_MEMBER(sbitmap_queue_min_shallow_depth) ||
-			INVALID_MEMBER(sbq_wait_state_wait_cnt) ||
-			INVALID_MEMBER(sbq_wait_state_wait)) {
-		command_not_supported();
-	}
-
 	sb_flags |= SB_FLAG_INIT;
 }
 
-- 
2.20.1

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux