Commit f4032d6
tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
/dev/vtpmx is made visible before 'workqueue' is initialized, which can
lead to a memory corruption in the worst case scenario.
Address this by initializing 'workqueue' as the very first step of the
driver initialization.
Cc: stable@vger.kernel.org
Fixes: 6f99612 ("tpm: Proxy driver for supporting multiple emulated TPMs")
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@tuni.fi>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>1 parent fdf0eaf commit f4032d6
1 file changed
Lines changed: 7 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | 686 | | |
697 | 687 | | |
698 | 688 | | |
699 | 689 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | 690 | | |
707 | 691 | | |
708 | 692 | | |
709 | | - | |
710 | | - | |
| 693 | + | |
711 | 694 | | |
712 | 695 | | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
717 | 701 | | |
718 | 702 | | |
719 | 703 | | |
720 | 704 | | |
721 | 705 | | |
722 | 706 | | |
723 | 707 | | |
724 | | - | |
| 708 | + | |
725 | 709 | | |
726 | 710 | | |
727 | 711 | | |
| |||
0 commit comments