lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 28 Oct 2015 23:07:38 -0500
From:	Rob Herring <robh@...nel.org>
To:	Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	Peter Hurley <peter@...leysoftware.com>,
	Frank Rowand <frowand.list@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>
Subject: Re: [PATCH] of/fdt: fix error checking for earlycon address

On Fri, Oct 23, 2015 at 6:47 AM, Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
> 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 <yamada.masahiro@...ionext.com>

Applied, thanks.

Rob

> ---
>
>  drivers/of/fdt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 9fc3568..196e449 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -822,14 +822,15 @@ static 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);
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ