diff options
author | 2023-06-04 16:12:14 +0300 | |
---|---|---|
committer | 2023-06-09 09:20:56 +0200 | |
commit | 0d8675e1dfa6253e92b6e42504094d42f27d3ca6 (patch) | |
tree | 8d2447425a90800ebccb3fcfa954afb09f441d67 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | gpio: tegra186: Check PMC driver status before any request (diff) | |
download | wireguard-linux-0d8675e1dfa6253e92b6e42504094d42f27d3ca6.tar.xz wireguard-linux-0d8675e1dfa6253e92b6e42504094d42f27d3ca6.zip |
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 <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230604131215.78847-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions