Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2201331rwb; Thu, 27 Jul 2023 03:53:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqIIeBHRIxQ7HVuClFD6q1mchLFJVfT1MBgj1RTPvhAsLsOAllaY/TZp0/TbVP3P6Zr3ba X-Received: by 2002:a17:906:25b:b0:99b:5862:1fc9 with SMTP id 27-20020a170906025b00b0099b58621fc9mr1877800ejl.46.1690455200005; Thu, 27 Jul 2023 03:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690455199; cv=none; d=google.com; s=arc-20160816; b=kD1iYH6gKk8f6XbRNxsRO7jUJZdGoFZYTnS2Y6WtstJldz2YFBt4GuMLUhzWdtHVyv FqyDUYnTYTF6H/0IIrunvzR5uxR+yp/xdZbDx6cwY+eKZ868AEbZRiw4VYMeS46jgSGX XnTJX8JPQ84JvhveBAj77siYsfoQjpqoMMNfDaZeDYhzxc0Bln6EeWL18O6rodvpE5aC T6dR81Y9iCB+R/k2S3GZ3nrGNbPlXXujdQBj9EDeWOsEVhBE+IRyuLG383rcQQjsqt35 oMjRQdUgcYuELcz7mjkJTvdEub50wiOKD9cqtShJu3VbM6cR8P8k3p68NJJOfktgs9/W aovQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=YujDTlbA4onXaGeSY1e5MHF7Pjo0PpSJxih3c5b9mq4=; fh=whUathxMK2ov4/lYxTS7E8N2MOVjxan3MYI0NeHiRC8=; b=JnCjYxlYrKZD32soYIzMOLUdZI94iIle805cq4LFXeUlFcdtfGA/nHlFSB1U+l1jkF dQDQ8tVefPon6ObiFIPVRAKS/K2/7crzBQyN86CPD9FTljgSxr1N8tVR/CvQqCMFgFX2 qag6uY6CKnEgxeOcdVsV1RUOhUEEpBuLel7ID4qzsITue6LdjCh38ta1tEC5MV8c47ob YCgyZGrXC1yxYpOhrFtxgUhDqQCQ9CPW/kjxPwKYLRaTlknuceS6fm7PgXpXHQzaErph C9QI6LIzbYiSE5pAZeTFaf1b5nMYMUU23BRff/8pd3MDpaOZc8EkEebtJ+w8GHSEbEhh zBdw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz21-20020a170906f2d500b00982a5377650si769172ejb.247.2023.07.27.03.52.55; Thu, 27 Jul 2023 03:53:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232844AbjG0J4s (ORCPT + 99 others); Thu, 27 Jul 2023 05:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232760AbjG0J4b (ORCPT ); Thu, 27 Jul 2023 05:56:31 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E0665116 for ; Thu, 27 Jul 2023 02:56:29 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8AxuepLP8Jku6oKAA--.16954S3; Thu, 27 Jul 2023 17:56:27 +0800 (CST) Received: from [10.20.42.43] (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx3yM9P8JkTeo8AA--.57606S3; Thu, 27 Jul 2023 17:56:23 +0800 (CST) Message-ID: <68a9a139-922b-93ae-0f4d-ee36b3610110@loongson.cn> Date: Thu, 27 Jul 2023 17:56:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2] drm/mediatek: Fix potential memory leak if vmap() fail To: AngeloGioacchino Del Regno , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , CK Hu , Thomas Zimmermann , Maxime Ripard Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Mergnat , loongson-kernel@lists.loongnix.cn References: <20230706134000.130098-1-suijingfeng@loongson.cn> <040c1db8-4ae1-2a6c-ff58-282ed938e565@collabora.com> Content-Language: en-US From: suijingfeng In-Reply-To: <040c1db8-4ae1-2a6c-ff58-282ed938e565@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8Bx3yM9P8JkTeo8AA--.57606S3 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj9xXoW7Gw1Dtr4xJFW7urW3Xr1UurX_yoW3JFb_K3 y0q34xurs5tF43Cr4ayasxAayFgFW8tFnrWw4kX3Z3Gwn0k398Xayqgws3XFyrGFnruFyj ga45JF9Yyry7XosvyTuYvTs0mTUanT9S1TB71UUUUbDqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbqxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6F4UJVW0owAaw2AFwI0_Jw0_GFyle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0c Ia020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_ WrylYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrw CYjI0SjxkI62AI1cAE67vIY487MxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48J MxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v26r1q6r43MI8I3I0E5I8CrVAFwI 0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y 0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1l IxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU0L0ePUUUU U== X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi, On 2023/7/27 17:22, AngeloGioacchino Del Regno wrote: > Il 06/07/23 15:40, Sui Jingfeng ha scritto: >> Also return -ENOMEM if such a failure happens, the implement should take >> responsibility for the error handling. >> >> Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap >> function") >> Reviewed-by: Matthias Brugger >> Reviewed-by: Alexandre Mergnat >> Signed-off-by: Sui Jingfeng > > Reviewed-by: AngeloGioacchino Del Regno > Yeah! I got so many R-B! So surprise, So happy! Hopefully someone will merge/apply this patch someday, thanks.