提交 74f430cd 编写于 作者: S Sasha Levin 提交者: Kees Cook

Yama: use atomic allocations when reporting

Access reporting often happens from atomic contexes. Avoid
lockups when allocating memory for command lines.

Fixes: 8a56038c ("Yama: consolidate error reporting")
Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
上级 470bf1f2
......@@ -47,8 +47,8 @@ static void report_access(const char *access, struct task_struct *target,
{
char *target_cmd, *agent_cmd;
target_cmd = kstrdup_quotable_cmdline(target, GFP_KERNEL);
agent_cmd = kstrdup_quotable_cmdline(agent, GFP_KERNEL);
target_cmd = kstrdup_quotable_cmdline(target, GFP_ATOMIC);
agent_cmd = kstrdup_quotable_cmdline(agent, GFP_ATOMIC);
pr_notice_ratelimited(
"ptrace %s of \"%s\"[%d] was attempted by \"%s\"[%d]\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册