Commit 1d79f6e9 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

autofs: collect new pipe fd as used

This is essential to make sure, that we won't use the same pipe descriptor for
different pipes.
Otherwise we can run into problem with fd send via unix sockets.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Tested-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 4d4d5c0f
......@@ -704,6 +704,7 @@ static int autofs_create_fle(struct pstree_item *task, FdinfoEntry *fe,
struct file_desc *desc)
{
struct fdinfo_list_entry *le;
struct rst_info *rst_info = rsti(task);
le = shmalloc(sizeof(*le) + sizeof(int));
if (!le)
......@@ -714,7 +715,9 @@ static int autofs_create_fle(struct pstree_item *task, FdinfoEntry *fe,
le->pid = task->pid.virt;
le->fe = fe;
collect_gen_fd(le, rsti(task));
collect_gen_fd(le, rst_info);
collect_used_fd(le, rst_info);
list_add_tail(&le->desc_list, &desc->fd_info_head);
le->desc = desc;
......
Markdown is supported
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