diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:24:03 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:24:03 -1000 |
| commit | e0d5fa9ae40bedfce4a7b7b2f6ec22096650ffdf (patch) | |
| tree | 3fa732226f2c70e737f41b92d73df3de530b662e /scripts/Makefile.thinlto | |
| parent | d1280054f8374cedc1d3b2fac44eb060f81cba50 (diff) | |
| download | linux-e0d5fa9ae40bedfce4a7b7b2f6ec22096650ffdf.tar.gz linux-e0d5fa9ae40bedfce4a7b7b2f6ec22096650ffdf.zip | |
ubi: use put_user() when filling the erase counter array
ubi_get_ec_info() checks the user's erase_counters array with
access_ok() and then fills it one entry at a time with __put_user(),
taking the wear-leveling lock for each entry in between. Each of those
accesses enables and disables user access on its own, so the up-front
check saves nothing.
Use put_user(). The access_ok() stays, so a bad array still fails
before anything is written.
This is part of getting rid of __get_user() and __put_user() entirely.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
