aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2016-11-12 01:12:56 +0000
committerDaniel Vetter <[email protected]>2016-11-12 14:19:38 +0100
commitb3c11ac267d461d3d597967164ff7278a919a39f (patch)
treeb493960fb72de73ef4a7b202bd0bc96b11340f2a /tools/perf/scripts/python/net_dropmonitor.py
parentf92e1ee52ae2e5ef4249b12a5659dc2b011857c3 (diff)
drm: move allocation out of drm_get_format_name()
The function's behaviour was changed in 90844f00049e, without changing its signature, causing people to keep using it the old way without realising they were now leaking memory. Rob Clark also noticed it was also allocating GFP_KERNEL memory in atomic contexts, breaking them. Instead of having to allocate GFP_ATOMIC memory and fixing the callers to make them cleanup the memory afterwards, let's change the function's signature by having the caller take care of the memory and passing it to the function. The new parameter is a single-field struct in order to enforce the size of its buffer and help callers to correctly manage their memory. Fixes: 90844f00049e ("drm: make drm_get_format_name thread-safe") Cc: Rob Clark <[email protected]> Cc: Christian König <[email protected]> Acked-by: Christian König <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Sinclair Yeh <[email protected]> (vmwgfx) Reviewed-by: Jani Nikula <[email protected]> Suggested-by: Ville Syrjälä <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions