Skip to content
  • Stefan Roese's avatar
    ccd063e9
    watchdog: Move watchdog_dev to data section (BSS may not be cleared) · ccd063e9
    Stefan Roese authored
    
    
    This patch moves all instances of static "watchdog_dev" declarations to
    the "data" section. This may be needed, as the BSS may not be cleared
    in the early U-Boot phase, where watchdog_reset() is already beeing
    called. This may result in incorrect pointer access, as the check to
    "!watchdog_dev" in watchdog_reset() may not be true and the function
    may continue to run.
    
    Signed-off-by: default avatarStefan Roese <sr@denx.de>
    Cc: Heiko Schocher <hs@denx.de>
    Cc: Tom Rini <trini@konsulko.com>
    Cc: Michal Simek <michal.simek@xilinx.com>
    Cc: "Marek Behún" <marek.behun@nic.cz>
    Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
    Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
    Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
    ccd063e9
    watchdog: Move watchdog_dev to data section (BSS may not be cleared)
    Stefan Roese authored
    
    
    This patch moves all instances of static "watchdog_dev" declarations to
    the "data" section. This may be needed, as the BSS may not be cleared
    in the early U-Boot phase, where watchdog_reset() is already beeing
    called. This may result in incorrect pointer access, as the check to
    "!watchdog_dev" in watchdog_reset() may not be true and the function
    may continue to run.
    
    Signed-off-by: default avatarStefan Roese <sr@denx.de>
    Cc: Heiko Schocher <hs@denx.de>
    Cc: Tom Rini <trini@konsulko.com>
    Cc: Michal Simek <michal.simek@xilinx.com>
    Cc: "Marek Behún" <marek.behun@nic.cz>
    Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
    Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
    Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
Loading