aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2023-06-04 16:12:14 +0300
committerLinus Walleij <[email protected]>2023-06-09 09:20:56 +0200
commit0d8675e1dfa6253e92b6e42504094d42f27d3ca6 (patch)
tree8d2447425a90800ebccb3fcfa954afb09f441d67 /lib/memory-notifier-error-inject.c
parent5cc9525bfc8e32029d1339349d65873c42193b00 (diff)
pinctrl: Duplicate user memory in one go in pinmux_select()
Current code is suboptimal in three ways: 1) it explicitly terminates the string which is not needed; 2) it might provoke additional faults, because asked lenght might be bigger than the real one; 3) it consumes more than needed lines in the source. Instead of using kmalloc() + strncpy_from_user() + terminating, just utilize memdup_user_nul(). Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions