Re: [CFT][PATCH] proc: Update /proc/net to point at the accessing threads network namespace

From: Alexey Dobriyan
Date: Fri Sep 30 2022 - 10:01:16 EST


Al wrote:

> Just to troll adobriyan a bit:
>
> static const char *dynamic_get_link(struct delayed_call *done,
> bool is_rcu,
> const char *fmt, ...)
> {
> va_list args;
> char *body;
>
> va_start(args, fmt);
> body = kvasprintf(is_rcu ? GFP_ATOMIC : GFP_KERNEL, fmt, args);
> va_end(args);

Ouch... Double pass over data. Who wrote this?

>
> if (unlikely(!body))
> return is_rcu ? ERR_PTR(-ECHILD) : ERR_PTR(-ENOMEM);
> set_delayed_call(done, kfree_link, body);
> return body;
> }