lkml.org 
[lkml]   [2009]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 38/45] x86: fix 64k corruption-check
    -stable review patch.  If anyone has any objections, please let us know.
    ---------------------

    From: Yinghai Lu <yinghai@kernel.org>

    upstream commit: 6d7942dc2a70a7e74c352107b150265602671588

    Impact: fix boot crash

    Need to exit early if the addr is far above 64k.

    The crash got exposed by:

    78a8b35: x86: make e820_update_range() handle small range update

    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Cc: <stable@kernel.org>
    LKML-Reference: <49BC2279.2030101@kernel.org>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Chris Wright <chrisw@sous-sol.org>
    ---
    arch/x86/kernel/check.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    --- a/arch/x86/kernel/check.c
    +++ b/arch/x86/kernel/check.c
    @@ -86,12 +86,12 @@ void __init setup_bios_corruption_check(
    if (addr == 0)
    break;

    + if (addr >= corruption_check_size)
    + break;
    +
    if ((addr + size) > corruption_check_size)
    size = corruption_check_size - addr;

    - if (size == 0)
    - break;
    -
    e820_update_range(addr, size, E820_RAM, E820_RESERVED);
    scan_areas[num_scan_areas].addr = addr;
    scan_areas[num_scan_areas].size = size;


    \
     
     \ /
      Last update: 2009-04-01 01:39    [W:0.020 / U:0.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site