Re: [PATCH AUTOSEL 4.9 1/8] of/fdt: Don't calculate initrd size from DT if start > end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> It should be stressed, it is generally a fault of the bootloader's with
> the kernel relying on it, however we should not allow the bootloader's
> misconfiguration to lead to the kernel oops. Not only the kernel
> should be

I believe we should at least printk() if we detect bootloader bug of
this severity.

Best regards,
								Pavel


> +++ b/drivers/of/fdt.c
> @@ -917,6 +917,8 @@ static void __init early_init_dt_check_for_initrd(unsigned long node)
>  	if (!prop)
>  		return;
>  	end = of_read_number(prop, len/4);
> +	if (start > end)
> +		return;
>  
>  	__early_init_dt_declare_initrd(start, end);
>  
> -- 
> 2.35.1

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux