summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-19 19:24:03 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-19 19:24:03 -1000
commite0d5fa9ae40bedfce4a7b7b2f6ec22096650ffdf (patch)
tree3fa732226f2c70e737f41b92d73df3de530b662e /scripts/Makefile.thinlto
parentd1280054f8374cedc1d3b2fac44eb060f81cba50 (diff)
downloadlinux-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