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 6B76EC10F0F 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 2F86F2070D for ; Mon, 18 Mar 2019 08:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552896694; bh=9mCAVAodIkdRwgMVeBlS5MfbAhTqi24XsMGkJ6I0Vdc=; h=Subject:To:Cc:From:Date:List-ID:From; b=b3TItiqcFKRI4B1FHhK6EPqxzidSxYG9dPrH5zKQsprArfIhvKjlVosKjIKHQKvz2 8iZJ4fAx7KvnM+EfKnYlQbonUWXs0JE4aEfxIzqQhgoTdtD2ZGrTikExF6q0BlFF8O cno3pbmqXapVDUAO5uOHKLi4ZTwj9t6bRf/PDulA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbfCRILd (ORCPT ); Mon, 18 Mar 2019 04:11:33 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:60027 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfCRILc (ORCPT ); Mon, 18 Mar 2019 04:11:32 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 1AD2936D2; Mon, 18 Mar 2019 04:05:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 18 Mar 2019 04:05:36 -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=0M8ykK 7Du3cFsHt++TMLVNM+7ONoA1tAAI7rFNdWh2Y=; b=Wuel9HZ4IjYMR2yvpi6Nm+ eTtqHopY35W5AEt3LymhQz1iodbo2WsjLD1fsomoiY2zZW8o9s3G1/YErsuob0t9 jN5jKjbj5pWBbG57y9blP7rP330UK/exEiTnf0gIxPwVxLtyDv0KyiT07W08BfW3 60s8ZL08KS+vFogzu6XbawvcMuqU4+mQ9aFIj5I9LQDr3uNC1RhGtIB3GfZZZD8F 6pdnohO+EEa6ezZVDyKiwVxj7RMynIMXLgVmLSKHo+PIr95VmFk4owYaleMSy+Tl U8mEcHYa7lCChFQiENK7beWSEeZ9qwFwzDPi7prezfLiRsVr9LDwyt6fVG8rqZmg == 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 265DE10314; Mon, 18 Mar 2019 04:05:35 -0400 (EDT) Subject: FAILED: patch "[PATCH] drm: Reorder set_property_atomic to avoid returning with an" failed to apply to 4.20-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:25 +0100 Message-ID: <155289632592203@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.20-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) {