Commit b1445e5
io_uring: synchronise ev_posted() with waitqueues
waitqueue_active() needs smp_mb() to be in sync with waitqueues
modification, but we miss it in io_cqring_ev_posted*() apart from
cq_wait() case.
Take an smb_mb() out of wq_has_sleeper() making it waitqueue_active(),
and place it a few lines before, so it can synchronise other
waitqueue_active() as well.
The patch doesn't add any additional overhead, so even if there are
no problems currently, it's just safer to have it this way.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 4aa84f2 commit b1445e5
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1703 | 1706 | | |
1704 | 1707 | | |
1705 | 1708 | | |
1706 | 1709 | | |
1707 | 1710 | | |
1708 | 1711 | | |
1709 | | - | |
| 1712 | + | |
1710 | 1713 | | |
1711 | 1714 | | |
1712 | 1715 | | |
1713 | 1716 | | |
1714 | 1717 | | |
1715 | 1718 | | |
1716 | 1719 | | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
1717 | 1723 | | |
1718 | 1724 | | |
1719 | 1725 | | |
1720 | 1726 | | |
1721 | 1727 | | |
1722 | 1728 | | |
1723 | | - | |
| 1729 | + | |
1724 | 1730 | | |
1725 | 1731 | | |
1726 | 1732 | | |
| |||
0 commit comments