mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 01:43:18 +00:00
adf_copy_key_value_data() copies data from userland to kernel, based on a linked link provided by userland. If userland provides a circular list (or just a very long one) then it would drive a long loop where allocation occurs in every loop. This could lead to low memory conditions. Adding a limit to stop endless loop. Signed-off-by: Adam Guerin <[email protected]> Co-developed-by: Ciunas Bennett <[email protected]> Signed-off-by: Ciunas Bennett <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>