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

Alexey Dobriyan
2022-09-30T14:01:15Z

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;
> }