lkml.org 
[lkml]   [2023]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 7/8] selftests/mm: refactor uffd_poll_thread to allow custom fault handlers
On Thu, Jul 06, 2023 at 03:50:35PM -0700, Axel Rasmussen wrote:
> @@ -247,9 +245,13 @@ static int userfaultfd_stress(void)
> {
> void *area;
> unsigned long nr;
> - struct uffd_args args[nr_cpus];
> + struct uffd_args *args;
> uint64_t mem_size = nr_pages * page_size;
>
> + args = calloc(nr_cpus, sizeof(struct uffd_args));
> + if (!args)
> + err("allocating args array failed");

This is trivial, but I think I requested a "free" (or keep it allocate on
stack) in previous version but it didn't get a response on why we cannot
and it kept going.. could you help explain?

--
Peter Xu

\
 
 \ /
  Last update: 2023-07-07 15:44    [W:0.096 / U:3.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site