From patchwork Sat Jun 7 03:02:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_Mart=C3=ADnez?= X-Patchwork-Id: 4315041 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E57D49F26E for ; Sat, 7 Jun 2014 03:01:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CE8B20219 for ; Sat, 7 Jun 2014 03:01:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06D50201F7 for ; Sat, 7 Jun 2014 03:01:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752633AbaFGDBu (ORCPT ); Fri, 6 Jun 2014 23:01:50 -0400 Received: from mail-vc0-f170.google.com ([209.85.220.170]:52448 "EHLO mail-vc0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752615AbaFGDBt (ORCPT ); Fri, 6 Jun 2014 23:01:49 -0400 Received: by mail-vc0-f170.google.com with SMTP id lc6so4118665vcb.1 for ; Fri, 06 Jun 2014 20:01:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=UDyIPOGUXwxN4GTmr5N1mRVVVypDLRoy+fDUoPFNiUw=; b=my5+sgedHCmNLBgY66fTutqQnWnNbUhMFnEkeYJZhAH/Aw7wYDjnfTv7rSyNEwn+Qe LKDnwUuW9V8WzxYfeu5JopK9AIi+rd0rQd2IBRyAU6aom5YNTjj8AST6Jxa/stJhk0fv iYPXCwuMg1EQqm9PMOzDDVAKyOJe7WaXxY5Ytk/ByUo/Ht6eG+pq6BM3BhJTDi/tygqQ jG6afAsqLVVAQ4NgpWsG69x6XnfX1CX0CPaTLq9XJNhSNzD0RFwfUp4GvZFa+PVyo4pf oJs9NCc4rxnszrNw0sRKt91H0Qz9OfHL1pG7xTaR0qF40HIk0VLQRWGRRgDJhkTmZkUS HPzw== X-Gm-Message-State: ALoCoQnkT4jC7IIYkIbxb1Y/HlmCmSt++I1chbPmTpUGWro9xvFvr2nNLe5Xk1xMeQHoMoWwLEWs X-Received: by 10.220.137.145 with SMTP id w17mr8186975vct.47.1402110108760; Fri, 06 Jun 2014 20:01:48 -0700 (PDT) Received: from localhost (host18.190-30-94.telecom.net.ar. [190.30.94.18]) by mx.google.com with ESMTPSA id av3sm21263733vdd.6.2014.06.06.20.01.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2014 20:01:45 -0700 (PDT) From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= To: dri-devel@lists.freedesktop.org, linux-arm-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= , David Airlie , Russell King , Rob Clark , Tony Lindgren , Daniel Mack , =?UTF-8?q?Guido=20Mart=C3=ADnez?= , stable@vger.kernel.org Subject: [PATCH 5/9] drm/tilcdc: panel: fix leak when unloading the module Date: Sat, 7 Jun 2014 00:02:04 -0300 Message-Id: <1402110128-30471-6-git-send-email-guido@vanguardiasur.com.ar> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar> References: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The driver did not unregister the allocated framebuffer, which caused memory leaks (and memory manager WARNs) when unloading. Also, the framebuffer device under /dev still existed after unloading. Add a call to drm_fbdev_cma_fini when unloading the module to prevent both issues. Signed-off-by: Guido Martínez Cc: stable@vger.kernel.org --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 171a820..de34657 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -122,6 +122,7 @@ static int tilcdc_unload(struct drm_device *dev) struct tilcdc_drm_private *priv = dev->dev_private; struct tilcdc_module *mod, *cur; + drm_fbdev_cma_fini(priv->fbdev); drm_kms_helper_poll_fini(dev); drm_mode_config_cleanup(dev); drm_vblank_cleanup(dev);