aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorDavid Gibson <[email protected]>2017-02-15 14:40:04 +1100
committerPaul Mackerras <[email protected]>2017-02-16 16:32:19 +1100
commit5b73d6347eb82cd2a26698fc339607e25e0ad917 (patch)
tree9895be307c2cdaf2dbe3ac393d5506fe20aa9ac5 /tools/perf/util/trace-event-scripting.c
parentee10689117c0186fd4fe7feca8d48c7316f65d70 (diff)
KVM: PPC: Book3S HV: Prevent double-free on HPT resize commit path
resize_hpt_release(), called once the HPT resize of a KVM guest is completed (successfully or unsuccessfully) frees the state structure for the resize. It is currently not safe to call with a NULL pointer. However, one of the error paths in kvm_vm_ioctl_resize_hpt_commit() can invoke it with a NULL pointer. This will occur if userspace improperly invokes KVM_PPC_RESIZE_HPT_COMMIT without previously calling KVM_PPC_RESIZE_HPT_PREPARE, or if it calls COMMIT twice without an intervening PREPARE. To fix this potential crash bug - and maybe others like it, make it safe (and a no-op) to call resize_hpt_release() with a NULL resize pointer. Found by Dan Carpenter with a static checker. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: David Gibson <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions