Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932744AbaFTCp0 (ORCPT ); Thu, 19 Jun 2014 22:45:26 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:40003 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755641AbaFTCpZ (ORCPT ); Thu, 19 Jun 2014 22:45:25 -0400 X-AuditID: cbfee68f-b7fef6d000003970-cf-53a3a043bc28 From: Heesub Shin To: Greg Kroah-Hartman Cc: John Stultz , Rebecca Schultz Zavin , Colin Cross , Mitchel Humpherys , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Heesub Shin Subject: [PATCH] staging: ion: fixup invalid kfree() calls on heap destroy Date: Fri, 20 Jun 2014 11:46:14 +0900 Message-id: <1403232374-771-1-git-send-email-heesub.shin@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrNLMWRmVeSWpSXmKPExsVy+t8zPV3nBYuDDW5vN7PYvvEbq8XLQ5oW e878YrdoXryezeLg7CVMFmd+61pc3jWHzWLt/G1sFjcmFzpwemzbvY3V43JfL5PHvX2HWTzu XNvD5rF/7hp2j74tqxg9Pm+SC2CP4rJJSc3JLEst0rdL4Mr4d7iVteAse8X2pQUNjLvZuhjZ OSQETCR+WXQxcgJZYhIX7q0HinJxCAksY5TYdf07E0TCROLmjV42EFtIYDqjxJK9uhBF7UwS 16a3s3YxcnCwCWhLHNoWDFIjImAs0X92FjtIDbNAN5PEse1LwJqFBbwkHn2dxQhiswioSlx+ 9ZYJpJdXwFXicJslxC45iZPHJrOC9EoITGeXmLFxIitEvYDEt8mHWEDqJQRkJTYdYIaol5Q4 uOIGywRGwQWMDKsYRVMLkguKk9KLjPWKE3OLS/PS9ZLzczcxQgK6fwfj3QPWhxiTgcZNZJYS Tc4HRkReSbyhsZmRhamJqbGRuaUZacJK4rz3HyYFCQmkJ5akZqemFqQWxReV5qQWH2Jk4uCU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FScCABxSlDzdAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I've noticed that the last commit to ion_system_heap.c ('staging: ion: optimize struct ion_system_heap') has an omission, so an invalid kfree() gets called on ion_system_heap_destroy(). As ION system heap is never destroyed until system shutdown, it may not cause any harm, but should be fixed. I should have caught this before the merge, my bad. Signed-off-by: Heesub Shin --- drivers/staging/android/ion/ion_system_heap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index c826b4c..6b77c51 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -304,7 +304,6 @@ void ion_system_heap_destroy(struct ion_heap *heap) for (i = 0; i < num_orders; i++) ion_page_pool_destroy(sys_heap->pools[i]); - kfree(sys_heap->pools); kfree(sys_heap); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/