Received: by 10.213.65.68 with SMTP id h4csp445016imn; Wed, 4 Apr 2018 00:59:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+UaBrm6r918qPaEmSbHZywQ9E74GFI2GHBJegHig9DP2B7Q6xKWle2gw2K5u9Ys+7mAnlV X-Received: by 10.98.133.212 with SMTP id m81mr13122679pfk.61.1522828740802; Wed, 04 Apr 2018 00:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522828740; cv=none; d=google.com; s=arc-20160816; b=eKPu1wA12apNDKqs9m9tvII6einbV+XFAMRu7+zbutkeCl8JfTPoOHS8b9mdJ2YO+u UqCi1Qjj/m76u9iXC3JARFSKDStfm2RxJKXbDolRtYjv8MipZqhm8LnOaV9sGTwFCXR1 RyrZEL7QYBE9sd4fAkPjB0Ee/a7u5f672FKKRhuPwZB5FmbFDGnprGJVASfWzcmbyjTz qAfqXa9OlBZaWHh43iMKZMDa5niHbDZZVPfAjmWyNzUv2BFHToap3fkiI9UJqasiF2gd /HcupNI0sr22wexZ4hrypcIMwrszYvD+rwy38o/B0owl+Ul4yKTUn7hYL1+xYfHMz26a Zyzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:arc-authentication-results; bh=q73g/x2eVgdOXdXtfjEBBp6ZLgPLYsdJKuOf3jz5MnM=; b=nMGdcKk5QxnbBZ9J700LtCfhiP9oVgKzw/iiieEw8C8nIzt+SMOrfe7xb76Y00iTEX tP49/pujvjtt+fBu4q5g9pFblHCN/ZLbGZ59R7TOvBvzUq+e6Bt+WPxntTRRcnosekjD euX9lx8hxCSKOIYGI0zsXGGEi+7EQ9DUIX89MK2KVMiM0viivAanEFztkwc0MfP9MJtg CMPXqnPozYCdVAUCumc+0kkMB/QwSGRw4XyiEbwoX+dxp+8mn7FVLPk8NN+kNbmnMOSA rm7tW37iN/WGCAhQsBtJIi7c296fYJW9AcN7K4T7WQO9E4ROW9QdR6TEGvlbBbNWyenn b3rQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1-v6si2495612plb.101.2018.04.04.00.58.46; Wed, 04 Apr 2018 00:59:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284AbeDDH5O convert rfc822-to-8bit (ORCPT + 99 others); Wed, 4 Apr 2018 03:57:14 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:49209 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750908AbeDDH5N (ORCPT ); Wed, 4 Apr 2018 03:57:13 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 11253624-1500050 for multiple; Wed, 04 Apr 2018 08:56:16 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Xidong Wang , "Jani Nikula" , "Joonas Lahtinen" , "Rodrigo Vivi" , "David Airlie" From: Chris Wilson In-Reply-To: <1522827474-5120-1-git-send-email-wangxidong_97@163.com> Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Xidong Wang" References: <1522827474-5120-1-git-send-email-wangxidong_97@163.com> Message-ID: <152282857443.25182.14236056855796176035@mail.alporthouse.com> User-Agent: alot/0.3.6 Subject: Re: [PATCH 1/1] drm/i915: Do not use kfree() to free kmem_cache_alloc() return value Date: Wed, 04 Apr 2018 08:56:14 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Xidong Wang (2018-04-04 08:37:54) > In eb_lookup_vmas(), the return value of kmem_cache_alloc() is freed > with kfree(). I think the expected paired function is kmem_cahce_free(). > > Signed-off-by: Xidong Wang That is indeed what it should be doing, Fixes: d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr") Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.14+ Reviewed-by: Chris Wilson -Chris