Commit 88d604d
committed
drv/bluetooth/cc2640: protect against write_buf use while reading
Due to the use of write_buf_size as a flag to indicate if write_buf
is currently in use, there was a possibility that the UART service or
Pybricks service could write to write_buf and set write_buf_size while
a read-only SPI transaction was in progress, which would cause data to
be lost.1 parent 58f568a commit 88d604d
File tree
2 files changed
+18
-9
lines changed- lib
- ble5stack/central
- pbio/drv/bluetooth
2 files changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
1187 | 1189 | | |
1188 | 1190 | | |
1189 | 1191 | | |
1190 | 1192 | | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1191 | 1200 | | |
1192 | 1201 | | |
1193 | | - | |
| 1202 | + | |
1194 | 1203 | | |
1195 | 1204 | | |
1196 | 1205 | | |
1197 | 1206 | | |
1198 | 1207 | | |
| 1208 | + | |
| 1209 | + | |
1199 | 1210 | | |
1200 | 1211 | | |
1201 | 1212 | | |
| |||
1205 | 1216 | | |
1206 | 1217 | | |
1207 | 1218 | | |
1208 | | - | |
| 1219 | + | |
1209 | 1220 | | |
1210 | 1221 | | |
1211 | | - | |
| 1222 | + | |
1212 | 1223 | | |
1213 | 1224 | | |
1214 | 1225 | | |
| |||
1220 | 1231 | | |
1221 | 1232 | | |
1222 | 1233 | | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
| 1234 | + | |
| 1235 | + | |
1227 | 1236 | | |
1228 | 1237 | | |
1229 | 1238 | | |
| |||
0 commit comments