• David Brownell's avatar
    bugfix for reboot · 5f78584b
    David Brownell authored
    Fix the following bug, which was reported after a command line "reboot":
    
     WARNING: at kernel/lockdep.c:2280 lockdep_trace_alloc+0x40/0x50()
     Modules linked in:
     [<c002d910>] (unwind_backtrace+0x0/0xdc) from [<c003bba8>] (warn_slowpath+0x68/0x8c)
     [<c003bba8>] (warn_slowpath+0x68/0x8c) from [<c005ecf0>] (lockdep_trace_alloc+0x40/0x50)
     [<c005ecf0>] (lockdep_trace_alloc+0x40/0x50) from [<c0091e14>] (__kmalloc+0x58/0x110)
     [<c0091e14>] (__kmalloc+0x58/0x110) from [<c0165044>] (kvasprintf+0x38/0x58)
     [<c0165044>] (kvasprintf+0x38/0x58) from [<c015e794>] (kobject_set_name_vargs+0x14/0x54)
     [<c015e794>] (kobject_set_name_vargs+0x14/0x54) from [<c019b9ac>] (dev_set_name+0x20/0x2c)
     [<c019b9ac>] (dev_set_name+0x20/0x2c) from [<c0031804>] (davinci_watchdog_reset+0x1c/0xb0)
     [<c0031804>] (davinci_watchdog_reset+0x1c/0xb0) from [<c0029304>] (arm_machine_restart+0x24/0x50)
     [<c0029304>] (arm_machine_restart+0x24/0x50) from [<c0028d84>] (machine_restart+0x18/0x20)
     [<c0028d84>] (machine_restart+0x18/0x20) from [<c004ba80>] (sys_reboot+0xe0/0x1c4)
     [<c004ba80>] (sys_reboot+0xe0/0x1c4) from [<c0027d40>] (ret_fast_syscall+0x0/0x2c)
    
    The issue is that dev_set_name() may no longer be called with IRQs disabled.
    Trivial fix:  don't cons up a fake watchdog device, just use the real one.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
    5f78584b
time.c 11.6 KB