Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4321769rwl; Tue, 28 Mar 2023 05:51:42 -0700 (PDT) X-Google-Smtp-Source: AKy350bi/U1A74lyJZhaCzTshs9QlS1gEI67p8cnceEJ7K9Kna3H3+meog01dRY/8WrtTwm9No8q X-Received: by 2002:aa7:8f37:0:b0:5a8:4861:af7d with SMTP id y23-20020aa78f37000000b005a84861af7dmr16040611pfr.20.1680007901830; Tue, 28 Mar 2023 05:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680007901; cv=none; d=google.com; s=arc-20160816; b=H2qhzq8MXy1gq3AaQM/UxJM+4OvuwOgiVc27f80FId6/DzF6eEVlFfQuutOv4b8t5v HPXDFlbfjQjoI6j+gskY4nX7XLaXVGbciQ8Zpmlj1PKjhyFG7JAx/dBNmzPsOKXPptUX bS07YQxqmd3W6BIkmrYtaey0l/1R/MsPTDYOTxoZ8pn9Pnvd1kGbe/BiYmZ/4fFLuSKx fIJRFLe2SfyLyc+2m+JwAutd1ni4OU+CZHT0E8DsvzE+tqBtHe1wgtJiP7wuOQRUdhv2 kkpfnNmVKjp0+fJ5e0fbw1KxMe9gOy9BHBJgzvAebInA/RJn+ZwdtxF3YKesmuW3aTu/ kM+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jCNbxQ3fkGvJYs2TX33NcPDCODW7FsfSszu815y/rdQ=; b=N0HgYQO63BPSsqeskxg1o4hhp3WlsYdxwFt9yE6fq9C15UpYRQMcffRYAjSPJ0UprI e3HZnIi1TrCZBReaGGH7f+z07yw6HInkesKCsFxPk26AZ1ucz4Meh/4KOMgcr+oMgHiv iKMxdYHI3zqDmQEHE632RMDuj5DUY6tN9Q/K5F2LPcHKM5OIUmLgouTTnO8NJ/17FaHV uWNYWBoeLC4mNCOmLjwckwiy0/WkkuMA2T4UXRxvw0Yf93yruAZyGxmRim1JpwzotfqY AUG81cuv9kC6SMJjWCzIASfeT7qPs9kB726bM2L5GvTJ0Num3GDT3EwbgGXhcrQ6zu3S 0ORg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MCBz/LZ9"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w197-20020a6282ce000000b006233c7e887csi29515535pfd.148.2023.03.28.05.51.30; Tue, 28 Mar 2023 05:51:41 -0700 (PDT) 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=@linaro.org header.s=google header.b="MCBz/LZ9"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232920AbjC1Muo (ORCPT + 99 others); Tue, 28 Mar 2023 08:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232636AbjC1MuU (ORCPT ); Tue, 28 Mar 2023 08:50:20 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CD2B762 for ; Tue, 28 Mar 2023 05:49:53 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id x17so15682029lfu.5 for ; Tue, 28 Mar 2023 05:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680007790; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jCNbxQ3fkGvJYs2TX33NcPDCODW7FsfSszu815y/rdQ=; b=MCBz/LZ9QWIqZkNLClNZpldMscplkOY6KzPqm1ilp2RwTVfmV6UEQ0JKtFLu8PoQjq 3ZurKAErQhtWYyGO5BwuIEOAqgRh+dg2Oncy2FVTzp/93sEFFH55Erv73ZqM1KV/CRau fl7jjJbxJMce9RuRypNxCc9n3SpiU7UhV6WJZoV2T+74raMrrfeVr/6V3IhC64sdjQPi CO8L8Z7JVDaY8fsyals5wdV2tMO8HswrTlL8cANPYAtmuGW3WIkqtUy23LgjITyVtjQ0 /clW442b3UHROWdk249Xem0GB/81P6RiyUuhKape9EPSV//F5XCz5zVST5krR/5rUpRW ILDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680007790; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jCNbxQ3fkGvJYs2TX33NcPDCODW7FsfSszu815y/rdQ=; b=e3JqQwXZPxShDGdCVf8oeMcFFq/Jyn0TxlLdJZACnB2iyyYJqqiRNk+GpLo3WN+c5L +BcLM4LENCMC6dyp60s3TCzDkXLcjIUTz8SfzrJlAWOvzAtAL+mzoPTHhGrPBwIN+20o +51kWLgj8qG0hhA0e4jRUjdr7i1s7czMDU8OEV0q2laJtmPO0deTHx7JNtmPA7L0L6HD 8yyOCF5pRHsxikPoXNWY+5chSCnAI2kjDvwpsPInzzv2k0BSnX8w0HvYy9+RUeDmo86Q /NISe56XxW2fx84td4p3hRkOJY8ufn4c/42WzQidmbyOhwQTVPg/hhkgi2fZKlYMu6m8 2dkw== X-Gm-Message-State: AAQBX9ckq8rcaJCErWB+7okqTxkjdbhDIpSVsOogYAHbqsL11qyyAdj7 8lBsdCfl+/5otMlfU8fT7O/j8g== X-Received: by 2002:a19:7404:0:b0:4e8:3f38:7d21 with SMTP id v4-20020a197404000000b004e83f387d21mr4456398lfe.28.1680007790309; Tue, 28 Mar 2023 05:49:50 -0700 (PDT) Received: from ?IPV6:2001:14ba:a085:4d00::8a5? (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id w7-20020ac24427000000b004db4f2f08f7sm5062556lfl.28.2023.03.28.05.49.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Mar 2023 05:49:49 -0700 (PDT) Message-ID: <42ce6819-8a56-83ab-13c9-f49b3167b42e@linaro.org> Date: Tue, 28 Mar 2023 15:49:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 01/10] Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue" Content-Language: en-GB To: Johan Hovold , Rob Clark , Abhinav Kumar 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, Jiasheng Jiang References: <20230306100722.28485-1-johan+linaro@kernel.org> <20230306100722.28485-2-johan+linaro@kernel.org> From: Dmitry Baryshkov In-Reply-To: <20230306100722.28485-2-johan+linaro@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On 06/03/2023 12:07, Johan Hovold wrote: > This reverts commit 643b7d0869cc7f1f7a5ac7ca6bd25d88f54e31d0. > > A recent patch that tried to fix up the msm_drm_init() paths with > respect to the workqueue but only ended up making things worse: > > First, the newly added calls to msm_drm_uninit() on early errors would > trigger NULL-pointer dereferences, for example, as the kms pointer would > not have been initialised. (Note that these paths were also modified by > a second broken error handling patch which in effect cancelled out this > part when merged.) > > Second, the newly added allocation sanity check would still leak the > previously allocated drm device. > > Instead of trying to salvage what was badly broken (and clearly not > tested), let's revert the bad commit so that clean and backportable > fixes can be added in its place. > > Fixes: 643b7d0869cc ("drm/msm: Add missing check and destroy for alloc_ordered_workqueue") > Cc: Jiasheng Jiang > Signed-off-by: Johan Hovold > --- > drivers/gpu/drm/msm/msm_drv.c | 2 -- > 1 file changed, 2 deletions(-) > Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry