Received: by 10.213.65.68 with SMTP id h4csp119897imn; Mon, 12 Mar 2018 08:33:27 -0700 (PDT) X-Google-Smtp-Source: AG47ELvxOBvcZUkQHPFKEhfqG+eu94brngg9jbJpljNoshoaB9ssm1XBUhwRvpigQ6FFkCvhnRWL X-Received: by 10.101.83.65 with SMTP id w1mr7077480pgr.313.1520868807358; Mon, 12 Mar 2018 08:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520868807; cv=none; d=google.com; s=arc-20160816; b=MY3VCYhOB8Nt7etsVFoUz3CDR5WZBXH0Y6OHixPllimv/AT7mq+SMn33/oSuPRNWBG 3eWuf8p53IRoGVA8z+O333ZNTXUD0m10rqNLEfyIKZ5TZTUtCNwnkt6lOsHteHq8ejgS ZWGEJsAgTG1lGOliHzIcb3Qf/sfLrPnLCQBNC28JDCr93VOsjESEFXsjstTkINbpTysj O14Wzp1Fc8Q8TmmoDRxP4SB7XF4x0DEv+EDtp18Xyh7d+jRadO/5fjS8ENUYZhiNrS78 R/Ro8+LUQGRFhKpGCNmJA89Qg9yVBA+4skjMSP0ibHLdIy0n5MmhXUcvvGVWYdAmu6zo h+0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:mime-version:in-reply-to:user-agent :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=G3tiIrjtDxaH5MsJAyUC6nIQRNW69qAC3O4deQyAKVM=; b=lbxk4GnZ2WJegBBbdT33lhvZxjpyPqS7c0O3tduX2VjK7znTMNWR3WUqT07NOdvMjY lbO86id6qcmBpZjtiUm625iRymuIQLKcD2kACUjpIuenYokfT43VK33qE1gtsSFmMi09 cOM3tp88Q/eKLZkSdD4eibNy2pZPtp+tYj6Rr5ZLDWYkEU+4Zj4vPRIXTpJqWIibD29I CrBRgR5pqMy41Afl0rX8Hb5KnAgUpYcEbMXJ5TPniPgvBa1Es7FLhp1W8c2eoZRMserP 18UUlFKKkjq6vzMwCmKcfCVBuPa9Mfbcr8PyIZ9BpeyRvrv45h/IVJEfuebScbaiHe5z 1f2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZFUNq29y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79si5144386pga.647.2018.03.12.08.33.13; Mon, 12 Mar 2018 08:33:27 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZFUNq29y; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbeCLPbn (ORCPT + 99 others); Mon, 12 Mar 2018 11:31:43 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:41398 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458AbeCLPb2 (ORCPT ); Mon, 12 Mar 2018 11:31:28 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180312153127epoutp025f6ad929b965e0f7881d038b905eb8e5~bNgNTvmid1789917899epoutp028; Mon, 12 Mar 2018 15:31:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180312153127epoutp025f6ad929b965e0f7881d038b905eb8e5~bNgNTvmid1789917899epoutp028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520868687; bh=G3tiIrjtDxaH5MsJAyUC6nIQRNW69qAC3O4deQyAKVM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ZFUNq29yvIzfPDqN1Ifa9MXK+3rr9eWxsJDGgAYAefu9Vv2R5R25caMTte+uJp1fU KSk7/yr8ak3UxfYt4lLK/94t5KVxDL139ijB41xUgx6jJtKeLBlNDBVCp9ylnKiBxT pvWGqd2JRdjl87j3OUYhFg8SJ2occwS59c4hlFw8= Received: from epsmges1p4.samsung.com (unknown [182.195.42.56]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20180312153126epcas1p4da5dd86dba82d8e39c26f8f72935c2d6~bNgMdO2dP2350223502epcas1p4T; Mon, 12 Mar 2018 15:31:26 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.50.04180.E4D96AA5; Tue, 13 Mar 2018 00:31:26 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180312153125epcas1p2e57298cac2b9c7ddba463e8ab31b43f8~bNgMS6rcg1268012680epcas1p27; Mon, 12 Mar 2018 15:31:25 +0000 (GMT) X-AuditID: b6c32a38-adbff70000001054-c2-5aa69d4e2bd8 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 02.2C.03826.D4D96AA5; Tue, 13 Mar 2018 00:31:25 +0900 (KST) Received: from amdc3058.localnet ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5H00IUBHSCXZ90@mmp2.samsung.com>; Tue, 13 Mar 2018 00:31:25 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Mathieu Malaterre Cc: Rob Herring , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] video: offb: Deallocate the color map Date: Mon, 12 Mar 2018 16:31:23 +0100 Message-id: <2500950.WnLxRKliRb@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <20180213180747.12666-1-malat@debian.org> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset="us-ascii" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsWy7bCmrq7f3GVRBhc+clhc+fqezeJE3wdW i8u75rBZnN30lsXi/54d7A6sHr/a5jJ7bFrVyeZxv/s4k8fnTXIBLFFcNimpOZllqUX6dglc GUcaDjEWPBKp2PR8LlMD426BLkZODgkBE4lZX1YydzFycQgJ7GCUWHV/EROE851RomXeejaY qiObmhkhEhsYJS6sWQflfGWU2HJjCgtIFZuAlcTE9lWMILaIgIbErSvPwbqZBeollp+5zQpi CwPVvHywGsxmEVCVmNg3E8zmFdCU+Lb2KzuILSrgJbFlXzsTiM0pYCZxefVGdogaQYkfk++x QMyUl9i3fyorhK0jcfYYxEESAkvYJLbO/MQKcbaLxLlfz6BeEJZ4dXwL0CAOIFta4tJRW4j6 ZkaJbzv2MEPUTGCU2LNeCMK2ljh8/CLUAj6Jd197WCF6eSU62qBKPCRat/5lh7AdJS4/6IQG XSejxPFF65gmMMrOQnL3LCR3z0Jy9wJG5lWMYqkFxbnpqcWGBSZ6xYm5xaV56XrJ+bmbGMGJ QMtiB+Oecz6HGAU4GJV4eA2al0UJsSaWFVfmHmKU4GBWEuH1nwoU4k1JrKxKLcqPLyrNSS0+ xCjNwaIkzhsQ4BIlJJCeWJKanZpakFoEk2Xi4JRqYGzTqugIsdy03/xLcdBz9j7pE1vKm4+f dPKyORRb8vy+XqD05FOLzVNLGCyO223y5Utc2se8cerpLt5dm7675Rkmz+17b7+rtb/mvFGQ 7wUDfuG1T7cFNMtmfq0Vudb7f9nL9b8vfbsv4bD75cpeBjfTu/HiQiudOBQPXtTQthJwWBok 3z43W4mlOCPRUIu5qDgRACqRZGIAAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t9jQV3fucuiDNbON7O48vU9m8WJvg+s Fpd3zWGzOLvpLYvF/z072B1YPX61zWX22LSqk83jfvdxJo/Pm+QCWKK4bFJSczLLUov07RK4 Mo40HGIseCRSsen5XKYGxt0CXYycHBICJhJHNjUzgthCAusYJXadjOti5AKyvzJKHJzziB0k wSZgJTGxfRVYkYiAhsStK8/ZQGxmgXqJXYc2MYHYwkA1Lx+sZgWxWQRUJSb2zQSzeQU0Jb6t /Qo2R1TAS2LLvnawek4BM4nLqzeyQyzrZpT49/wbI0SDoMSPyfdYIBbIS+zbP5UVwtaSWL/z ONMERv5ZSMpmISmbhaRsASPzKkbJ1ILi3PTcYqMCw7zUcr3ixNzi0rx0veT83E2MwMDddlir bwfj/SXxhxgFOBiVeHg7WpdFCbEmlhVX5h5ilOBgVhLh9Z8KFOJNSaysSi3Kjy8qzUktPsQo zcGiJM57O+9YpJBAemJJanZqakFqEUyWiYNTqoFxVfmtH3umP5tS9S9d48tT4bUPC3per+/z Mmaf1l/4reC12rS2tV+uvBTq21hXtuy59g3rpRO9tl+U5f6r8uKSgzX3DO2tApEzZ6nOsI17 cNbaUIbtRfGF4KoJ7xznWOloMJ3uLnWaU//m/8dpq45Mal3l8U11r23fgk81olVmX341L/EJ /mE0X4mlOCPRUIu5qDgRAJWijqFYAgAA X-CMS-MailID: 20180312153125epcas1p2e57298cac2b9c7ddba463e8ab31b43f8 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180213180825epcas1p44674e978de3188bb9a42970b28e20d52 X-RootMTR: 20180213180825epcas1p44674e978de3188bb9a42970b28e20d52 References: <20180213180747.12666-1-malat@debian.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, February 13, 2018 07:07:45 PM Mathieu Malaterre wrote: > The function offb_destroy did not deallocate the color map leaving some > memory around after destruction. Call the color map deallocate function to > remove the memory leak. > > Handle another case where color map should have been deallocated during an > error code path. > > Fix memory leaks reported by kmemleak: > > # dmesg > ... > [ 1884.719941] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) > # cat /sys/kernel/debug/kmemleak > unreferenced object 0xde3d9000 (size 512): > comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 aa aa aa aa aa aa aa aa ................ > 55 55 55 55 55 55 55 55 ff ff ff ff ff ff ff ff UUUUUUUU........ > backtrace: > [] fb_alloc_cmap_gfp+0x54/0x15c > [] offb_init_nodriver+0x8e8/0xa3c > [] offb_init+0xd0/0x164 > [<322f82a3>] do_one_initcall+0x4c/0x178 > [] kernel_init_freeable+0x138/0x1cc > [<2a17fa0e>] kernel_init+0x24/0x118 > [<4079749a>] ret_from_kernel_thread+0x5c/0x64 > unreferenced object 0xde3d9200 (size 512): > comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) > hex dump (first 32 bytes): > 00 00 00 00 aa aa aa aa 00 00 00 00 55 55 aa aa ............UU.. > 55 55 55 55 ff ff ff ff 55 55 55 55 ff ff ff ff UUUU....UUUU.... > backtrace: > [<4bf3594d>] fb_alloc_cmap_gfp+0x6c/0x15c > [] offb_init_nodriver+0x8e8/0xa3c > [] offb_init+0xd0/0x164 > [<322f82a3>] do_one_initcall+0x4c/0x178 > [] kernel_init_freeable+0x138/0x1cc > [<2a17fa0e>] kernel_init+0x24/0x118 > [<4079749a>] ret_from_kernel_thread+0x5c/0x64 > unreferenced object 0xde3d9600 (size 512): > comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) > hex dump (first 32 bytes): > 00 00 aa aa 00 00 aa aa 00 00 aa aa 00 00 aa aa ................ > 55 55 ff ff 55 55 ff ff 55 55 ff ff 55 55 ff ff UU..UU..UU..UU.. > backtrace: > [<23a3ea03>] fb_alloc_cmap_gfp+0x84/0x15c > [] offb_init_nodriver+0x8e8/0xa3c > [] offb_init+0xd0/0x164 > [<322f82a3>] do_one_initcall+0x4c/0x178 > [] kernel_init_freeable+0x138/0x1cc > [<2a17fa0e>] kernel_init+0x24/0x118 > [<4079749a>] ret_from_kernel_thread+0x5c/0x64 > > Signed-off-by: Mathieu Malaterre Patch queued for 4.17, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics