Commit c9acc3c4 authored by Jes Sorensen's avatar Jes Sorensen Committed by Corey Minyard
Browse files

ipmi_si_intf: Fix race in timer shutdown handling



smi_mod_timer() enables the timer before setting timer_running. This
means the timer can be running when we get to stop_timer_and_thread()
without timer_running having been set, resulting in del_timer_sync()
not being called and the timer being left to cause havoc during
shutdown.

Instead just call del_timer_sync() unconditionally

Signed-off-by: default avatarJes Sorensen <jsorensen@fb.com>
Message-Id: <20190828203625.32093-2-Jes.Sorensen@gmail.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 38303521
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1843,7 +1843,6 @@ static inline void stop_timer_and_thread(struct smi_info *smi_info)
	}

	smi_info->timer_can_start = false;
	if (smi_info->timer_running)
	del_timer_sync(&smi_info->si_timer);
}