diff options
author | Jens Axboe <[email protected]> | 2020-08-25 07:58:00 -0600 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2020-08-25 12:05:57 -0600 |
commit | 6b7898eb180df12767933466b7855b23103ad489 (patch) | |
tree | d706d26c9eeb38cde5a618f000c6d1210c43151a /tools/perf/util/trace-event-scripting.c | |
parent | 842163154b87b01d8f516af15ad8916eb1661016 (diff) |
io_uring: fix imbalanced sqo_mm accounting
We do the initial accounting of locked_vm and pinned_vm before we have
setup ctx->sqo_mm, which means we can end up having not accounted the
memory at setup time, but still decrement it when we exit. This causes
an imbalance in the accounting.
Setup ctx->sqo_mm earlier in io_uring_create(), before we do the first
accounting of mm->{locked,pinned}_vm. This also unifies the state
grabbing for the ctx, and eliminates a failure case in
io_sq_offload_start().
Fixes: f74441e6311a ("io_uring: account locked memory before potential error case")
Reported-by: Robert M. Muncrief <[email protected]>
Reported-by: Niklas Schnelle <[email protected]>
Tested-by: Niklas Schnelle <[email protected]>
Tested-by: Robert M. Muncrief <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions