Re: [PATCH] libbpf: set close-on-exec flag on gzopen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/10, Martin Kelly wrote:
> From: Marco Vedovati <marco.vedovati@xxxxxxxxxxxxxxx>
> 
> Enable the close-on-exec flag when using gzopen
> 
> This is especially important for multithreaded programs making use of
> libbpf, where a fork + exec could race with libbpf library calls,
> potentially resulting in a file descriptor leaked to the new process.

We do have fopen(, "re") all over the place; gzopen seem to pass mode
to fopen.

Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
Fixes: 8601fd422148 ("libbpf: Allow to augment system Kconfig through extra optional config")

For fixes, not sure whether anybody actually builds libbpf from the kernel
tree...




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux