File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5083,8 +5083,11 @@ static struct timer_list ipmi_timer;
50835083
50845084static atomic_t stop_operation ;
50855085
5086- static void ipmi_timeout (struct timer_list * unused )
5086+ static void ipmi_timeout_work (struct work_struct * work )
50875087{
5088+ if (atomic_read (& stop_operation ))
5089+ return ;
5090+
50885091 struct ipmi_smi * intf ;
50895092 bool need_timer = false;
50905093 int index ;
@@ -5111,6 +5114,16 @@ static void ipmi_timeout(struct timer_list *unused)
51115114 mod_timer (& ipmi_timer , jiffies + IPMI_TIMEOUT_JIFFIES );
51125115}
51135116
5117+ static DECLARE_WORK (ipmi_timer_work , ipmi_timeout_work ) ;
5118+
5119+ static void ipmi_timeout (struct timer_list * unused )
5120+ {
5121+ if (atomic_read (& stop_operation ))
5122+ return ;
5123+
5124+ queue_work (system_bh_wq , & ipmi_timer_work );
5125+ }
5126+
51145127static void need_waiter (struct ipmi_smi * intf )
51155128{
51165129 /* Racy, but worst case we start the timer twice. */
@@ -5538,6 +5551,7 @@ static void __exit cleanup_ipmi(void)
55385551 */
55395552 atomic_set (& stop_operation , 1 );
55405553 timer_delete_sync (& ipmi_timer );
5554+ cancel_work_sync (& ipmi_timer_work );
55415555
55425556 initialized = false;
55435557
You can’t perform that action at this time.
0 commit comments