Repository navigation
Commit 1c7ce4b
scsi: ch: synchronize ch_probe() and ch_open()
The 'ch' device node is created before the configuration is being read in,
which leads to a race window when ch_open() is called before that.
To avoid any races we should be taking the device mutex during
ch_readconfig() and ch_init_elem(), and also during ch_open().
That ensures ch_probe is finished before ch_open() completes.
Link: https://lore.kernel.org/r/20200213153207.123357-3-hare@suse.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 6616728 commit 1c7ce4b
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
609 | 611 | | |
| 612 | + | |
610 | 613 | | |
611 | 614 | | |
612 | 615 | | |
| |||
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
952 | 958 | | |
953 | 959 | | |
954 | 960 | | |
| |||
959 | 965 | | |
960 | 966 | | |
961 | 967 | | |
962 | | - | |
963 | | - | |
964 | | - | |
| 968 | + | |
965 | 969 | | |
966 | | - | |
| 970 | + | |
| 971 | + | |
967 | 972 | | |
| 973 | + | |
968 | 974 | | |
969 | 975 | | |
970 | 976 | | |
| 977 | + | |
971 | 978 | | |
972 | 979 | | |
973 | 980 | | |
| |||
0 commit comments