[Crash-utility] waitq command does not work on RHEL5 and later (2.6.18 kernel)
Alan Tyson
atyson at hp.com
Tue Nov 6 18:20:09 UTC 2007
Hello,
I notice that struct __wait_queue changed somewhere around 2.6.15 and as
a result the waitq command fails because of the missing member "task"
which was replaced by the member "private" containing the same information.
> crash> waitq f75b9ac8
>
> waitq: invalid structure member offset: __wait_queue_task
> FILE: kernel.c LINE: 5429 FUNCTION: dump_waitq()
> << snipped >>
The attached patch fixes this, tested on RHEL4 and RHEL5 i686 only.
Regards,
Alan Tyson, HP.
--- kernel.c.orig 2007-10-30 15:51:54.000000000 +0000
+++ kernel.c 2007-11-06 10:12:25.000000000 +0000
@@ -390,8 +390,12 @@ kernel_init()
STRUCT_SIZE_INIT(__wait_queue, "__wait_queue");
if (VALID_STRUCT(__wait_queue)) {
- MEMBER_OFFSET_INIT(__wait_queue_task,
- "__wait_queue", "task");
+ if (MEMBER_EXISTS("__wait_queue", "task"))
+ MEMBER_OFFSET_INIT(__wait_queue_task,
+ "__wait_queue", "task");
+ else
+ MEMBER_OFFSET_INIT(__wait_queue_task,
+ "__wait_queue", "private");
MEMBER_OFFSET_INIT(__wait_queue_head_task_list,
"__wait_queue_head", "task_list");
MEMBER_OFFSET_INIT(__wait_queue_task_list,
More information about the Crash-utility
mailing list