ipmi/watchdog: fix wdog hang on panic waiting for ipmi response
authorRobert Lippert <roblip@gmail.com>
Thu, 20 Apr 2017 23:49:47 +0000 (16:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 09:58:45 +0000 (10:58 +0100)
commit983c3c9a370bc3fc4784b6dbaad521e52811191a
treee74ce7765a1b0a81fe0abba9c0c479b4bb1dea79
parentfe5c9d566b2c83d3c21e3b9727caf050ca5da819
ipmi/watchdog: fix wdog hang on panic waiting for ipmi response

[ Upstream commit 2c1175c2e8e5487233cabde358a19577562ac83e ]

Commit c49c097610fe ("ipmi: Don't call receive handler in the
panic context") means that the panic_recv_free is not called during a
panic and the atomic count does not drop to 0.

Fix this by only expecting one decrement of the atomic variable
which comes from panic_smi_free.

Signed-off-by: Robert Lippert <rlippert@google.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/ipmi/ipmi_watchdog.c