Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2147348rwb; Thu, 27 Jul 2023 02:53:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlGfZjx/vB1MsQ61KNuqZcYQRnw1yC8MkVyZuLqlw33VcJfmu/eq/1Y058c7tRuZRly3zkt8 X-Received: by 2002:a05:6a21:a106:b0:134:2b46:797f with SMTP id aq6-20020a056a21a10600b001342b46797fmr5206267pzc.18.1690451607443; Thu, 27 Jul 2023 02:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690451607; cv=none; d=google.com; s=arc-20160816; b=f9YsXT0FrLyim3VmhLQRVoNjsunMJNoS7rPBd44YPQCYv89/lIhD1G6+gUQztosyqy NJr9fcZ7QcWLYQ+Cj5kjeUm9pjqTi1jFSO+McSnKqWoRTo8lbx0cmY2CZEDdzmhQUlbp yacF4pzgss0yQ9K/3gBZE4nmPhbiVsfxRRRyapJnXIjtc440z8jiRUtdJoYzNkbmYT+P W5lmpNCZkhpG3GUitElH8Oq4Sxw5Pjp0K71Ixlc+PB98dpWBxSvYAV1Hvz5gv/gZ+BLR GcwswNwKDkfMhQR39cTkwWpmmB/8Ijp94bkQQnFnHKbTWUt/lb/+qROcexz1BwGC/ej3 36tg== 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:dkim-signature; bh=cYSIFxWX6nXTZD0nQyfr5C81PpvoMsUkzUvTRYWGOz0=; fh=Mh3WCwxIrcBaOEpiSA2aGEju0ynLL2Gf62q1cjD55OM=; b=kq/KbKUDU4ynC5ot/u03MHTMB8C9o/qDCVpM7erpfc2Yb/zWpQL1iXqwn2NUM4VfMf UPTb17gjGWTu3YnzfU/oA6udg0dnBSx/LWsNmJcBKsH5m983Fkyd8pKeBPJ1H5HC41dz dpPpX86gniT+mKV93hdwQcV6RA/2YCt0oh9B0LeSC20US3sFPqYtkyUCHUp4HU6XMNRy shD7zrZnybph3XEvy3Mn17MujzWkl34XrgttmZj4Ka60nEA5UIhlM3HYTSWp3xirdKII +IeBRPsVhexgu1vUjhGBa35jQ7v6UkeiO4DOuRz9SDk8HzL1eEnihiReBUNBNL6k6yvi CPQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UeHMww9W; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a056a000c8400b00681ad13f7cbsi1177784pfv.121.2023.07.27.02.53.15; Thu, 27 Jul 2023 02:53:27 -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=@collabora.com header.s=mail header.b=UeHMww9W; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234529AbjG0JcF (ORCPT + 99 others); Thu, 27 Jul 2023 05:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233893AbjG0Jbh (ORCPT ); Thu, 27 Jul 2023 05:31:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A27F10CB for ; Thu, 27 Jul 2023 02:22:44 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id DDFCB660702D; Thu, 27 Jul 2023 10:22:42 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1690449763; bh=S/wbNwp3nrSfYIJnj3igDnsaM+YXoYwXtjo1HiG2GSY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=UeHMww9WHVwfwzRWImHwPNMGzQT6w3uY4WUBl3itguPwaAsQyhCIkLVcsr6LNGUCM cq1yGASbKjo2bYM1LiERIssfgP8hq3Rnkk9eN+PkkH1jF+4uzTtwRcJhFvzPq/XI73 68Ht18QlmtjF18Y9oFcW+6fnDtO2Qcb2N4IskV8NPybKToDPUa7xmZgmjkm9+AAbTP MP8lSR8AZnXzoMJ+ZbehchOXAn6ILdIo2KQN+XJCU8pT2F4ju7WbJd6dOeqifmBUvD KvZDPQldI8hpv+rgj4FjSui5VWU82WzqMP+tDhn1Pc5mFERcn5wTnHgKyr4dLyVKG1 mZNkCK0gzT56Q== Message-ID: <040c1db8-4ae1-2a6c-ff58-282ed938e565@collabora.com> Date: Thu, 27 Jul 2023 11:22:40 +0200 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: Sui Jingfeng , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , CK Hu Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Mergnat References: <20230706134000.130098-1-suijingfeng@loongson.cn> Content-Language: en-US From: AngeloGioacchino Del Regno In-Reply-To: <20230706134000.130098-1-suijingfeng@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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