mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-04 06:46:44 -04:00
DEBUG: cli: relax tid check in "debug dev task" for recent sched changes
Since commit 0988b9c773 ("MEDIUM: tasks: Remove the per-thread group
wait queue") in 3.5-dev, a task's tid may be as negative as -MAX_THREAD-1
and not just -1, so we must accept this when trying to check if a pointer
looks like a valid task.
No backport is needed.
This commit is contained in:
parent
4c9431c5d4
commit
a8aba33f09
1 changed files with 1 additions and 1 deletions
|
|
@ -1523,7 +1523,7 @@ static int debug_parse_cli_task(char **args, char *payload, struct appctx *appct
|
|||
* the TASK_COMMON part.
|
||||
*/
|
||||
if (!may_access(ptr) || !may_access(ptr + sizeof(struct tasklet) - 1) ||
|
||||
((const struct tasklet *)ptr)->tid < -1 ||
|
||||
((const struct tasklet *)ptr)->tid < -1 - MAX_THREADS||
|
||||
((const struct tasklet *)ptr)->tid >= (int)MAX_THREADS) {
|
||||
ret = cli_err(appctx, "The designated memory area doesn't look like a valid task/tasklet\n");
|
||||
goto leave;
|
||||
|
|
|
|||
Loading…
Reference in a new issue