aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorXin Liu <[email protected]>2022-12-23 21:36:18 +0800
committerAlexei Starovoitov <[email protected]>2022-12-28 14:03:51 -0800
commit07453245620c075779abefa2a9f469fa336e7510 (patch)
tree27d0c2b236c8e450653d4ed66dc48dac97a85f5f /lib/netdev-notifier-error-inject.c
parent4633a00682589931e8415c166979d8e5dd174282 (diff)
libbpf: fix errno is overwritten after being closed.
In the ensure_good_fd function, if the fcntl function succeeds but the close function fails, ensure_good_fd returns a normal fd and sets errno, which may cause users to misunderstand. The close failure is not a serious problem, and the correct FD has been handed over to the upper-layer application. Let's restore errno here. Signed-off-by: Xin Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions