From patchwork Mon Mar 6 10:07:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 6153 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1760079wrd; Mon, 6 Mar 2023 02:23:42 -0800 (PST) X-Google-Smtp-Source: AK7set8FT7MF0o0CzJOww87pQKmlQ59uUZ8SJZPFPoZmmbUaELKxAn2/s8LBfWaJZlV23d+PKWze X-Received: by 2002:a17:906:4cda:b0:870:58ae:842e with SMTP id q26-20020a1709064cda00b0087058ae842emr11432596ejt.24.1678098222040; Mon, 06 Mar 2023 02:23:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678098222; cv=none; d=google.com; s=arc-20160816; b=EXzGv5x4h8l/awFOVb8DyRE9xRKAkeM3X0qYhQn9uJvUF6XyJA0oLWsa+zL0Rp7k03 jSF7BdogySp3PGK+TUNe18Z6ChyATfWCOwTqVcJP2bcUQMmGY45WiGzPnP/Z17B6wW0P 8/wo30g/cxdAk1u2Sv3Tbi5lTIIyLWqUne4403ZQYDjU9UHWTkMK3hiYU7swuV/fnTwh cbD+3vplPjhZBAEXphN8xsYTWjLt04e0f3/S+jgQkGkCLh+MwGdBQncbXxKMjSLZQBK6 UH9V2HIwtJ+3QCspFpi5UJdy4XgO2bE1EftyQLE46HQRofe5oLk/u1zHgvyqJAgGn4yj 33ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pcnRg2hmXOUVHJYMcOCYDP2TRMTD/DJN+gia8L3VZ3Q=; b=VCMJSTkjQ2EPYJdZyffSMopp/pyNxJDDd3XUBRoDUJpR68aVOfZlQU3k3bmgA14WnD BJPt/fmtERwj5qEX2SQi6YmxlIMs0YcENtoL0iRaIV/uc97nT7p/XeHYOFgtZiKYzFaf QCyJYSFm2odwL6L09c/IhFlNOC5gdlJABQe7ayIFYfw1WAWNBEENwZxb5fXL+eGDHBIH KN9N8A6jZGqGxHTLJDGLF+sdYw9Mj3stzVRGsSgDFl7XsH1+BO+e04FPSkx69ibb/3h8 1V2bKpdOXDKMvoWqIz1sanvZBgTa2HPaDrLBUs5Ek5Kz2MssvtOx8oN2zIzJUVbXiISM a8oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rt0Rn6T3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mj8-20020a170906af8800b008b223acdc5esi5589746ejb.226.2023.03.06.02.23.18; Mon, 06 Mar 2023 02:23:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rt0Rn6T3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230386AbjCFKJo (ORCPT + 99 others); Mon, 6 Mar 2023 05:09:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbjCFKJX (ORCPT ); Mon, 6 Mar 2023 05:09:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FE21222EF; Mon, 6 Mar 2023 02:09:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CC88FB80D1F; Mon, 6 Mar 2023 10:09:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 864EAC4339E; Mon, 6 Mar 2023 10:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678097358; bh=rgz7DkiR3NGSdYC6VIDyJIROjaHJdAcLrZHovIKQqTY=; h=From:To:Cc:Subject:Date:From; b=rt0Rn6T3lEfqba/Z5G+GS52LAph5WQwapMERJL+R1JUS7rpu7cd5CAr+ebFzIQbAE c/LoQffAl8hgg1QxEPWeVyefKugN4sPCm2Zw+MNdySXEXaIOyNa3RxQJ6nI0/7FFd0 Inbw+1NarVhguGtegVLtK3JhG5pkOyCuxa9LcsjUpujzRmMyOhS4hNodFtAWAkJF9l XJxI4QPpAa+9jP2V/8Hv6Y1hHlyvAcvRz8RVnuCEEi6y31AOiwLRpUt0/eILMF/838 pF19Hfx5ScWRpvIG6EJ+Vl1qf9dvvAhNGEnl7TgzGQTZ9BxnSLlLYJDsDfN/jy6HHV DS3dcArX4gpzQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pZ7n4-0007QY-TO; Mon, 06 Mar 2023 11:09:58 +0100 From: Johan Hovold To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov Cc: Sean Paul , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 00/10] drm/msm: fix bind error handling Date: Mon, 6 Mar 2023 11:07:12 +0100 Message-Id: <20230306100722.28485-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759613521278508966?= X-GMAIL-MSGID: =?utf-8?q?1759613521278508966?= I had reasons to look closer at the MSM DRM driver error handling and realised that it had suffered from a fair amount of bit rot over the years. Unfortunately, I started fixing this in my 6.2 branch and failed to notice two partial and, as it turned out, broken attempts to address this that are now in 6.3-rc1. Instead of trying to salvage this incrementally, I'm reverting the two broken commits so that clean and backportable fixes can be added in their place. Included are also two related cleanups. Johan Johan Hovold (10): Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue" Revert "drm/msm: Fix failure paths in msm_drm_init()" drm/msm: fix NULL-deref on snapshot tear down drm/msm: fix NULL-deref on irq uninstall drm/msm: fix drm device leak on bind errors drm/msm: fix vram leak on bind errors drm/msm: fix missing wq allocation error handling drm/msm: fix workqueue leak on bind errors drm/msm: use drmm_mode_config_init() drm/msm: move include directive drivers/gpu/drm/msm/disp/msm_disp_snapshot.c | 3 - drivers/gpu/drm/msm/msm_drv.c | 67 +++++++++++++------- 2 files changed, 44 insertions(+), 26 deletions(-)