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.
* 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;