This repository was archived by the owner on Nov 11, 2024. It is now read-only.
Commit a711f2b
Fix concurrency bugs in FAT_getAttr/FAT_setAttr. (#13)
A relatively rare concurrency bug existed in these methods due to them not
correctly holding the partition lock during calls to
_FAT_directory_entryFromPath. That method can trigger reads to the partition.
Due to the lock not being held, another thread could still trigger a concurrent
read, potentially corrupting the cache. The fix is simply to ensure the lock is
held around the calls.1 parent e7b04a7 commit a711f2b
1 file changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | | - | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
| 106 | + | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| |||
0 commit comments