From patchwork Mon Nov 30 22:10:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 550448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 27727140216; Tue, 1 Dec 2015 09:13:40 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1a3WhW-0000zC-3Q; Mon, 30 Nov 2015 22:13:38 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1a3Weu-0007tA-RX for kernel-team@lists.ubuntu.com; Mon, 30 Nov 2015 22:10:56 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1a3Weu-0001lP-LJ; Mon, 30 Nov 2015 22:10:56 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1a3Wes-0003bn-FB; Mon, 30 Nov 2015 14:10:54 -0800 From: Kamal Mostafa To: Masahiro Yamada Subject: [3.19.y-ckt stable] Patch "of/fdt: fix error checking for earlycon address" has been added to staging queue Date: Mon, 30 Nov 2015 14:10:53 -0800 Message-Id: <1448921453-13841-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.19 Cc: Rob Herring , Kamal Mostafa , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled of/fdt: fix error checking for earlycon address to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue This patch is scheduled to be released in version 3.19.8-ckt11. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.19.y-ckt tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From ef3fe11947cee9483829658ca536afdcb56d230a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 23 Oct 2015 20:47:20 +0900 Subject: of/fdt: fix error checking for earlycon address commit 3f5ceec96470050d20d7281d49985e3b1cfc3995 upstream. fdt_translate_address() returns OF_BAD_ADDR on error. It is defined as a u64 value, so the variable "addr" should be defined as u64 as well. Fixes: fb11ffe74c79 ("of/fdt: add FDT serial scanning for earlycon") Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring Signed-off-by: Kamal Mostafa --- drivers/of/fdt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 5100742..0159b48 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -788,14 +788,15 @@ int __init early_init_dt_scan_chosen_serial(void) return -ENODEV; while (match->compatible[0]) { - unsigned long addr; + u64 addr; + if (fdt_node_check_compatible(fdt, offset, match->compatible)) { match++; continue; } addr = fdt_translate_address(fdt, offset); - if (!addr) + if (addr == OF_BAD_ADDR) return -ENXIO; of_setup_earlycon(addr, match->data);