Skip to content
Commit db803036 authored by Vincent Minet's avatar Vincent Minet Committed by Jakub Kicinski
Browse files

umh: fix memory leak on execve failure



If a UMH process created by fork_usermode_blob() fails to execute,
a pair of struct file allocated by umh_pipe_setup() will leak.

Under normal conditions, the caller (like bpfilter) needs to manage the
lifetime of the UMH and its two pipes. But when fork_usermode_blob()
fails, the caller doesn't really have a way to know what needs to be
done. It seems better to do the cleanup ourselves in this case.

Fixes: 449325b5 ("umh: introduce fork_usermode_blob() helper")
Signed-off-by: default avatarVincent Minet <v.minet@criteo.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 14d8f748
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment