Skip to contentSkip to conversation

Data races in generic_fillattr()

DISCUSSION Pedro Fonseca 1 participant 2 messages Apr 14, 2014 – Apr 24, 2014 VFS

lore
Share & tools
lore
#0 lore raw

Hi,

I've noticed that the function generic_fillattr() (fs/stat.c) in involved in multiple data races. Initially I reported this problem on the ext4 mailing list but it seems to be more general to the VFS layer.

Because of limited locking, when the inodes are updated and a stat() system call is concurrently executed, several 64-bit fields (e.g., atime, mtime, ctime, blocks) can potentially get incorrect values on 32-bit architectures. In addition, it seems that it can also cause inconsistencies between the "blocks" field and the "size" field.

I would be glad if you could have a look at this problem and let me know if it's going to be fixed.

Thanks,
Pedro

#1 lore raw

Anybody had a chance to look at this?

Pedro

Quoted 10 lines · Pedro Fonseca

Hi,

I've noticed that the function generic_fillattr() (fs/stat.c) in involved in multiple data races. Initially I reported this problem on the ext4 mailing list but it seems to be more general to the VFS layer.

Because of limited locking, when the inodes are updated and a stat() system call is concurrently executed, several 64-bit fields (e.g., atime, mtime, ctime, blocks) can potentially get incorrect values on 32-bit architectures. In addition, it seems that it can also cause inconsistencies between the "blocks" field and the "size" field.

I would be glad if you could have a look at this problem and let me know if it's going to be fixed.

Thanks,
Pedro