Skip to content
Commit a0708300 authored by Philipp Stanner's avatar Philipp Stanner Committed by Greg Kroah-Hartman
Browse files

drivers/comedi: use standard array-copy-function



comedi_fops.c utilizes memdup_user() to copy a userspace array.

The new function memdup_array_user() provides a standardized way to copy
userspace-arrays. It makes it easier to see that an array is being
copied and, additionally, performs a generic overflow-check which might
help make the code more robust in case of changes in the future.

Replace memdup_user() with memdup_array_user().

Suggested-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarPhilipp Stanner <pstanner@redhat.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20231103112932.75795-2-pstanner@redhat.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 437cd966
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment