linux_dsm_epyc7002/include
Leo (Sunpeng) Li 1c6ceeee6e drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits
During a non-blocking commit, it is possible to return before the
commit_tail work is queued (-ERESTARTSYS, for example).

Since a reference on the crtc commit object is obtained for the pending
vblank event when preparing the commit, the above situation will leave
us with an extra reference.

Therefore, if the commit_tail worker has not consumed the event at the
end of a commit, release it's reference.

Changes since v1:
- Also check for state->event->base.completion being set, to
  handle the case where stall_checks() fails in setup_crtc_commit().
Changes since v2:
- Add a flag to drm_crtc_commit, to prevent dereferencing a freed event.
  i915 may unreference the state in a worker.

Fixes: 24835e442f ("drm: reference count event->completion")
Cc: <stable@vger.kernel.org> # v4.11+
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com> #v1
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180117115108.29608-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Sean Paul <seanpaul@chromium.org>
2018-01-30 11:27:26 +01:00
..
acpi
asm-generic Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-23 11:53:04 -08:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-01-05 12:10:06 -08:00
drm drm/atomic: Fix memleak on ERESTARTSYS during non-blocking commits 2018-01-30 11:27:26 +01:00
dt-bindings
keys
kvm
linux Linux 4.15-rc8 2018-01-18 09:32:15 +10:00
math-emu
media
memory
misc
net sctp: fix the handling of ICMP Frag Needed for too small MTUs 2018-01-08 14:19:13 -05:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-12-28 23:20:21 -08:00
uapi drm/uapi: Deprecate nonsense kms mode types 2018-01-29 21:45:29 +02:00
video drm/imx: format modifier support 2018-01-05 11:33:24 +10:00
xen xen: fixes for 4.15-rc5 2017-12-22 12:30:10 -08:00