Zeke-OS / zeke

A POSIX-like OS for ARM processors.
Other
88 stars 9 forks source link

fatfs is racy #106

Closed OlliV closed 9 years ago

OlliV commented 9 years ago

It seems that simultaneous reads/writes will cause fatfs to return more or less random errors and finally break it completely. Example:

touch x

# cat x
cat: read error: EACCES (Permission denied)
OlliV commented 9 years ago

EACCES was happening because we first internally opened the file with only FA_WRITE and then tried to read from it. fatfs should always open files as writable and then determine the mode in runtime.