From patchwork Fri Sep 5 14:36:26 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Hering X-Patchwork-Id: 186 Return-Path: X-Original-To: patchwork@ozlabs.org Delivered-To: patchwork@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id C99A8DE00D for ; Sat, 6 Sep 2008 00:47:59 +1000 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from mtagate2.de.ibm.com (mtagate2.de.ibm.com [195.212.17.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mtagate2.de.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id A9AE6DDF5F for ; Sat, 6 Sep 2008 00:36:37 +1000 (EST) Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id m85EaWEC001882 for ; Fri, 5 Sep 2008 14:36:32 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m85EaVAT3506234 for ; Fri, 5 Sep 2008 16:36:31 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m85EaRqp002922 for ; Fri, 5 Sep 2008 16:36:27 +0200 Received: from dyn-9-152-217-94.boeblingen.de.ibm.com (dyn-9-152-217-94.boeblingen.de.ibm.com [9.152.217.94]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m85EaRAD002912; Fri, 5 Sep 2008 16:36:27 +0200 From: Hannes Hering Subject: [PATCH 1/2] ehea: Fix DLPAR memory handling Date: Fri, 5 Sep 2008 16:36:26 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Disposition: inline To: jeff@garzik.org Message-Id: <200809051636.26545.hannes.hering@gmx.de> X-Mailman-Approved-At: Sat, 06 Sep 2008 00:47:17 +1000 Cc: themann@de.ibm.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, raisch@de.ibm.com, ossrosch@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org, ossthema@de.ibm.com, osstklei@de.ibm.com X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org The ehea busmap must be allocated only once in the first of many calls of the ehea_create_busmap_callback. Signed-off-by: Hannes Hering diff -Nurp -X dontdiff linux-2.6.27-rc5/drivers/net/ehea/ehea_qmr.c patched_kernel/drivers/net/ehea/ehea_qmr.c --- linux-2.6.27-rc5/drivers/net/ehea/ehea_qmr.c 2008-08-29 00:52:02.000000000 +0200 +++ patched_kernel/drivers/net/ehea/ehea_qmr.c 2008-09-05 15:31:30.000000000 +0200 @@ -595,7 +595,8 @@ static int ehea_create_busmap_callback(u end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE); mr_len = *(unsigned long *)arg; - ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL); + if (!ehea_bmap) + ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL); if (!ehea_bmap) return -ENOMEM;