Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3789534ybi; Mon, 29 Jul 2019 12:39:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxixb9Y5vA08dn+ecOw+6Bjzve+s1CHzQyMBylnC8+wl5eSc209U8LXalfcgb96BO59+WwG X-Received: by 2002:a63:fe15:: with SMTP id p21mr106925997pgh.149.1564429177811; Mon, 29 Jul 2019 12:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429177; cv=none; d=google.com; s=arc-20160816; b=Mc4xsEQezFyDoFui5PNd4QfCJJABZCxUHOBgKIV1octZQTIIh06swuLM6zVMXTveTM vze+hdJehHWkBRmaC5TlEh2qZzfAFTKC/77/dovGdkIRg/YtlkgztA0a6hwKX1xO0PCT 0YAP6+SgUefso8zF2GUi8YsJi0CYXMqyL2ibkO+U0o+ehsGdeuUEacYVij4TLeIpaSqe cSeeqp4KvOc0hcIAxMQrj/5K5bQUzotP+38qXdrj2giDFaIE1e3GkxLmdsPLU5JowYv3 5M/Pn4fmT1dhc8xy6yBiuOZ6ieBhhuOO8PdnwFb5+GvfZ1cacSJDdRnvQukVuHNICiib KwdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nw/qN8PNDdbmHSH7u3nKzSg7y2sHx0J8Yj7qbqYic8g=; b=rw7qD32eGBzBrMZnNFdjHzQ1vdc8AqE5U/iLJ1aiS5ahKHTt+OTQMVQi9SlsHda5rL F9NwuYKOHmuK80au84aKG/xLJ3K+gunFNNsay+2vkQ8ckbFSSweRLybZnz1ru5U+rEPk HkAdvpNJGgd66XhVuSPXcQUXqpx1oZIr4iKKb8Sf9r3sYxnEM96YrG2MdanSYLvXBuOM MmkhQjcdV8hT743v3eBwil0+IuRU6zrD74vg6jy+7JNQoMFCj4DntsmuXArRrahqgfgh 8uSY+aMiKnYBqRPoZXt5RbmqNVOOpkJBQDi85HW8gsGXXOZp+LvheDEHNx0p/5SjKF92 9Scw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e/hPW1vw"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si29087591pfe.269.2019.07.29.12.39.22; Mon, 29 Jul 2019 12:39:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e/hPW1vw"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388825AbfG2TiD (ORCPT + 99 others); Mon, 29 Jul 2019 15:38:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:52974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388437AbfG2TiB (ORCPT ); Mon, 29 Jul 2019 15:38:01 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E96DC2171F; Mon, 29 Jul 2019 19:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429080; bh=KJf2K2UdkZTGt+0mCo4df6+uIaLto5eUYkcRQ8ZM+Rk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e/hPW1vwK1CB+RKtrY0TBiJNfHtnjkYKclF7WLLFS9zsy3Wez9h2MLcrxvSSzIyc9 M51B79wW3mx3d5BtMoZqzzO5IIN7hadk3DXJnzvrUEYERvb9jss6kpmkTXVctTEp8Y xNdO6j/Ywxzd6UPvvKvhn0yT7ajf5TcX9u8gYs+0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rodrigo Siqueira , Tomeu Vizoso , Emil Velikov , Benjamin Gaignard , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Daniel Vetter , Sasha Levin Subject: [PATCH 4.14 279/293] drm/crc-debugfs: Also sprinkle irqrestore over early exits Date: Mon, 29 Jul 2019 21:22:50 +0200 Message-Id: <20190729190845.641798943@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit d99004d7201aa653658ff2390d6e516567c96ebc ] I. was. blind. Caught with vkms, which has some really slow crc computation function. Fixes: 1882018a70e0 ("drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry") Cc: Rodrigo Siqueira Cc: Tomeu Vizoso Cc: Emil Velikov Cc: Benjamin Gaignard Cc: Ville Syrjälä Reviewed-by: Emil Velikov Reviewed-by: Benjamin Gaignard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190606211544.5389-1-daniel.vetter@ffwll.ch Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_debugfs_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c index f689c75474e5..2901b7944068 100644 --- a/drivers/gpu/drm/drm_debugfs_crc.c +++ b/drivers/gpu/drm/drm_debugfs_crc.c @@ -366,7 +366,7 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, /* Caller may not have noticed yet that userspace has stopped reading */ if (!crc->entries) { - spin_unlock(&crc->lock); + spin_unlock_irqrestore(&crc->lock, flags); return -EINVAL; } @@ -377,7 +377,7 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool has_frame, bool was_overflow = crc->overflow; crc->overflow = true; - spin_unlock(&crc->lock); + spin_unlock_irqrestore(&crc->lock, flags); if (!was_overflow) DRM_ERROR("Overflow of CRC buffer, userspace reads too slow.\n"); -- 2.20.1