diff options
author | Lyude Paul <lyude@redhat.com> | 2019-01-11 03:53:32 +0300 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2019-01-11 04:12:23 +0300 |
commit | cfe9f90358d97a83253443b0182bff1222d3a7ac (patch) | |
tree | e842d8293846d1319a3a305e2dbbd4c7205f0d63 /drivers/sn | |
parent | a68f9917721bba02de43f728e31426f2384cb961 (diff) | |
download | linux-cfe9f90358d97a83253443b0182bff1222d3a7ac.tar.xz |
drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs
Up until now, freeing payloads on remote MST hubs that just had ports
removed has almost never worked because we've been relying on port
validation in order to stop us from accessing ports that have already
been freed from memory, but ports which need their payloads released due
to being removed will never be a valid part of the topology after
they've been removed.
Since we've introduced malloc refs, we can replace all of the validation
logic in payload helpers which are used for deallocation with some
well-placed malloc krefs. This ensures that regardless of whether or not
the ports are still valid and in the topology, any port which has an
allocated payload will remain allocated in memory until it's payloads
have been removed - finally allowing us to actually release said
payloads correctly.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Cc: David Airlie <airlied@redhat.com>
Cc: Jerry Zuo <Jerry.Zuo@amd.com>
Cc: Juston Li <juston.li@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-10-lyude@redhat.com
Diffstat (limited to 'drivers/sn')
0 files changed, 0 insertions, 0 deletions