BUG/MINOR: debug: don't check the call date on tasklets
tasklets don't have a call date, so when a tasklet is cast into a task and is present at the end of a page we run a risk of dereferencing unmapped memory when dumping them in ha_task_dump(). This commit simplifies the test and uses to distinct calls for tasklets and tasks. No backport is needed.
This commit is contained in:
parent
5cf64dd1bd
commit
20db9115dc
18
src/debug.c
18
src/debug.c
@ -84,12 +84,18 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
|
||||
return;
|
||||
}
|
||||
|
||||
chunk_appendf(buf,
|
||||
"%p (%s) calls=%u last=%llu%s\n",
|
||||
task, TASK_IS_TASKLET(task) ? "tasklet" : "task",
|
||||
task->calls,
|
||||
task->call_date ? (unsigned long long)(now_mono_time() - task->call_date) : 0,
|
||||
task->call_date ? " ns ago" : "");
|
||||
if (TASK_IS_TASKLET(task))
|
||||
chunk_appendf(buf,
|
||||
"%p (tasklet) calls=%u\n",
|
||||
task,
|
||||
task->calls);
|
||||
else
|
||||
chunk_appendf(buf,
|
||||
"%p (task) calls=%u last=%llu%s\n",
|
||||
task,
|
||||
task->calls,
|
||||
task->call_date ? (unsigned long long)(now_mono_time() - task->call_date) : 0,
|
||||
task->call_date ? " ns ago" : "");
|
||||
|
||||
chunk_appendf(buf, "%s"
|
||||
" fct=%p (%s) ctx=%p\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user