]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: tasklet: properly compute the sleeping threads mask in tasklet_wakeup()
authorWilly Tarreau <w@1wt.eu>
Fri, 18 Oct 2019 06:45:41 +0000 (08:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Oct 2019 07:00:26 +0000 (09:00 +0200)
commit891b5ef05a5268eda5ec8eccb7686fa086f574f8
tree324e1b6049ee5b7a0b0284b8d19373d83c04310c
parente8826ded5fea3593d89da2be5c2d81c522070995
BUG/MEDIUM: tasklet: properly compute the sleeping threads mask in tasklet_wakeup()

The use of ~(1 << tid) to compute the sleeping_mask in tasklet_wakeup()
will result in breakage above 32 threads, because (1<<31) = 0xFFFFFFFF8000000,
and upper values will lead to theorically undefined results, but practically
will wrap over 0x1 to 0x80000000 again and indicate wrong sleeping masks. It
seems that the main visible effect maybe extra latency on some threads or
short CPU loops on others.

No backport is needed.
include/proto/task.h