NetBSD-Bugs archive

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

kern/58869: ipmi(4) holds sc_cmd_mtx across copyout, needed for wdog tickle



>Number:         58869
>Category:       kern
>Synopsis:       ipmi(4) holds sc_cmd_mtx across copyout, needed for wdog tickle
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 03 14:40:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The IpmiWdog Foundation
>Environment:
>Description:
The mutex struct ipmi_softc::sc_cmd_mtx is needed by the watchdog tickle path, so it should not be held across arbitrary sleeps.

But it is held across malloc/copyin/copyout, which can sleep arbitrarily long for paging.
>How-To-Repeat:
code inspection, using ipmi watchdog on heavily loaded system with swapping
>Fix:
Narrow the scope of sc_cmd_mtx in ipmi_ioctl to ipmi_sendcmd/recvcmd, not malloc/copyin/copyout.



Home | Main Index | Thread Index | Old Index