From patchwork Tue Feb 11 21:27:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 24504 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F78E206FF for ; Tue, 11 Feb 2014 21:30:39 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id u16sf2832825iet.4 for ; Tue, 11 Feb 2014 13:30:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=vA0XcKElGHfZc6LfUXo6HOW40TyqGdMz5bVUDZhgDMg=; b=ZiM97hQYrTcxxp5f2wn8O0IcNiUab4IFigkXqshYvk83CvJSPGwFh8ntFKyp2eyfq4 E7/G5QAia+TbRi/c3GRbi7Tv5cgQJJPAKOZxwvpyZKhERCLp0/t8YzPpLt3BMRQ5hvWU wuquWwyBlICG9A+ZKgTlHWGAxbIA4XY4ze19fCTtKJFNqnMC0mhC750x6rLgIbxnec8z cP4lAsyzXQ2E218xensncBYSsj/GsI4eyT+OF693DyP5OH+AvuO9P4P5okLRfh6m0mvc Dml+GJQvKp+jyU4CG4ypPOuIdtj43wdrFYDru8uaVgF9W2u1rfrlSXdJDwYZDf/XCISV 7xgA== X-Gm-Message-State: ALoCoQlVdjP/B48vR6Pp2QyG9xOm/+cpbHdZspijl6BG8ljIiYhX/Z0MIJH45og8mREoZeg21ex4 X-Received: by 10.50.33.47 with SMTP id o15mr297757igi.0.1392154238861; Tue, 11 Feb 2014 13:30:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.80 with SMTP id w74ls2551359qgd.95.gmail; Tue, 11 Feb 2014 13:30:38 -0800 (PST) X-Received: by 10.58.200.168 with SMTP id jt8mr2481422vec.30.1392154238654; Tue, 11 Feb 2014 13:30:38 -0800 (PST) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id yj2si6450819veb.9.2014.02.11.13.30.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 13:30:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id pa12so6533065veb.19 for ; Tue, 11 Feb 2014 13:30:38 -0800 (PST) X-Received: by 10.52.230.105 with SMTP id sx9mr25316810vdc.10.1392154238530; Tue, 11 Feb 2014 13:30:38 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp2620vcz; Tue, 11 Feb 2014 13:30:38 -0800 (PST) X-Received: by 10.140.20.175 with SMTP id 44mr57622361qgj.46.1392154237963; Tue, 11 Feb 2014 13:30:37 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id q3si5938443qcz.59.2014.02.11.13.30.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Feb 2014 13:30:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDKsC-0001c3-Le; Tue, 11 Feb 2014 21:28:08 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDKsB-0001bv-DU for xen-devel@lists.xenproject.org; Tue, 11 Feb 2014 21:28:07 +0000 Received: from [85.158.137.68:53143] by server-1.bemta-3.messagelabs.com id 0B/5C-17293-6E59AF25; Tue, 11 Feb 2014 21:28:06 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-4.tower-31.messagelabs.com!1392154085!1220449!1 X-Originating-IP: [209.85.215.180] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21765 invoked from network); 11 Feb 2014 21:28:05 -0000 Received: from mail-ea0-f180.google.com (HELO mail-ea0-f180.google.com) (209.85.215.180) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 11 Feb 2014 21:28:05 -0000 Received: by mail-ea0-f180.google.com with SMTP id o10so3946397eaj.25 for ; Tue, 11 Feb 2014 13:28:05 -0800 (PST) X-Received: by 10.15.99.201 with SMTP id bl49mr14207930eeb.53.1392154085497; Tue, 11 Feb 2014 13:28:05 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id m9sm72094016eeh.3.2014.02.11.13.28.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 13:28:04 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 11 Feb 2014 21:27:30 +0000 Message-Id: <1392154050-21649-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH for-4.5] xen/serial: Don't leak memory mapping if the serial initialization has failed X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Julien Grall Acked-by: Ian Campbell --- xen/drivers/char/exynos4210-uart.c | 1 + xen/drivers/char/omap-uart.c | 1 + xen/drivers/char/pl011.c | 1 + xen/include/asm-arm/mm.h | 1 + 4 files changed, 4 insertions(+) diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c index 0619575..9a2b8b9 100644 --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -344,6 +344,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev, if ( res ) { early_printk("exynos4210: Unable to retrieve the IRQ\n"); + iounmap(uart->regs); return res; } diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c index c1580ef..bfc39b4 100644 --- a/xen/drivers/char/omap-uart.c +++ b/xen/drivers/char/omap-uart.c @@ -337,6 +337,7 @@ static int __init omap_uart_init(struct dt_device_node *dev, if ( res ) { early_printk("omap-uart: Unable to retrieve the IRQ\n"); + iounmap(uart->regs); return res; } diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c index fd82511..f7be578 100644 --- a/xen/drivers/char/pl011.c +++ b/xen/drivers/char/pl011.c @@ -260,6 +260,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev, if ( res ) { early_printk("pl011: Unable to retrieve the IRQ\n"); + iounmap(uart->regs); return res; } diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index b8d4e7d..4211c0b 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -4,6 +4,7 @@ #include #include #include +#include #include /* Align Xen to a 2 MiB boundary. */