diff options
| author | Chi Zhiling <chizhiling@kylinos.cn> | 2026-09-05 13:49:51 +0800 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-21 08:28:27 +0900 |
| commit | 48acff2eedef7fecdfbd39be1b6f4463a9e43e3e (patch) | |
| tree | 1730a486680b64f6a89185e5169a16c11e044017 /scripts/Makefile.thinlto | |
| parent | cb9dbf8a4e34b4fdf311598835ab4d76ed7e07c1 (diff) | |
| download | linux-48acff2eedef7fecdfbd39be1b6f4463a9e43e3e.tar.gz linux-48acff2eedef7fecdfbd39be1b6f4463a9e43e3e.zip | |
exfat: take bitmap_lock at the start of exfat_alloc_cluster()
exfat_alloc_cluster() checks sbi->used_clusters against the total
number of data clusters before acquiring sbi->bitmap_lock. A concurrent
allocation can update sbi->used_clusters after the check but before
the lock is acquired, making the check stale. This can allow the
allocation to proceed even though there are not enough free clusters,
causing it to fail partway through.
Acquire sbi->bitmap_lock before checking sbi->used_clusters so that
the free-space check and subsequent cluster allocation are serialized
with concurrent allocations.
Fixes: f55c096f62f1 ("exfat: do not zero the extended part")
Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
