projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
aebd6a3
)
fix use of uninitialized dummy_fut in aio_suspend
author
Alexey Izbyshev
<izbyshev@ispras.ru>
Fri, 7 Oct 2022 12:23:57 +0000
(15:23 +0300)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 19 Oct 2022 18:01:32 +0000
(14:01 -0400)
aio_suspend waits on a dummy futex in the corner case when the array of
requests contains NULL pointers only. But the value of this futex was
left uninitialized, so if it happens to be non-zero, aio_suspend
degrades to spinning instead of blocking.
src/aio/aio_suspend.c
patch
|
blob
|
history
diff --git
a/src/aio/aio_suspend.c
b/src/aio/aio_suspend.c
index
95def79
..
1f0c9aa
100644
(file)
--- a/
src/aio/aio_suspend.c
+++ b/
src/aio/aio_suspend.c
@@
-9,7
+9,7
@@
int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec
{
int i, tid = 0, ret, expect = 0;
struct timespec at;
- volatile int dummy_fut, *pfut;
+ volatile int dummy_fut
= 0
, *pfut;
int nzcnt = 0;
const struct aiocb *cb = 0;