diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-12-23 02:05:07 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-12-23 02:05:07 +0300 |
commit | ef5b28372c565128bdce7a59bc78402a8ce68e1b (patch) | |
tree | 77f549fcf73f8400a34e7a5d51548fafd1533644 /net/core/scm.c | |
parent | 5c2b2176ead1911d652b8848169bb44bdde75ca8 (diff) | |
parent | 4ad9843e1ea088bd2529290234c6c4c6374836a7 (diff) | |
download | linux-ef5b28372c565128bdce7a59bc78402a8ce68e1b.tar.xz |
Merge tag 'kvm-riscv-fixes-6.7-1' of https://github.com/kvm-riscv/linux into kvm-master
KVM/riscv fixes for 6.7, take #1
- Fix a race condition in updating external interrupt for
trap-n-emulated IMSIC swfile
- Fix print_reg defaults in get-reg-list selftest
Diffstat (limited to 'net/core/scm.c')
-rw-r--r-- | net/core/scm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index 880027ecf516..7dc47c17d863 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -26,6 +26,7 @@ #include <linux/nsproxy.h> #include <linux/slab.h> #include <linux/errqueue.h> +#include <linux/io_uring.h> #include <linux/uaccess.h> @@ -103,6 +104,11 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) if (fd < 0 || !(file = fget_raw(fd))) return -EBADF; + /* don't allow io_uring files */ + if (io_uring_get_socket(file)) { + fput(file); + return -EINVAL; + } *fpp++ = file; fpl->count++; } |