Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754077Ab2EXIdC (ORCPT ); Thu, 24 May 2012 04:33:02 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:62483 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753899Ab2EXIc6 (ORCPT ); Thu, 24 May 2012 04:32:58 -0400 X-AuditID: cbfee61b-b7faf6d000001f49-4c-4fbdf2381cc1 From: KyongHo To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: "'Andrew Morton'" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: mm: fix faulty initialization in vmalloc_init() Date: Thu, 24 May 2012 17:32:56 +0900 Organization: Samsung Electronics Co., Ltd. Message-id: <001c01cd3987$d1a71a50$74f54ef0$%cho@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac05h8wIIJvGn+NBSFuLveW10sPwAA== Content-language: ko x-cr-hashedpuzzle: BIhf GvR5 HoFQ NuYo N5x5 O9Gp PY7x QBZ4 R36y Szn+ Vpb+ mimz wDSK z624 2RCw 3x0A;5;YQBrAHAAbQBAAGwAaQBuAHUAeAAtAGYAbwB1AG4AZABhAHQAaQBvAG4ALgBvAHIAZwA7AGwAaQBuAHUAeAAtAGEAcgBtAC0AawBlAHIAbgBlAGwAQABsAGkAcwB0AHMALgBpAG4AZgByAGEAZABlAGEAZAAuAG8AcgBnADsAbABpAG4AdQB4AC0AawBlAHIAbgBlAGwAQAB2AGcAZQByAC4AawBlAHIAbgBlAGwALgBvAHIAZwA7AGwAaQBuAHUAeAAtAG0AbQBAAGsAdgBhAGMAawAuAG8AcgBnADsAbABpAG4AdQB4AC0AcwBhAG0AcwB1AG4AZwAtAHMAbwBjAEAAdgBnAGUAcgAuAGsAZQByAG4AZQBsAC4AbwByAGcA;Sos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== X-TM-AS-MML: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1044 Lines: 34 vmalloc_init() adds 'vmap_area's for early 'vm_struct's. This patch fixes vmalloc_init() to correctly initialize vmap_area for the given vm_struct. Signed-off-by: KyongHo Cho --- mm/vmalloc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 94dff88..1196c77 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1185,9 +1185,10 @@ void __init vmalloc_init(void) /* Import existing vmlist entries. */ for (tmp = vmlist; tmp; tmp = tmp->next) { va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT); - va->flags = tmp->flags | VM_VM_AREA; + va->flags = VM_VM_AREA; va->va_start = (unsigned long)tmp->addr; va->va_end = va->va_start + tmp->size; + va->vm = tmp; __insert_vmap_area(va); } -- 1.7.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/