drm/linux: Fix potential ww mutex induced panics master
authorFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 15 Oct 2018 20:17:54 +0000 (22:17 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 15 Oct 2018 20:31:40 +0000 (22:31 +0200)
commit169b6cefef9b3d56097dad138b3d0af6d1bd8312
tree6ac6cd8020f788268820ec4c53e21764ab28e770
parent8e5d7c42c16ea1b7b0545d8d6a4bf42046da03b8
drm/linux: Fix potential ww mutex induced panics

ww mutex locking functions can be called with a NULL ctx and were
happily setting both lock->acquired to non-zero and lock->ctx to
NULL, a combination which other parts of our ww mutex implementation
assume is not possible.

Obtained-from: OpenBSD
sys/dev/drm/include/linux/ww_mutex.h