Skip to contentSkip to conversation

proc: Update /proc/net to point at the accessing threads network namespace

PATCH Alexey Dobriyan 1 participant 1 message Sep 30, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 12 lines · Al

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?

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