hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/char/ipmi/ipmi_watchdog.c
....@@ -503,7 +503,7 @@
503503 msg.cmd = IPMI_WDOG_RESET_TIMER;
504504 msg.data = NULL;
505505 msg.data_len = 0;
506
- atomic_add(1, &panic_done_count);
506
+ atomic_add(2, &panic_done_count);
507507 rv = ipmi_request_supply_msgs(watchdog_user,
508508 (struct ipmi_addr *) &addr,
509509 0,
....@@ -513,7 +513,7 @@
513513 &panic_halt_heartbeat_recv_msg,
514514 1);
515515 if (rv)
516
- atomic_sub(1, &panic_done_count);
516
+ atomic_sub(2, &panic_done_count);
517517 }
518518
519519 static struct ipmi_smi_msg panic_halt_smi_msg = {
....@@ -537,12 +537,12 @@
537537 /* Wait for the messages to be free. */
538538 while (atomic_read(&panic_done_count) != 0)
539539 ipmi_poll_interface(watchdog_user);
540
- atomic_add(1, &panic_done_count);
540
+ atomic_add(2, &panic_done_count);
541541 rv = __ipmi_set_timeout(&panic_halt_smi_msg,
542542 &panic_halt_recv_msg,
543543 &send_heartbeat_now);
544544 if (rv) {
545
- atomic_sub(1, &panic_done_count);
545
+ atomic_sub(2, &panic_done_count);
546546 pr_warn("Unable to extend the watchdog timeout\n");
547547 } else {
548548 if (send_heartbeat_now)