[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1507553065.365609203@decadent.org.uk>
Date: Mon, 09 Oct 2017 13:44:25 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Rob Clark" <robdclark@...il.com>,
"Dave Airlie" <airlied@...hat.com>,
"Michel Dänzer" <michel.daenzer@....com>
Subject: [PATCH 3.16 156/192] drm/irq: BUG_ON() -> WARN_ON()
3.16.49-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Rob Clark <robdclark@...il.com>
commit 7f907bf284ba7bb8d271f094b226699d3fef2142 upstream.
Let's make things a bit easier to debug when things go bad (potentially
under console_lock).
Signed-off-by: Rob Clark <robdclark@...il.com>
Reviewed-by: Michel Dänzer <michel.daenzer@....com>
Signed-off-by: Dave Airlie <airlied@...hat.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/gpu/drm/drm_irq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -973,7 +973,8 @@ EXPORT_SYMBOL(drm_crtc_vblank_get);
*/
void drm_vblank_put(struct drm_device *dev, int crtc)
{
- BUG_ON(atomic_read(&dev->vblank[crtc].refcount) == 0);
+ if (WARN_ON(atomic_read(&dev->vblank[crtc].refcount) == 0))
+ return;
/* Last user schedules interrupt disable */
if (atomic_dec_and_test(&dev->vblank[crtc].refcount) &&
Powered by blists - more mailing lists