Repository navigation
Commit 44b8fb6
drivers: char: tlclk.c: Avoid data race between init and interrupt handler
After registering character device the file operation callbacks can be
called. The open callback registers interrupt handler.
Therefore interrupt handler can execute in parallel with rest of the init
function. To avoid such data race initialize telclk_interrupt variable
and struct alarm_events before registering character device.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Link: https://lore.kernel.org/r/20200417153451.1551-1-madhuparnabhowmik10@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c18c1f1 commit 44b8fb6
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
780 | 788 | | |
781 | 789 | | |
782 | 790 | | |
| 791 | + | |
783 | 792 | | |
784 | 793 | | |
785 | 794 | | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | 795 | | |
792 | 796 | | |
793 | 797 | | |
| |||
796 | 800 | | |
797 | 801 | | |
798 | 802 | | |
799 | | - | |
800 | 803 | | |
801 | 804 | | |
802 | 805 | | |
| |||
837 | 840 | | |
838 | 841 | | |
839 | 842 | | |
840 | | - | |
841 | 843 | | |
| 844 | + | |
842 | 845 | | |
843 | 846 | | |
844 | 847 | | |
| |||
0 commit comments