From patchwork Sat Jun 15 08:53:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: majianpeng X-Patchwork-Id: 2726661 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8AC13C0AB1 for ; Sat, 15 Jun 2013 13:14:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EC4B20189 for ; Sat, 15 Jun 2013 13:14:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6A79E20181 for ; Sat, 15 Jun 2013 13:14:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B2A5E5CF7 for ; Sat, 15 Jun 2013 06:14:04 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by gabe.freedesktop.org (Postfix) with ESMTP id AE691E5D1C for ; Sat, 15 Jun 2013 01:53:20 -0700 (PDT) Received: by mail-pb0-f50.google.com with SMTP id wz7so1277235pbc.37 for ; Sat, 15 Jun 2013 01:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=7dBhNmeDhQfieI4td/1WKpAysfiB9N6U3yy7Sh1+cWI=; b=rc0WlrpiZWVXotFSJZ4ZO6dzuuQI0TAHO70j6tNFu9qHYiLsG+FvHm4wGM6if5DtMI 55W2E5vZTgpa2E9FpG7Kt/qJ4msfiWrbX+avvjY7gEZAOIN7QiN23zid3jVyU21b7VxO TgR5f21rYIcaVvBmD4XrQIprDG76ZwuK/+TQjHA+dINhkUoNp6/4Zv3ODfmUchtKKxA6 pLDlv8R0Jrmp+YzFEZo1S0KXBoVRJW+p29bZPpck7h50BVeYjVJRtPJLx6NTm9K10QVB GDb3OJuxVyjPgP0ONmrkDr3AHB3Ls96aohUXlNeAqJahn2e5d58myHzYNieJUHkZ3+ow XhiQ== X-Received: by 10.66.226.233 with SMTP id rv9mr5705743pac.155.1371286400763; Sat, 15 Jun 2013 01:53:20 -0700 (PDT) Received: from [192.168.0.102] ([112.65.211.118]) by mx.google.com with ESMTPSA id vu5sm5882872pab.10.2013.06.15.01.53.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Jun 2013 01:53:19 -0700 (PDT) Message-ID: <51BC2B7A.5030009@gmail.com> Date: Sat, 15 Jun 2013 16:53:14 +0800 From: majianpeng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: airlied@linux.ie Subject: [PATCH] drm/nouveau: fix a memory leak. X-Mailman-Approved-At: Sat, 15 Jun 2013 06:05:24 -0700 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When cleanup extra stat if this object was a notifier,it should free the notifier. Signed-off-by: Jianpeng Ma --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 1c4c6c9..b5252ff 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -483,8 +483,7 @@ nouveau_abi16_ioctl_gpuobj_free(ABI16_IOCTL_ARGS) /* cleanup extra state if this object was a notifier */ list_for_each_entry(ntfy, &chan->notifiers, head) { if (ntfy->handle == fini->handle) { - nouveau_mm_free(&chan->heap, &ntfy->node); - list_del(&ntfy->head); + nouveau_abi16_ntfy_fini(chan, ntfy); break; } }