Skip to content

Commit

Permalink
create_detached_idmapped_mount: avoid double close
Browse files Browse the repository at this point in the history
fd_userns is defined as __do_close, so if it is not -EBADF, it will
be closed on exit.  So we need to either set it to -EBADF after closing
it, or just not manually close it.

My mistake in reviewing the previous patch.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
  • Loading branch information
hallyn committed May 25, 2024
1 parent c7d025b commit 1b7da94
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion shared/idmap/shift_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ static int create_detached_idmapped_mount(const char *path, const char *fstype)
if (ret < 0)
return -errno;
close(fd_userns);
return 0;
}
*/
Expand Down

0 comments on commit 1b7da94

Please sign in to comment.