diff options
author | Andy Grover <[email protected]> | 2016-11-21 16:35:30 -0800 |
---|---|---|
committer | Bart Van Assche <[email protected]> | 2016-12-15 16:34:58 +0100 |
commit | d0905ca757bc40bd1ebc261a448a521b064777d7 (patch) | |
tree | b1a44e58386d0be4b2d49534dcac50c7e36b29ac /tools/perf/util/trace-event-scripting.c | |
parent | 8dcf07be2d0bcbfcebc49b9451a4feaf83e3428b (diff) |
target/user: Fix use-after-free of tcmu_cmds if they are expired
Don't free the cmd in tcmu_check_expired_cmd, it's still referenced by
an entry in our cmd_id->cmd idr. If userspace ever resumes processing,
tcmu_handle_completions() will use the now-invalid cmd pointer.
Instead, don't free cmd. It will be freed by tcmu_handle_completion() if
userspace ever recovers, or tcmu_free_device if not.
Cc: [email protected]
Reported-by: Bryant G Ly <[email protected]>
Tested-by: Bryant G Ly <[email protected]>
Signed-off-by: Andy Grover <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions