Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2046072rwl; Fri, 6 Jan 2023 00:51:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXvXrCZ9Ag5SrxGbyJvShMw0VHPNdMKV/8WV/V6gpTePojxusJXpu+MyyGa+Oybfl5XVnikx X-Received: by 2002:a17:906:b041:b0:7c1:22a6:818e with SMTP id bj1-20020a170906b04100b007c122a6818emr46889978ejb.24.1672995073521; Fri, 06 Jan 2023 00:51:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672995073; cv=none; d=google.com; s=arc-20160816; b=m1U2rCJmtkHCulFTXZ8VNddxaQjXOGVuGuJzZUEpAk2Jgq0088nFD1Y0iBDQA6DhtH DuMHHxvl7G4NfmWe37ZV0HVQTvxoyy67SDLmqyXx1Rjf06LU7rN3JGoGrJyieFK6YKNK zXdGignC+Ln/fd9IgWIfGXAjFwnENPWzsmD4BpS+fTk0zJnDewASNgd+PogcLOpKGBjj ztvFZCr6HKAgolHDrzw6WZlcAEkGdRwz8mvp4y+KlbXDIt0yIWmb0WvQBZvbE4EogFvs M4NyZpnrV7bv64IEdime3ucueQ8ogGI1K13g+OKlxepeCnyeIj4o9ZrkImYiEvlaXVlT oRgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Oyf8/xdGIeyv+pywCJ7PHhoImivmp2P3M0qiI+bO/c0=; b=yLHfVUkgmcumZdJfnFIUPl5YuF/cspo1KXhhd3iviU05GR9D/bPfOQ4cyN6F2UK7uS tVN73V0iNBjDs4NA5uLxLng1cdNAyMomYxraLBDv3Zb/GhGonxn0s1q5pVG6DNtLIJ5F 84dqpSLyc4IIIhGa6K7Cmufix8MqfgsY5kStFOQQOtH+cAC+VbgS1V6NuvLY2bEuQTw9 RbErFKyg9O+kaJMAiTUfYgyf9xvFkO0nc7Qw2d8SXKB0xJM5RFtdl0LkHvXRSKzOTb1w hdyTt32gB6rbzSS7VIdq/+H5k/BGTLO2fG8jeA5pbXDhi01yTGkKDdWF9Jd/a+/SPTIa BmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bKGQNv8u; 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 j26-20020a170906255a00b00780af308970si562324ejb.185.2023.01.06.00.51.00; Fri, 06 Jan 2023 00:51:13 -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=@linaro.org header.s=google header.b=bKGQNv8u; 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 S231536AbjAFIJM (ORCPT + 54 others); Fri, 6 Jan 2023 03:09:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231420AbjAFIJK (ORCPT ); Fri, 6 Jan 2023 03:09:10 -0500 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E33078E87 for ; Fri, 6 Jan 2023 00:09:08 -0800 (PST) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-482363a1232so13385157b3.3 for ; Fri, 06 Jan 2023 00:09:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Oyf8/xdGIeyv+pywCJ7PHhoImivmp2P3M0qiI+bO/c0=; b=bKGQNv8uXrlgWUEXeM3i3nMbH++VCHo5Yd2FIZluObPRD9Ni8ZAV5+Rsoj6oUrunux XqkRD57gxFntIkgC6ON5sAmTV6SsUhL4LnjDSvm7OynSk0wYYRv0lYIAA5hvdaDLkNDm gbPYNbfbsHYnQVp89GzllLyunTyen147ZckzV03lYPlvUbWzd/IMG3WtxVhrIztaC1at 8pByiUA4KnBXJednw62cSq5dBytKmZgxy1pm2K4dhwhXBQTSmCd2cRG9/SwCwEdly2Jf 2wi9KSpffb3Kr/v9ydbdEcaJwaBpYIGum2+0u+8ZyUtmyZF2SUXX6YwJAEb7jr/rtBw8 EGgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Oyf8/xdGIeyv+pywCJ7PHhoImivmp2P3M0qiI+bO/c0=; b=d1aL9UJpk+ccSo+OnIOXMHnFCyf8bNxlPB1r8FrECjgzgCaoBqH9iyP1ASUrf1FHpE SSP9IsDwAPKdD/k1SWuqxTkNsAuUH3Bl/B2kuHTPjmOW2pXxCxPGxm0oNUX+i1EB2cmv 8J51b8wJ9GqGHykWXeUXMFB9zZVlqGfnH09rj6pYbKKG4UXDoKznAsVI0SuBAruV5TjW 6awgod+cI3V3pgeikKE9eAPwBClHPGUC58vEGevgIgh8efrXyrldMUK68kgu+UNJpyb3 xO9HReVKclKZ1sYpegF0PGX8wEhsWO+d8M9g089o7Dik/eh0DshNQYICwKDTIKwYtkVC c7Jw== X-Gm-Message-State: AFqh2krd1FpCMbC83Jmaqruh/t/6ftge8F0PPKrEBF3JiC1fl4g0HUkd lZ84hdWEea+aYBNPuV8CYFdf1u2Bk3sLE0f1mnWoWQ== X-Received: by 2002:a81:1e88:0:b0:432:2458:f6ca with SMTP id e130-20020a811e88000000b004322458f6camr7411794ywe.138.1672992547775; Fri, 06 Jan 2023 00:09:07 -0800 (PST) MIME-Version: 1.0 References: <20230106013824.27208-1-jiasheng@iscas.ac.cn> In-Reply-To: <20230106013824.27208-1-jiasheng@iscas.ac.cn> From: Dmitry Baryshkov Date: Fri, 6 Jan 2023 10:08:56 +0200 Message-ID: Subject: Re: [PATCH] drm/msm: Add missing check and destroy for alloc_ordered_workqueue To: Jiasheng Jiang Cc: robdclark@gmail.com, quic_abhinavk@quicinc.com, sean@poorly.run, airlied@gmail.com, sumit.semwal@linaro.org, christian.koenig@amd.com, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On Fri, 6 Jan 2023 at 03:38, Jiasheng Jiang wrote: > > Add check for the return value of alloc_ordered_workqueue as it may return > NULL pointer. > Moreover, use the destroy_workqueue in the later fails in order to avoid > memory leak. > > Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") > Signed-off-by: Jiasheng Jiang Please resend the patch, including freedreno@ to the cc list. > --- > drivers/gpu/drm/msm/msm_drv.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) -- With best wishes Dmitry