Re: [PATCH v2 10/12] bsd-user: do_freebsd_sysctl helper for sysctl(2)

2023-02-14 Thread Richard Henderson
On 2/13/23 14:27, Warner Losh wrote: +int32_t *snamep = g_malloc(sizeof(int32_t) * namelen), *p, *q, i; g_new(int32_t, namelen) +unlock_user(holdp, oldp, holdlen); +unlock_user(holdp, oldp, ret == 0 ? holdlen : 0); double-unlock. clearly the first line is extra. Otherwise, Rev

[PATCH v2 10/12] bsd-user: do_freebsd_sysctl helper for sysctl(2)

2023-02-13 Thread Warner Losh
From: Kyle Evans Implement the wrapper function for sysctl(2). This puts the oid arguments into a standard form and calls the common do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son