From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20D58C4360F for ; Mon, 18 Mar 2019 08:11:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6CC9214D8 for ; Mon, 18 Mar 2019 08:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552896694; bh=EJUJcFVPosTSxQWKz8GA9Dqpy0tzrdpXAs+03JXwwQM=; h=Subject:To:Cc:From:Date:List-ID:From; b=1fASECENxMLBUvYhA6LAe01YcCXlSS68u+kfC/lj7lJHO6n/l/qi+1xT2VSgFU5Xp VeabSk744LA7jCkJ3IPxjyd1hddbu7SzwwZWwufaHAN7ojFUJz3oTncxf3dUYdB2Gw h08iU+B6PGvMztvD+UE6DthD3R4oYlvVllGbSMvQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726704AbfCRILd (ORCPT ); Mon, 18 Mar 2019 04:11:33 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:54415 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbfCRILd (ORCPT ); Mon, 18 Mar 2019 04:11:33 -0400 X-Greylist: delayed 520 seconds by postgrey-1.27 at vger.kernel.org; Mon, 18 Mar 2019 04:11:32 EDT Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id AD38D3706; Mon, 18 Mar 2019 04:05:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 18 Mar 2019 04:05:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/eCnE/ 9cDLmUCdwjihTK8u8lPpwtijMXQ2fV5IP1Qug=; b=2jZuND3IxqMWj9j9PTjszx I+RFaBio4tzjrxoLU49yMmkinT8i2bYnMOOZVayJ0vaQRVeWWEHQRA9S30vbI9r/ ycbAr2y9/pVGWwGY8OgjvEYsGZhwJJC6I4sRit5mnjPGQ0Pd3jBegR8ielU0jgj2 LA9L2F0dIATZofp63HBOsrNP3yqs9MF1B0dcwnQaoRsVW4WahHjuZz0b01zJ2isy muhF7EiDYYXWqqp4z4//F8/GBSmhxf/fgP1oKosNBM1WTnLwq+q19oBWDFR+8rLi pvsF8XERDsOMzy9386O1RiulZgCPS+9XYBA5F0XoKB6gZrAm8JL921vYvcMJ+X9w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddriedtgdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuffhomhgrihhnpehfrhgvvgguvghskhhtohhprdhorhhgnecukfhppeekfedrke eirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghh rdgtohhmnecuvehluhhsthgvrhfuihiivgepvd X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id C8D9510314; Mon, 18 Mar 2019 04:05:36 -0400 (EDT) Subject: FAILED: patch "[PATCH] drm: Reorder set_property_atomic to avoid returning with an" failed to apply to 4.14-stable tree To: chris@chris-wilson.co.uk, airlied@linux.ie, daniel.vetter@ffwll.ch, maarten.lankhorst@linux.intel.com, sean@poorly.run, stable@vger.kernel.org Cc: From: Date: Mon, 18 Mar 2019 09:05:26 +0100 Message-ID: <1552896326205217@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 227ad6d957898a88b1746e30234ece64d305f066 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 30 Dec 2018 12:28:42 +0000 Subject: [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx Delay the drm_modeset_acquire_init() until after we check for an allocation failure so that we can return immediately upon error without having to unwind. WARNING: lock held when returning to user space! 4.20.0+ #174 Not tainted ------------------------------------------------ syz-executor556/8153 is leaving the kernel with locks still held! 1 lock held by syz-executor556/8153: #0: 000000005100c85c (crtc_ww_class_acquire){+.+.}, at: set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462 Reported-by: syzbot+6ea337c427f5083ebdf2@syzkaller.appspotmail.com Fixes: 144a7999d633 ("drm: Handle properties in the core for atomic drivers") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Cc: # v4.14+ Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20181230122842.21917-1-chris@chris-wilson.co.uk diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index bb1dd46496cd..a9005c1c2384 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c @@ -459,12 +459,13 @@ static int set_property_atomic(struct drm_mode_object *obj, struct drm_modeset_acquire_ctx ctx; int ret; - drm_modeset_acquire_init(&ctx, 0); - state = drm_atomic_state_alloc(dev); if (!state) return -ENOMEM; + + drm_modeset_acquire_init(&ctx, 0); state->acquire_ctx = &ctx; + retry: if (prop == state->dev->mode_config.dpms_property) { if (obj->type != DRM_MODE_OBJECT_CONNECTOR) {