We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d953975 commit 4969f8aCopy full SHA for 4969f8a
kernel/pid.c
@@ -42,6 +42,7 @@
42
#include <linux/sched/signal.h>
43
#include <linux/sched/task.h>
44
#include <linux/idr.h>
45
+#include <net/sock.h>
46
47
struct pid init_struct_pid = {
48
.count = REFCOUNT_INIT(1),
@@ -642,10 +643,12 @@ static int pidfd_getfd(struct pid *pid, int fd)
642
643
}
644
645
ret = get_unused_fd_flags(O_CLOEXEC);
- if (ret < 0)
646
+ if (ret < 0) {
647
fput(file);
- else
648
+ } else {
649
+ __receive_sock(file);
650
fd_install(ret, file);
651
+ }
652
653
return ret;
654
0 commit comments