summaryrefslogtreecommitdiff
path: root/include/linux/pps_kernel.h
diff options
context:
space:
mode:
authorHubert Mazur <hmazur@google.com>2026-03-20 07:57:23 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-04-05 13:53:34 -0700
commit1871d548fc4feb007644efb6d669c93a4e191254 (patch)
tree090cc7ad181f9506505341580f0ea3b9619b627f /include/linux/pps_kernel.h
parent6f1e1823875f59591df1159b7d193b40337ef524 (diff)
mm/execmem: make the populate and alloc atomic
When a block of memory is requested from the execmem manager it tries to find a suitable fragment by traversing the free_areas. In case there is no such block, a new memory area is added to the free_areas and then allocated to the caller by traversing the free_area tree again. The above operations of allocation and tree traversal are not atomic hence another request may consume this newly allocated memory block which results in the allocation failure for the original request. Such occurrence can be spotted on devices running the 6.18 kernel during the parallel modules loading. To mitigate such resource races execute the cache population and allocation operations under one mutex lock. Link: https://lkml.kernel.org/r/20260320075723.779985-1-hmazur@google.com Signed-off-by: Hubert Mazur <hmazur@google.com> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Stanislaw Kardach <skardach@google.com> Cc: Michal Krawczyk <mikrawczyk@google.com> Cc: Slawomir Rosek <srosek@google.com> Cc: Hubert Mazur <hmazur@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/pps_kernel.h')
0 files changed, 0 insertions, 0 deletions