mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 09:36:39 -04:00
Merge tag 'v6.18rc1-part1-ksmbd-server-fixes' of git://git.samba.org/ksmbd
Pull smb server fixes from Steve French: - Fix potential UAFs and corruptions in rpc open and close - Fix copy_file_range when ranges overlap - Improve session, share, connection lookup performance - Fix potential hash collisions in share and session lists - Debugging improvement - making per-connection threads easier to identify - Improve socket creation - Fix return code mapping for posix query fs info - Add support for limiting the maximum number of connections per IP address, extending the existing connection limiting mechanism to enforce per-IP connection limits alongside the global connection limit * tag 'v6.18rc1-part1-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: increase session and share hash table bits ksmbd: replace connection list with hash table ksmbd: add an error print when maximum IP connections limit is reached ksmbd: add max ip connections parameter ksmbd: fix error code overwriting in smb2_get_info_filesystem() ksmbd: copy overlapped range within the same file ksmbd: use sock_create_kern interface to create kernel socket ksmbd: make ksmbd thread names distinct by client IP ksmbd: Fix race condition in RPC handle list access
This commit is contained in:
@@ -19,7 +19,7 @@ static DEFINE_MUTEX(init_lock);
|
||||
|
||||
static struct ksmbd_conn_ops default_conn_ops;
|
||||
|
||||
LIST_HEAD(conn_list);
|
||||
DEFINE_HASHTABLE(conn_list, CONN_HASH_BITS);
|
||||
DECLARE_RWSEM(conn_list_lock);
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ DECLARE_RWSEM(conn_list_lock);
|
||||
void ksmbd_conn_free(struct ksmbd_conn *conn)
|
||||
{
|
||||
down_write(&conn_list_lock);
|
||||
list_del(&conn->conns_list);
|
||||
hash_del(&conn->hlist);
|
||||
up_write(&conn_list_lock);
|
||||
|
||||
xa_destroy(&conn->sessions);
|
||||
@@ -77,7 +77,6 @@ struct ksmbd_conn *ksmbd_conn_alloc(void)
|
||||
|
||||
init_waitqueue_head(&conn->req_running_q);
|
||||
init_waitqueue_head(&conn->r_count_q);
|
||||
INIT_LIST_HEAD(&conn->conns_list);
|
||||
INIT_LIST_HEAD(&conn->requests);
|
||||
INIT_LIST_HEAD(&conn->async_requests);
|
||||
spin_lock_init(&conn->request_lock);
|
||||
@@ -90,19 +89,17 @@ struct ksmbd_conn *ksmbd_conn_alloc(void)
|
||||
|
||||
init_rwsem(&conn->session_lock);
|
||||
|
||||
down_write(&conn_list_lock);
|
||||
list_add(&conn->conns_list, &conn_list);
|
||||
up_write(&conn_list_lock);
|
||||
return conn;
|
||||
}
|
||||
|
||||
bool ksmbd_conn_lookup_dialect(struct ksmbd_conn *c)
|
||||
{
|
||||
struct ksmbd_conn *t;
|
||||
int bkt;
|
||||
bool ret = false;
|
||||
|
||||
down_read(&conn_list_lock);
|
||||
list_for_each_entry(t, &conn_list, conns_list) {
|
||||
hash_for_each(conn_list, bkt, t, hlist) {
|
||||
if (memcmp(t->ClientGUID, c->ClientGUID, SMB2_CLIENT_GUID_SIZE))
|
||||
continue;
|
||||
|
||||
@@ -163,9 +160,10 @@ void ksmbd_conn_unlock(struct ksmbd_conn *conn)
|
||||
void ksmbd_all_conn_set_status(u64 sess_id, u32 status)
|
||||
{
|
||||
struct ksmbd_conn *conn;
|
||||
int bkt;
|
||||
|
||||
down_read(&conn_list_lock);
|
||||
list_for_each_entry(conn, &conn_list, conns_list) {
|
||||
hash_for_each(conn_list, bkt, conn, hlist) {
|
||||
if (conn->binding || xa_load(&conn->sessions, sess_id))
|
||||
WRITE_ONCE(conn->status, status);
|
||||
}
|
||||
@@ -181,14 +179,14 @@ int ksmbd_conn_wait_idle_sess_id(struct ksmbd_conn *curr_conn, u64 sess_id)
|
||||
{
|
||||
struct ksmbd_conn *conn;
|
||||
int rc, retry_count = 0, max_timeout = 120;
|
||||
int rcount = 1;
|
||||
int rcount = 1, bkt;
|
||||
|
||||
retry_idle:
|
||||
if (retry_count >= max_timeout)
|
||||
return -EIO;
|
||||
|
||||
down_read(&conn_list_lock);
|
||||
list_for_each_entry(conn, &conn_list, conns_list) {
|
||||
hash_for_each(conn_list, bkt, conn, hlist) {
|
||||
if (conn->binding || xa_load(&conn->sessions, sess_id)) {
|
||||
if (conn == curr_conn)
|
||||
rcount = 2;
|
||||
@@ -480,10 +478,11 @@ static void stop_sessions(void)
|
||||
{
|
||||
struct ksmbd_conn *conn;
|
||||
struct ksmbd_transport *t;
|
||||
int bkt;
|
||||
|
||||
again:
|
||||
down_read(&conn_list_lock);
|
||||
list_for_each_entry(conn, &conn_list, conns_list) {
|
||||
hash_for_each(conn_list, bkt, conn, hlist) {
|
||||
t = conn->transport;
|
||||
ksmbd_conn_set_exiting(conn);
|
||||
if (t->ops->shutdown) {
|
||||
@@ -494,7 +493,7 @@ static void stop_sessions(void)
|
||||
}
|
||||
up_read(&conn_list_lock);
|
||||
|
||||
if (!list_empty(&conn_list)) {
|
||||
if (!hash_empty(conn_list)) {
|
||||
msleep(100);
|
||||
goto again;
|
||||
}
|
||||
|
||||
@@ -54,11 +54,12 @@ struct ksmbd_conn {
|
||||
u8 inet6_addr[16];
|
||||
#endif
|
||||
};
|
||||
unsigned int inet_hash;
|
||||
char *request_buf;
|
||||
struct ksmbd_transport *transport;
|
||||
struct nls_table *local_nls;
|
||||
struct unicode_map *um;
|
||||
struct list_head conns_list;
|
||||
struct hlist_node hlist;
|
||||
struct rw_semaphore session_lock;
|
||||
/* smb session 1 per user */
|
||||
struct xarray sessions;
|
||||
@@ -153,7 +154,8 @@ struct ksmbd_transport {
|
||||
#define KSMBD_TCP_SEND_TIMEOUT (5 * HZ)
|
||||
#define KSMBD_TCP_PEER_SOCKADDR(c) ((struct sockaddr *)&((c)->peer_addr))
|
||||
|
||||
extern struct list_head conn_list;
|
||||
#define CONN_HASH_BITS 12
|
||||
extern DECLARE_HASHTABLE(conn_list, CONN_HASH_BITS);
|
||||
extern struct rw_semaphore conn_list_lock;
|
||||
|
||||
bool ksmbd_conn_alive(struct ksmbd_conn *conn);
|
||||
|
||||
@@ -112,10 +112,11 @@ struct ksmbd_startup_request {
|
||||
__u32 smbd_max_io_size; /* smbd read write size */
|
||||
__u32 max_connections; /* Number of maximum simultaneous connections */
|
||||
__s8 bind_interfaces_only;
|
||||
__s8 reserved[503]; /* Reserved room */
|
||||
__u32 max_ip_connections; /* Number of maximum connection per ip address */
|
||||
__s8 reserved[499]; /* Reserved room */
|
||||
__u32 ifc_list_sz; /* interfaces list size */
|
||||
__s8 ____payload[];
|
||||
};
|
||||
} __packed;
|
||||
|
||||
#define KSMBD_STARTUP_CONFIG_INTERFACES(s) ((s)->____payload)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "../transport_ipc.h"
|
||||
#include "../misc.h"
|
||||
|
||||
#define SHARE_HASH_BITS 3
|
||||
#define SHARE_HASH_BITS 12
|
||||
static DEFINE_HASHTABLE(shares_table, SHARE_HASH_BITS);
|
||||
static DECLARE_RWSEM(shares_table_lock);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
static DEFINE_IDA(session_ida);
|
||||
|
||||
#define SESSION_HASH_BITS 3
|
||||
#define SESSION_HASH_BITS 12
|
||||
static DEFINE_HASHTABLE(sessions_table, SESSION_HASH_BITS);
|
||||
static DECLARE_RWSEM(sessions_table_lock);
|
||||
|
||||
@@ -104,29 +104,32 @@ int ksmbd_session_rpc_open(struct ksmbd_session *sess, char *rpc_name)
|
||||
if (!entry)
|
||||
return -ENOMEM;
|
||||
|
||||
down_read(&sess->rpc_lock);
|
||||
entry->method = method;
|
||||
entry->id = id = ksmbd_ipc_id_alloc();
|
||||
if (id < 0)
|
||||
goto free_entry;
|
||||
|
||||
down_write(&sess->rpc_lock);
|
||||
old = xa_store(&sess->rpc_handle_list, id, entry, KSMBD_DEFAULT_GFP);
|
||||
if (xa_is_err(old))
|
||||
if (xa_is_err(old)) {
|
||||
up_write(&sess->rpc_lock);
|
||||
goto free_id;
|
||||
}
|
||||
|
||||
resp = ksmbd_rpc_open(sess, id);
|
||||
if (!resp)
|
||||
goto erase_xa;
|
||||
if (!resp) {
|
||||
xa_erase(&sess->rpc_handle_list, entry->id);
|
||||
up_write(&sess->rpc_lock);
|
||||
goto free_id;
|
||||
}
|
||||
|
||||
up_read(&sess->rpc_lock);
|
||||
up_write(&sess->rpc_lock);
|
||||
kvfree(resp);
|
||||
return id;
|
||||
erase_xa:
|
||||
xa_erase(&sess->rpc_handle_list, entry->id);
|
||||
free_id:
|
||||
ksmbd_rpc_id_free(entry->id);
|
||||
free_entry:
|
||||
kfree(entry);
|
||||
up_read(&sess->rpc_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -144,9 +147,14 @@ void ksmbd_session_rpc_close(struct ksmbd_session *sess, int id)
|
||||
int ksmbd_session_rpc_method(struct ksmbd_session *sess, int id)
|
||||
{
|
||||
struct ksmbd_session_rpc *entry;
|
||||
int method;
|
||||
|
||||
down_read(&sess->rpc_lock);
|
||||
entry = xa_load(&sess->rpc_handle_list, id);
|
||||
return entry ? entry->method : 0;
|
||||
method = entry ? entry->method : 0;
|
||||
up_read(&sess->rpc_lock);
|
||||
|
||||
return method;
|
||||
}
|
||||
|
||||
void ksmbd_session_destroy(struct ksmbd_session *sess)
|
||||
|
||||
@@ -43,6 +43,7 @@ struct ksmbd_server_config {
|
||||
unsigned int auth_mechs;
|
||||
unsigned int max_connections;
|
||||
unsigned int max_inflight_req;
|
||||
unsigned int max_ip_connections;
|
||||
|
||||
char *conf[SERVER_CONF_WORK_GROUP + 1];
|
||||
struct task_struct *dh_task;
|
||||
|
||||
@@ -5629,7 +5629,8 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
|
||||
|
||||
if (!work->tcon->posix_extensions) {
|
||||
pr_err("client doesn't negotiate with SMB3.1.1 POSIX Extensions\n");
|
||||
rc = -EOPNOTSUPP;
|
||||
path_put(&path);
|
||||
return -EOPNOTSUPP;
|
||||
} else {
|
||||
info = (struct filesystem_posix_info *)(rsp->Buffer);
|
||||
info->OptimalTransferSize = cpu_to_le32(stfs.f_bsize);
|
||||
@@ -7361,7 +7362,7 @@ int smb2_lock(struct ksmbd_work *work)
|
||||
int nolock = 0;
|
||||
LIST_HEAD(lock_list);
|
||||
LIST_HEAD(rollback_list);
|
||||
int prior_lock = 0;
|
||||
int prior_lock = 0, bkt;
|
||||
|
||||
WORK_BUFFERS(work, req, rsp);
|
||||
|
||||
@@ -7471,7 +7472,7 @@ int smb2_lock(struct ksmbd_work *work)
|
||||
nolock = 1;
|
||||
/* check locks in connection list */
|
||||
down_read(&conn_list_lock);
|
||||
list_for_each_entry(conn, &conn_list, conns_list) {
|
||||
hash_for_each(conn_list, bkt, conn, hlist) {
|
||||
spin_lock(&conn->llist_lock);
|
||||
list_for_each_entry_safe(cmp_lock, tmp2, &conn->lock_list, clist) {
|
||||
if (file_inode(cmp_lock->fl->c.flc_file) !=
|
||||
|
||||
@@ -335,6 +335,9 @@ static int ipc_server_config_on_startup(struct ksmbd_startup_request *req)
|
||||
if (req->max_connections)
|
||||
server_conf.max_connections = req->max_connections;
|
||||
|
||||
if (req->max_ip_connections)
|
||||
server_conf.max_ip_connections = req->max_ip_connections;
|
||||
|
||||
ret = ksmbd_set_netbios_name(req->netbios_name);
|
||||
ret |= ksmbd_set_server_string(req->server_string);
|
||||
ret |= ksmbd_set_work_group(req->work_group);
|
||||
|
||||
@@ -425,6 +425,11 @@ static struct smb_direct_transport *alloc_transport(struct rdma_cm_id *cm_id)
|
||||
conn = ksmbd_conn_alloc();
|
||||
if (!conn)
|
||||
goto err;
|
||||
|
||||
down_write(&conn_list_lock);
|
||||
hash_add(conn_list, &conn->hlist, 0);
|
||||
up_write(&conn_list_lock);
|
||||
|
||||
conn->transport = KSMBD_TRANS(t);
|
||||
KSMBD_TRANS(t)->conn = conn;
|
||||
KSMBD_TRANS(t)->ops = &ksmbd_smb_direct_transport_ops;
|
||||
|
||||
@@ -86,13 +86,21 @@ static struct tcp_transport *alloc_transport(struct socket *client_sk)
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (client_sk->sk->sk_family == AF_INET6)
|
||||
if (client_sk->sk->sk_family == AF_INET6) {
|
||||
memcpy(&conn->inet6_addr, &client_sk->sk->sk_v6_daddr, 16);
|
||||
else
|
||||
conn->inet_hash = ipv6_addr_hash(&client_sk->sk->sk_v6_daddr);
|
||||
} else {
|
||||
conn->inet_addr = inet_sk(client_sk->sk)->inet_daddr;
|
||||
conn->inet_hash = ipv4_addr_hash(inet_sk(client_sk->sk)->inet_daddr);
|
||||
}
|
||||
#else
|
||||
conn->inet_addr = inet_sk(client_sk->sk)->inet_daddr;
|
||||
conn->inet_hash = ipv4_addr_hash(inet_sk(client_sk->sk)->inet_daddr);
|
||||
#endif
|
||||
down_write(&conn_list_lock);
|
||||
hash_add(conn_list, &conn->hlist, conn->inet_hash);
|
||||
up_write(&conn_list_lock);
|
||||
|
||||
conn->transport = KSMBD_TRANS(t);
|
||||
KSMBD_TRANS(t)->conn = conn;
|
||||
KSMBD_TRANS(t)->ops = &ksmbd_tcp_transport_ops;
|
||||
@@ -170,17 +178,6 @@ static struct kvec *get_conn_iovec(struct tcp_transport *t, unsigned int nr_segs
|
||||
return new_iov;
|
||||
}
|
||||
|
||||
static unsigned short ksmbd_tcp_get_port(const struct sockaddr *sa)
|
||||
{
|
||||
switch (sa->sa_family) {
|
||||
case AF_INET:
|
||||
return ntohs(((struct sockaddr_in *)sa)->sin_port);
|
||||
case AF_INET6:
|
||||
return ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ksmbd_tcp_new_connection() - create a new tcp session on mount
|
||||
* @client_sk: socket associated with new connection
|
||||
@@ -192,7 +189,6 @@ static unsigned short ksmbd_tcp_get_port(const struct sockaddr *sa)
|
||||
*/
|
||||
static int ksmbd_tcp_new_connection(struct socket *client_sk)
|
||||
{
|
||||
struct sockaddr *csin;
|
||||
int rc = 0;
|
||||
struct tcp_transport *t;
|
||||
struct task_struct *handler;
|
||||
@@ -203,27 +199,26 @@ static int ksmbd_tcp_new_connection(struct socket *client_sk)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
csin = KSMBD_TCP_PEER_SOCKADDR(KSMBD_TRANS(t)->conn);
|
||||
if (kernel_getpeername(client_sk, csin) < 0) {
|
||||
pr_err("client ip resolution failed\n");
|
||||
rc = -EINVAL;
|
||||
goto out_error;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (client_sk->sk->sk_family == AF_INET6)
|
||||
handler = kthread_run(ksmbd_conn_handler_loop,
|
||||
KSMBD_TRANS(t)->conn, "ksmbd:%pI6c",
|
||||
&KSMBD_TRANS(t)->conn->inet6_addr);
|
||||
else
|
||||
handler = kthread_run(ksmbd_conn_handler_loop,
|
||||
KSMBD_TRANS(t)->conn, "ksmbd:%pI4",
|
||||
&KSMBD_TRANS(t)->conn->inet_addr);
|
||||
#else
|
||||
handler = kthread_run(ksmbd_conn_handler_loop,
|
||||
KSMBD_TRANS(t)->conn,
|
||||
"ksmbd:%u",
|
||||
ksmbd_tcp_get_port(csin));
|
||||
KSMBD_TRANS(t)->conn, "ksmbd:%pI4",
|
||||
&KSMBD_TRANS(t)->conn->inet_addr);
|
||||
#endif
|
||||
if (IS_ERR(handler)) {
|
||||
pr_err("cannot start conn thread\n");
|
||||
rc = PTR_ERR(handler);
|
||||
free_transport(t);
|
||||
}
|
||||
return rc;
|
||||
|
||||
out_error:
|
||||
free_transport(t);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,7 +232,8 @@ static int ksmbd_kthread_fn(void *p)
|
||||
struct socket *client_sk = NULL;
|
||||
struct interface *iface = (struct interface *)p;
|
||||
struct ksmbd_conn *conn;
|
||||
int ret;
|
||||
int ret, inet_hash;
|
||||
unsigned int max_ip_conns;
|
||||
|
||||
while (!kthread_should_stop()) {
|
||||
mutex_lock(&iface->sock_release_lock);
|
||||
@@ -255,34 +251,49 @@ static int ksmbd_kthread_fn(void *p)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!server_conf.max_ip_connections)
|
||||
goto skip_max_ip_conns_limit;
|
||||
|
||||
/*
|
||||
* Limits repeated connections from clients with the same IP.
|
||||
*/
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (client_sk->sk->sk_family == AF_INET6)
|
||||
inet_hash = ipv6_addr_hash(&client_sk->sk->sk_v6_daddr);
|
||||
else
|
||||
inet_hash = ipv4_addr_hash(inet_sk(client_sk->sk)->inet_daddr);
|
||||
#else
|
||||
inet_hash = ipv4_addr_hash(inet_sk(client_sk->sk)->inet_daddr);
|
||||
#endif
|
||||
|
||||
max_ip_conns = 0;
|
||||
down_read(&conn_list_lock);
|
||||
list_for_each_entry(conn, &conn_list, conns_list)
|
||||
hash_for_each_possible(conn_list, conn, hlist, inet_hash) {
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (client_sk->sk->sk_family == AF_INET6) {
|
||||
if (memcmp(&client_sk->sk->sk_v6_daddr,
|
||||
&conn->inet6_addr, 16) == 0) {
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
&conn->inet6_addr, 16) == 0)
|
||||
max_ip_conns++;
|
||||
} else if (inet_sk(client_sk->sk)->inet_daddr ==
|
||||
conn->inet_addr) {
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
conn->inet_addr)
|
||||
max_ip_conns++;
|
||||
#else
|
||||
if (inet_sk(client_sk->sk)->inet_daddr ==
|
||||
conn->inet_addr) {
|
||||
conn->inet_addr)
|
||||
max_ip_conns++;
|
||||
#endif
|
||||
if (server_conf.max_ip_connections <= max_ip_conns) {
|
||||
pr_info_ratelimited("Maximum IP connections exceeded (%u/%u)\n",
|
||||
max_ip_conns, server_conf.max_ip_connections);
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
up_read(&conn_list_lock);
|
||||
if (ret == -EAGAIN)
|
||||
continue;
|
||||
|
||||
skip_max_ip_conns_limit:
|
||||
if (server_conf.max_connections &&
|
||||
atomic_inc_return(&active_num_conn) >= server_conf.max_connections) {
|
||||
pr_info_ratelimited("Limit the maximum number of connections(%u)\n",
|
||||
@@ -468,12 +479,13 @@ static int create_socket(struct interface *iface)
|
||||
struct socket *ksmbd_socket;
|
||||
bool ipv4 = false;
|
||||
|
||||
ret = sock_create(PF_INET6, SOCK_STREAM, IPPROTO_TCP, &ksmbd_socket);
|
||||
ret = sock_create_kern(current->nsproxy->net_ns, PF_INET6, SOCK_STREAM,
|
||||
IPPROTO_TCP, &ksmbd_socket);
|
||||
if (ret) {
|
||||
if (ret != -EAFNOSUPPORT)
|
||||
pr_err("Can't create socket for ipv6, fallback to ipv4: %d\n", ret);
|
||||
ret = sock_create(PF_INET, SOCK_STREAM, IPPROTO_TCP,
|
||||
&ksmbd_socket);
|
||||
ret = sock_create_kern(current->nsproxy->net_ns, PF_INET,
|
||||
SOCK_STREAM, IPPROTO_TCP, &ksmbd_socket);
|
||||
if (ret) {
|
||||
pr_err("Can't create socket for ipv4: %d\n", ret);
|
||||
goto out_clear;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/sched/xacct.h>
|
||||
#include <linux/crc32c.h>
|
||||
#include <linux/namei.h>
|
||||
#include <linux/splice.h>
|
||||
|
||||
#include "glob.h"
|
||||
#include "oplock.h"
|
||||
@@ -1829,8 +1830,19 @@ int ksmbd_vfs_copy_file_ranges(struct ksmbd_work *work,
|
||||
if (src_off + len > src_file_size)
|
||||
return -E2BIG;
|
||||
|
||||
ret = vfs_copy_file_range(src_fp->filp, src_off,
|
||||
dst_fp->filp, dst_off, len, 0);
|
||||
/*
|
||||
* vfs_copy_file_range does not allow overlapped copying
|
||||
* within the same file.
|
||||
*/
|
||||
if (file_inode(src_fp->filp) == file_inode(dst_fp->filp) &&
|
||||
dst_off + len > src_off &&
|
||||
dst_off < src_off + len)
|
||||
ret = do_splice_direct(src_fp->filp, &src_off,
|
||||
dst_fp->filp, &dst_off,
|
||||
min_t(size_t, len, MAX_RW_COUNT), 0);
|
||||
else
|
||||
ret = vfs_copy_file_range(src_fp->filp, src_off,
|
||||
dst_fp->filp, dst_off, len, 0);
|
||||
if (ret == -EOPNOTSUPP || ret == -EXDEV)
|
||||
ret = vfs_copy_file_range(src_fp->filp, src_off,
|
||||
dst_fp->filp, dst_off, len,
|
||||
|
||||
Reference in New Issue
Block a user