Commit 7f9ad1c
committed
tcmur_device: skip reporting the event if device in recovery
If the device is in recovery, we can defer reporting the event in
the recovery when reopening the device. And if the device is stopped
or stopping we can just skip it.
Just wait for the report event to finish when recoverying the device,
because the recovery will close and then open the device during which
the private data maybe released. And it may cause use-after-free crash
in report event routine.
Signed-off-by: Xiubo Li <[email protected]>1 parent b4d1656 commit 7f9ad1c
File tree
6 files changed
+52
-10
lines changed6 files changed
+52
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1047 | 1053 | | |
1048 | 1054 | | |
1049 | | - | |
| 1055 | + | |
1050 | 1056 | | |
1051 | 1057 | | |
1052 | 1058 | | |
| |||
1088 | 1094 | | |
1089 | 1095 | | |
1090 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
1091 | 1099 | | |
1092 | 1100 | | |
1093 | 1101 | | |
| |||
1130 | 1138 | | |
1131 | 1139 | | |
1132 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
1133 | 1145 | | |
1134 | 1146 | | |
1135 | 1147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | 151 | | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
158 | | - | |
159 | | - | |
| 156 | + | |
160 | 157 | | |
161 | 158 | | |
162 | 159 | | |
| |||
215 | 212 | | |
216 | 213 | | |
217 | 214 | | |
218 | | - | |
| 215 | + | |
219 | 216 | | |
220 | 217 | | |
221 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
255 | 261 | | |
256 | 262 | | |
257 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | 89 | | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
| 133 | + | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
171 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
172 | 192 | | |
173 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
174 | 198 | | |
175 | 199 | | |
176 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
0 commit comments