summaryrefslogtreecommitdiff
path: root/arch/x86/events/intel/cstate.c
diff options
context:
space:
mode:
authorMatti Hamalainen <ccr@tnsp.org>2020-11-20 17:23:38 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-11-26 08:04:19 +0100
commit2be65641642ef423f82162c3a5f28c754d1637d2 (patch)
tree7ddf12d25ef9a2069596f4d79f077eaa23e4b7d2 /arch/x86/events/intel/cstate.c
parent10e26e749fd0ba78a913548e2efeca1a157772da (diff)
drm/nouveau: fix relocations applying logic and a double-free
Commit 03e0d26fcf79 ("drm/nouveau: slowpath for pushbuf ioctl") included a logic-bug which results in the relocations not actually getting applied at all as the call to nouveau_gem_pushbuf_reloc_apply() is never reached. This causes a regression with graphical corruption, triggered when relocations need to be done (for example after a suspend/resume cycle.) Fix by setting *apply_relocs value only if there were more than 0 relocations. Additionally, the never reached code had a leftover u_free() call, which, after fixing the logic, now got called and resulted in a double-free. Fix by removing one u_free(), moving the other and adding check for errors. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: nouveau@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Matti Hamalainen <ccr@tnsp.org> Fixes: 03e0d26fcf79 ("drm/nouveau: slowpath for pushbuf ioctl") References: https://gitlab.freedesktop.org/drm/nouveau/-/issues/11 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20201120152338.1203257-1-ccr@tnsp.org
Diffstat (limited to 'arch/x86/events/intel/cstate.c')
0 files changed, 0 insertions, 0 deletions