Kernel
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- 57 participants
- 19199 discussions

[PATCH OLK-6.6] driver inclusion category feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBWWHE
by zhangmingqian 27 Apr '25
by zhangmingqian 27 Apr '25
27 Apr '25
---
fs/lockd/clntlock.c | 1 +
fs/lockd/host.c | 11 +-
fs/nfs/Kconfig | 11 ++
fs/nfs/Makefile | 5 +-
fs/nfs/client.c | 28 +++-
fs/nfs/dir.c | 11 +-
fs/nfs/enfs/Makefile | 6 +
fs/nfs/enfs_adapter.c | 292 +++++++++++++++++++++++++++++++++++
fs/nfs/enfs_adapter.h | 62 ++++++++
fs/nfs/fs_context.c | 50 +++++-
fs/nfs/internal.h | 3 +
fs/nfs/nfs3xdr.c | 66 ++++++++
fs/nfs/nfs4client.c | 27 +++-
fs/nfs/nfs4proc.c | 14 +-
fs/nfs/nfs4state.c | 64 +++++++-
fs/nfs/super.c | 17 +-
include/linux/lockd/lockd.h | 1 +
include/linux/nfs_fs_sb.h | 13 ++
include/linux/nfs_xdr.h | 6 +
include/linux/sunrpc/clnt.h | 53 +++++++
include/linux/sunrpc/sched.h | 3 +
include/linux/sunrpc/xprt.h | 2 +
include/linux/sunrpc/xprtmultipath.h | 5 +
net/sunrpc/.kunitconfig | 29 ++++
net/sunrpc/clnt.c | 269 +++++++++++++++++++++++++++++++-
net/sunrpc/sched.c | 15 +-
net/sunrpc/xprt.c | 126 ++++++++++++++-
net/sunrpc/xprtmultipath.c | 14 +-
28 files changed, 1167 insertions(+), 37 deletions(-)
create mode 100644 fs/nfs/enfs/Makefile
create mode 100644 fs/nfs/enfs_adapter.c
create mode 100644 fs/nfs/enfs_adapter.h
create mode 100644 net/sunrpc/.kunitconfig
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index 5d85715..226eb1e 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -222,6 +222,7 @@ nlmclnt_recovery(struct nlm_host *host)
"(%ld)\n", host->h_name, PTR_ERR(task));
}
}
+EXPORT_SYMBOL_GPL(nlmclnt_recovery);
static int
reclaimer(void *ptr)
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 127a728..7a16f48 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -31,6 +31,8 @@
#define NLM_HOST_EXPIRE (300 * HZ)
#define NLM_HOST_COLLECT (120 * HZ)
+#define ENFS_CAPABILITY_LSID_SUPPORT 0x0002 /* lsversion query capability */
+
static struct hlist_head nlm_server_hosts[NLM_HOST_NRHASH];
static struct hlist_head nlm_client_hosts[NLM_HOST_NRHASH];
@@ -446,7 +448,7 @@ nlm_bind_host(struct nlm_host *host)
.to_initval = increment,
.to_increment = increment,
.to_maxval = increment * 6UL,
- .to_retries = 5U,
+ .to_retries = 0,
};
struct rpc_create_args args = {
.net = host->net,
@@ -569,10 +571,17 @@ void nlm_host_rebooted(const struct net *net, const struct nlm_reboot *info)
* To avoid processing a host several times, we match the nsmstate.
*/
while ((host = next_host_state(nlm_server_hosts, nsm, info)) != NULL) {
+ if (host->enfs_flag & ENFS_CAPABILITY_LSID_SUPPORT) {
+ continue;
+ }
nlmsvc_free_host_resources(host);
nlmsvc_release_host(host);
}
while ((host = next_host_state(nlm_client_hosts, nsm, info)) != NULL) {
+ if (host->enfs_flag & ENFS_CAPABILITY_LSID_SUPPORT) {
+ dprintk("lockd: ignore nsm notify. \n");
+ continue;
+ }
nlmclnt_recovery(host);
nlmclnt_release_host(host);
}
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index 7df2503..4bf6090 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -212,3 +212,14 @@ config NFS_V4_2_READ_PLUS
default y
help
Choose Y here to enable use of the NFS v4.2 READ_PLUS operation.
+
+config ENFS
+ tristate "NFS client support for ENFS"
+ depends on NFS_FS
+ default n
+ help
+ This option enables support multipath of the NFS protocol
+ in the kernel's NFS client.
+ This feature will improve performance and reliability.
+
+ If sure, say Y.
diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
index 5f6db37..ed2786c 100644
--- a/fs/nfs/Makefile
+++ b/fs/nfs/Makefile
@@ -9,7 +9,7 @@ CFLAGS_nfstrace.o += -I$(src)
nfs-y := client.o dir.o file.o getroot.o inode.o super.o \
io.o direct.o pagelist.o read.o symlink.o unlink.o \
write.o namespace.o mount_clnt.o nfstrace.o \
- export.o sysfs.o fs_context.o
+ export.o sysfs.o fs_context.o enfs_adapter.o
nfs-$(CONFIG_ROOT_NFS) += nfsroot.o
nfs-$(CONFIG_SYSCTL) += sysctl.o
nfs-$(CONFIG_NFS_FSCACHE) += fscache.o
@@ -35,3 +35,6 @@ nfsv4-$(CONFIG_NFS_V4_2) += nfs42proc.o nfs42xattr.o
obj-$(CONFIG_PNFS_FILE_LAYOUT) += filelayout/
obj-$(CONFIG_PNFS_BLOCK) += blocklayout/
obj-$(CONFIG_PNFS_FLEXFILE_LAYOUT) += flexfilelayout/
+CONFIG_ENFS=m
+obj-$(CONFIG_ENFS) += enfs/
+
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index d9b10c4..0995d34 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -44,7 +44,8 @@
#include "callback.h"
#include "delegation.h"
#include "iostat.h"
-#include "internal.h"
+//#include "internal.h"
+#include "enfs_adapter.h"
#include "fscache.h"
#include "pnfs.h"
#include "nfs.h"
@@ -241,6 +242,7 @@ void nfs_free_client(struct nfs_client *clp)
put_nfs_version(clp->cl_nfs_mod);
kfree(clp->cl_hostname);
kfree(clp->cl_acceptor);
+ nfs_free_multi_path_client(clp);
kfree(clp);
}
EXPORT_SYMBOL_GPL(nfs_free_client);
@@ -315,20 +317,30 @@ again:
continue;
/* Match the full socket address */
- if (!rpc_cmp_addr_port(sap, clap))
+ if (!rpc_cmp_addr_port(sap, clap)) {
+ if (data->enfs_option != NULL) {
+ continue;
+ } else {
/* Match all xprt_switch full socket addresses */
if (IS_ERR(clp->cl_rpcclient) ||
!rpc_clnt_xprt_switch_has_addr(clp->cl_rpcclient,
sap))
continue;
-
+ }
+ }
+ if (!nfs_multipath_client_match(clp->cl_multipath_data, data->enfs_option)) {
+ printk("not match client src %p dst %p.\n", clp->cl_multipath_data, data->enfs_option);
+ continue;
+ }
/* Match the xprt security policy */
if (clp->cl_xprtsec.policy != data->xprtsec.policy)
continue;
refcount_inc(&clp->cl_count);
+ printk("match client %p.\n", clp);
return clp;
}
+ printk("not match client .\n");
return NULL;
}
@@ -516,6 +528,7 @@ int nfs_create_rpc_client(struct nfs_client *clp,
.xprtsec = cl_init->xprtsec,
.connect_timeout = cl_init->connect_timeout,
.reconnect_timeout = cl_init->reconnect_timeout,
+ .multipath_option = cl_init->enfs_option,
};
if (test_bit(NFS_CS_DISCRTRY, &clp->cl_flags))
@@ -650,6 +663,14 @@ struct nfs_client *nfs_init_client(struct nfs_client *clp,
if (clp->cl_cons_state == NFS_CS_READY)
return clp;
+ error = nfs_create_multi_path_client(clp, cl_init);
+ if (error < 0) {
+ printk("nfs_create_multi_path_client faild.%d\n.", error);
+ nfs_put_client(clp);
+ clp = ERR_PTR(error);
+ return clp;
+ }
+
/*
* Create a client RPC handle for doing FSSTAT with UNIX auth only
* - RFC 2623, sec 2.3.2
@@ -684,6 +705,7 @@ static int nfs_init_server(struct nfs_server *server,
.nconnect = ctx->nfs_server.nconnect,
.init_flags = (1UL << NFS_CS_REUSEPORT),
.xprtsec = ctx->xprtsec,
+ .enfs_option = ctx->enfs_option
};
struct nfs_client *clp;
int error;
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 39f7549..0ea4d8a 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -43,7 +43,7 @@
#include "delegation.h"
#include "iostat.h"
-#include "internal.h"
+#include "enfs_adapter.h"
#include "fscache.h"
#include "nfstrace.h"
@@ -1360,6 +1360,11 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int whence)
return offset;
}
+bool nfs_check_have_lookup_cache_flag(struct nfs_server *server, int flag)
+{
+ return enfs_check_have_lookup_cache_flag(server, flag);
+}
+
/*
* All directory operations under NFS are synchronous, so fsync()
* is a dummy operation.
@@ -1506,7 +1511,7 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry,
{
if (IS_ROOT(dentry))
return 1;
- if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONE)
+ if (nfs_check_have_lookup_cache_flag(NFS_SERVER(dir), NFS_MOUNT_LOOKUP_CACHE_NONE))
return 0;
if (!nfs_dentry_verify_change(dir, dentry))
return 0;
@@ -1610,7 +1615,7 @@ int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,
{
if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0;
- if (NFS_SERVER(dir)->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG)
+ if (nfs_check_have_lookup_cache_flag(NFS_SERVER(dir), NFS_MOUNT_LOOKUP_CACHE_NONEG))
return 1;
/* Case insensitive server? Revalidate negative dentries */
if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE))
diff --git a/fs/nfs/enfs/Makefile b/fs/nfs/enfs/Makefile
new file mode 100644
index 0000000..5720a74
--- /dev/null
+++ b/fs/nfs/enfs/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Makefile for the nfs multipath kernel module
+#
+obj-$(CONFIG_ENFS) += enfs.o
+enfs-y := enfs_init.o enfs_multipath_client.o enfs_multipath_parse.o
diff --git a/fs/nfs/enfs_adapter.c b/fs/nfs/enfs_adapter.c
new file mode 100644
index 0000000..6668d24
--- /dev/null
+++ b/fs/nfs/enfs_adapter.c
@@ -0,0 +1,292 @@
+#include <linux/types.h>
+#include <linux/sunrpc/clnt.h>
+#include <linux/nfs.h>
+#include <linux/nfs4.h>
+#include <linux/nfs3.h>
+#include <linux/nfs_fs.h>
+#include <linux/nfs_fs_sb.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/nfs_iostat.h>
+#include <linux/nfs_mount.h>
+#include "enfs_adapter.h"
+#include "iostat.h"
+
+struct enfs_adapter_ops __rcu *enfs_adapter;
+
+static DEFINE_MUTEX(enfs_module_mutex);
+static void * enfs_adapter_data;
+
+void *enfs_adapter_get_data(void)
+{
+ return enfs_adapter_data;
+}
+EXPORT_SYMBOL_GPL(enfs_adapter_get_data);
+
+void enfs_adapter_set_data(void *data)
+{
+ enfs_adapter_data = data;
+}
+EXPORT_SYMBOL_GPL(enfs_adapter_set_data);
+
+int enfs_adapter_register(struct enfs_adapter_ops *ops)
+{
+ struct enfs_adapter_ops *old;
+
+ old = cmpxchg((struct enfs_adapter_ops **)&enfs_adapter, NULL, ops);
+ if (old == NULL || old == ops)
+ return 0;
+ printk(KERN_ERR "regist enfs_adapter ops %p fail. old %p\n", ops, old);
+ return -EPERM;
+}
+EXPORT_SYMBOL_GPL(enfs_adapter_register);
+
+int enfs_adapter_unregister(struct enfs_adapter_ops *ops)
+{
+ struct enfs_adapter_ops *old;
+
+ old = cmpxchg((struct enfs_adapter_ops **)&enfs_adapter, ops, NULL);
+ if (old == ops || old == NULL)
+ return 0;
+ printk(KERN_ERR "unregist enfs_adapter ops %p fail. old %p\n", ops, old);
+ return -EPERM;
+}
+EXPORT_SYMBOL_GPL(enfs_adapter_unregister);
+
+struct enfs_adapter_ops *nfs_multipath_router_get(void)
+{
+ struct enfs_adapter_ops *ops;
+
+ rcu_read_lock();
+ ops = rcu_dereference(enfs_adapter);
+ if (ops == NULL) {
+ rcu_read_unlock();
+ return NULL;
+ }
+ if (!try_module_get(ops->owner))
+ ops = NULL;
+ rcu_read_unlock();
+ return ops;
+}
+
+void nfs_multipath_router_put(struct enfs_adapter_ops *ops)
+{
+ if (ops)
+ module_put(ops->owner);
+}
+
+bool is_valid_option(enum nfsmultipathoptions option)
+{
+ if (option < REMOTEADDR || option >= INVALID_OPTION) {
+ printk(KERN_WARNING "ENFS: invalid option %d\n", option);
+ return false;
+ }
+
+ return true;
+}
+
+int enfs_parse_mount_options(enum nfsmultipathoptions option, char *str, struct nfs_fs_context *mnt, struct fs_context *fc)
+{
+
+ //parseMultiPathOptions(getNfsMultiPathOpt(token), string, mnt);
+
+ int rc;
+ struct enfs_adapter_ops *ops;
+
+ // whether insert enfs.ko or not
+ ops = nfs_multipath_router_get();
+ if (ops == NULL) {
+ dfprintk(MOUNT, "eNFS: prepare loading eNFS module[%s]\n", __FUNCTION__);
+ mutex_lock(&enfs_module_mutex);
+ rc = request_module("enfs");
+ mutex_unlock(&enfs_module_mutex);
+
+ if (rc) {
+ dfprintk(MOUNT, "eNFS: failed loading eNFS module[%s]\n", __FUNCTION__);
+ return -EOPNOTSUPP;
+ }
+
+ ops = nfs_multipath_router_get();
+ }
+
+ if ((ops == NULL) || (ops->parse_mount_options == NULL) || !is_valid_option(option)) {
+ nfs_multipath_router_put(ops);
+ dfprintk(MOUNT, "NFS: parsing nfs mount option enfs not load[%s]\n", __FUNCTION__);
+ return -EOPNOTSUPP;
+ }
+ // nfs_multipath_parse_options
+ dfprintk(MOUNT, "NFS: parsing nfs mount option '%s' type: %d[%s]\n", str, option, __FUNCTION__);
+ rc = ops->parse_mount_options(option, str, &mnt->enfs_option, fc->net_ns);
+ nfs_multipath_router_put(ops);
+ return rc;
+}
+
+void enfs_free_mount_options(struct nfs_fs_context *data)
+{
+ struct enfs_adapter_ops *ops;
+
+ if (data->enfs_option == NULL)
+ return;
+
+ ops = nfs_multipath_router_get();
+ if ((ops == NULL) || (ops->free_mount_options == NULL)) {
+ nfs_multipath_router_put(ops);
+ return;
+ }
+ ops->free_mount_options((void *)&data->enfs_option);
+ nfs_multipath_router_put(ops);
+}
+
+int nfs_create_multi_path_client(struct nfs_client *client, const struct nfs_client_initdata *cl_init)
+{
+ int ret = 0;
+ struct enfs_adapter_ops *ops;
+
+ if (cl_init->enfs_option == NULL)
+ return 0;
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->client_info_init != NULL)
+ ret = ops->client_info_init((void *)&client->cl_multipath_data, cl_init);
+ nfs_multipath_router_put(ops);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(nfs_create_multi_path_client);
+
+void nfs_free_multi_path_client(struct nfs_client *clp)
+{
+ struct enfs_adapter_ops *ops;
+
+ if (clp->cl_multipath_data == NULL)
+ return;
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->client_info_free != NULL)
+ ops->client_info_free(clp->cl_multipath_data);
+ nfs_multipath_router_put(ops);
+}
+
+int nfs_multipath_client_match(void *src, void *dst)
+{
+ int ret = true;
+ struct enfs_adapter_ops *ops;
+ printk("nfs_multipath_client_match src %p dst %p\n.", src, dst);
+ if (src == NULL && dst == NULL)
+ return true;
+
+ if ((src == NULL && dst) || (src && dst == NULL))
+ return false;
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->client_info_match != NULL)
+ ret = ops->client_info_match(src, dst);
+ nfs_multipath_router_put(ops);
+
+ return ret;
+}
+
+int nfs4_multipath_client_match(void *src, void *dst)
+{
+ int ret = true;
+ struct enfs_adapter_ops *ops;
+ if (src == NULL && dst == NULL)
+ return true;
+
+ if (src == NULL || dst == NULL)
+ return false;
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->nfs4_client_info_match != NULL)
+ ret = ops->nfs4_client_info_match(src, dst);
+ nfs_multipath_router_put(ops);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(nfs4_multipath_client_match);
+
+void nfs_multipath_show_client_info(struct seq_file *mount_option, struct nfs_server *server)
+{
+ struct enfs_adapter_ops *ops;
+
+ if (mount_option == NULL || server == NULL || server->client == NULL || server->nfs_client->cl_multipath_data == NULL)
+ return;
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->client_info_show != NULL)
+ ops->client_info_show(mount_option, server);
+ nfs_multipath_router_put(ops);
+}
+
+int nfs_remount_iplist(struct nfs_client *nfs_client, void *enfs_option)
+{
+ int ret = 0;
+ struct enfs_adapter_ops *ops;
+
+ if (nfs_client == NULL || nfs_client->cl_rpcclient == NULL) {
+ return 0;
+ }
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->remount_ip_list != NULL)
+ ret = ops->remount_ip_list(nfs_client, enfs_option);
+ nfs_multipath_router_put(ops);
+ return ret;
+}
+EXPORT_SYMBOL_GPL(nfs_remount_iplist);
+
+void nfs_multipath_set_mount_data(void **opt, const char *hostname)
+{
+ struct enfs_adapter_ops *ops = nfs_multipath_router_get();
+ int rc;
+
+ if (ops == NULL) {
+ dfprintk(MOUNT, "eNFS: prepare loading eNFS module[%s]\n", __FUNCTION__);
+ mutex_lock(&enfs_module_mutex);
+ rc = request_module("enfs");
+ mutex_unlock(&enfs_module_mutex);
+
+ if (rc) {
+ dfprintk(MOUNT, "eNFS: failed loading eNFS module[%s]\n", __FUNCTION__);
+ }
+ ops = nfs_multipath_router_get();
+ }
+
+ if (ops != NULL && ops->set_mount_data != NULL)
+ ops->set_mount_data(opt, hostname);
+ nfs_multipath_router_put(ops);
+}
+EXPORT_SYMBOL_GPL(nfs_multipath_set_mount_data);
+
+bool enfs_check_have_lookup_cache_flag(struct nfs_server *server, int flag)
+{
+ /*
+ rule:
+ 1. first check user lookupcache flag match or not
+ 2. then if user lookupcache option is positive/none, will ignore server lookupcache flag.
+ if user lookupcache option is all, will check server lookupcache flag.
+
+ we don't use enfs ops to check, because during upgrade ops will be null, it will cause
+ result will change when upgrade.
+ */
+ if (server->flags & flag)
+ return true;
+
+ if (server->flags & (NFS_MOUNT_LOOKUP_CACHE_NONE | NFS_MOUNT_LOOKUP_CACHE_NONEG))
+ return false;
+
+ return ((server->enfs_flags & flag) ? true : false);
+}
+EXPORT_SYMBOL_GPL(enfs_check_have_lookup_cache_flag);
+
+void enfs_trigger_get_server_capability(struct nfs_server *server)
+{
+ struct enfs_adapter_ops *ops;
+
+ ops = nfs_multipath_router_get();
+ if (ops != NULL && ops->trigger_get_capability != NULL)
+ ops->trigger_get_capability(server);
+ nfs_multipath_router_put(ops);
+
+ return;
+}
+EXPORT_SYMBOL_GPL(enfs_trigger_get_server_capability);
diff --git a/fs/nfs/enfs_adapter.h b/fs/nfs/enfs_adapter.h
new file mode 100644
index 0000000..d27e745
--- /dev/null
+++ b/fs/nfs/enfs_adapter.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Client-side ENFS adapt header.
+ *
+ * Copyright (c) 2023. Huawei Technologies Co., Ltd. All rights reserved.
+ */
+
+#ifndef _NFS_MULTIPATH_H_
+#define _NFS_MULTIPATH_H_
+
+#include "internal.h"
+
+enum nfsmultipathoptions {
+ REMOTEADDR,
+ LOCALADDR,
+ INVALID_OPTION
+};
+
+/* enfs_flag in struct nfs_server bitmap define */
+#define ENFS_SERVER_FLAG_GET_CAP_RUNNING 0x1 /* enfs get capability rpc task is running or pendding */
+#define ENFS_SERVER_FLAG_LOOKUP_CACHE_NOREG 0x10000 /* NFS_MOUNT_LOOKUP_CACHE_NONEG, don't change value */
+#define ENFS_SERVER_FLAG_LOOKUP_CACHE_NONE 0x20000 /* NFS_MOUNT_LOOKUP_CACHE_NONE, don't change value */
+
+struct enfs_adapter_ops {
+ const char *name;
+ struct module *owner;
+ //int (*alloc_mount_option)
+ int (*parse_mount_options)(enum nfsmultipathoptions option, char *str, void **enfs_option, struct net *net_ns);
+ void (*free_mount_options)(void **data);
+
+ //void *(*dup_mount_options)(struct nfs_fs_context *ctx);
+ int (*client_info_init)(void **data, const struct nfs_client_initdata *cl_init);
+ void (*client_info_free)(void *data);
+ int (*client_info_match)(void *src, void *dst);
+ int (*nfs4_client_info_match)(void *src, void *dst);
+ void (*client_info_show)(struct seq_file *mount_option, void *data);
+ // int (*client_info_clone)(struct nfs_server *src, struct nfs_server *dst,
+ // rpc_authflavor_t flavor);
+ // struct rpc_clnt *(*get_best_conn)(struct nfs_client *clp, struct nfs_fh *fh);
+ // void (*conn_set_unavailable)(struct nfs_client *clp, struct rpc_clnt *clnt);
+ int (*remount_ip_list)(struct nfs_client *nfs_client, void *enfs_option);
+ void (*set_mount_data)(void **opt, const char *hostname);
+ void (*trigger_get_capability)(struct nfs_server *server);
+};
+
+void *enfs_adapter_get_data(void);
+void enfs_adapter_set_data(void *data);
+
+int enfs_parse_mount_options(enum nfsmultipathoptions option, char *str, struct nfs_fs_context *mnt, struct fs_context *fc);
+void enfs_free_mount_options(struct nfs_fs_context *data);
+int nfs_create_multi_path_client(struct nfs_client *client, const struct nfs_client_initdata *cl_init);
+void nfs_multipath_set_mount_data(void **opt, const char *hostname);
+void nfs_free_multi_path_client(struct nfs_client *clp);
+int nfs_multipath_client_match(void *src, void *dst);
+int nfs4_multipath_client_match(void *src, void *dst);
+void nfs_multipath_show_client_info(struct seq_file *mount_option, struct nfs_server *server);
+int enfs_adapter_register(struct enfs_adapter_ops *ops);
+int enfs_adapter_unregister(struct enfs_adapter_ops *ops);
+int nfs_remount_iplist(struct nfs_client *nfs_client, void *enfs_option);
+bool enfs_check_have_lookup_cache_flag(struct nfs_server *server, int flag);
+void enfs_trigger_get_server_capability(struct nfs_server *server);
+#endif
\ No newline at end of file
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index 41126d6..47e8915 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -22,7 +22,8 @@
#include <net/handshake.h>
#include "nfs.h"
-#include "internal.h"
+// #include "internal.h"
+#include "enfs_adapter.h"
#include "nfstrace.h"
@@ -92,6 +93,11 @@ enum nfs_param {
Opt_wsize,
Opt_write,
Opt_xprtsec,
+ Opt_remote_addrs,
+ Opt_local_iplist,
+ Opt_enfs_info,
+ Opt_slookupcache,
+ Opt_alookupcache,
};
enum {
@@ -199,6 +205,11 @@ static const struct fs_parameter_spec nfs_fs_parameters[] = {
fsparam_enum ("write", Opt_write, nfs_param_enums_write),
fsparam_u32 ("wsize", Opt_wsize),
fsparam_string("xprtsec", Opt_xprtsec),
+ fsparam_string("localaddrs", Opt_local_iplist),
+ fsparam_string("remoteaddrs", Opt_remote_addrs),
+ fsparam_string("enfs_info", Opt_enfs_info),
+ fsparam_string("slookupcache", Opt_slookupcache),
+ fsparam_string("alookupcache", Opt_alookupcache),
{}
};
@@ -356,6 +367,19 @@ out_invalid_xprtsec_policy:
return nfs_invalf(fc, "NFS: Transport does not support xprtsec");
}
+enum nfsmultipathoptions getNfsMultiPathOpt(int token)
+{
+ switch (token) {
+ case Opt_remote_addrs: {
+ return REMOTEADDR;
+ }
+ case Opt_local_iplist: {
+ return LOCALADDR;
+ }
+ }
+ return INVALID_OPTION;
+}
+
/*
* For text based NFSv2/v3 mounts, the mount protocol transport default
* settings should depend upon the specified NFS transport.
@@ -899,6 +923,17 @@ static int nfs_fs_context_parse_param(struct fs_context *fc,
goto out_invalid_value;
}
break;
+ case Opt_local_iplist:
+ case Opt_remote_addrs:
+ switch (enfs_parse_mount_options(getNfsMultiPathOpt(opt), param->string, ctx, fc)) {
+ case 0: break;
+ case -ENOMEM: goto out_nomem;
+ case -ENOSPC: goto out_limit;
+ case -EINVAL: goto out_invalid_address;
+ case -ENOTSUPP: goto out_invalid_address;
+ case -EOPNOTSUPP : goto out_invalid_address;
+ }
+ break;
case Opt_write:
trace_nfs_mount_assign(param->key, param->string);
switch (result.uint_32) {
@@ -925,6 +960,12 @@ static int nfs_fs_context_parse_param(struct fs_context *fc,
case Opt_sloppy:
ctx->sloppy = true;
break;
+ case Opt_enfs_info:
+ case Opt_slookupcache:
+ case Opt_alookupcache:
+ break;
+ default:
+ dfprintk(MOUNT, "NFS: unrecognized mount option");
}
return 0;
@@ -937,6 +978,10 @@ out_of_bounds:
return nfs_invalf(fc, "NFS: Value for '%s' out of range", param->key);
out_bad_transport:
return nfs_invalf(fc, "NFS: Unrecognized transport protocol");
+out_limit:
+ return nfs_invalf(fc, "NFS: param is more than supported limit");
+out_nomem:
+ return nfs_invalf(fc, "NFS: not enough memory to parse option");
}
/*
@@ -1453,6 +1498,7 @@ static int nfs_fs_context_validate(struct fs_context *fc)
ret = nfs_parse_source(fc, max_namelen, max_pathlen);
if (ret < 0)
return ret;
+ nfs_multipath_set_mount_data(&ctx->enfs_option, ctx->nfs_server.hostname);
/* Load the NFS protocol module if we haven't done so yet */
if (!ctx->nfs_mod) {
@@ -1537,6 +1583,7 @@ static int nfs_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc)
ctx->nfs_server.hostname = NULL;
ctx->fscache_uniq = NULL;
ctx->clone_data.fattr = NULL;
+ ctx->enfs_option = NULL;
fc->fs_private = ctx;
return 0;
}
@@ -1555,6 +1602,7 @@ static void nfs_fs_context_free(struct fs_context *fc)
kfree(ctx->nfs_server.export_path);
kfree(ctx->nfs_server.hostname);
kfree(ctx->fscache_uniq);
+ enfs_free_mount_options(ctx);
nfs_free_fhandle(ctx->mntfh);
nfs_free_fattr(ctx->clone_data.fattr);
kfree(ctx);
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index a92b234..2be753a 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -84,6 +84,7 @@ struct nfs_client_initdata {
struct xprtsec_parms xprtsec;
unsigned long connect_timeout;
unsigned long reconnect_timeout;
+ void *enfs_option; /* struct multipath_mount_options */
};
/*
@@ -151,6 +152,8 @@ struct nfs_fs_context {
struct nfs_fattr *fattr;
unsigned int inherited_bsize;
} clone_data;
+
+ void *enfs_option; /* struct multipath_mount_options */
};
#define nfs_errorf(fc, fmt, ...) ((fc)->log.log ? \
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index 60f032b..49b5038 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -23,9 +23,12 @@
#include <linux/nfsacl.h>
#include "nfstrace.h"
#include "internal.h"
+#include "linux/nfs_xdr.h"
#define NFSDBG_FACILITY NFSDBG_XDR
+#define EXTEND_CMD_MAX_BUF_LEN 819200 /* 800K */
+
/* Mapping from NFS error code to "errno" error code. */
#define errno_NFSERR_IO EIO
@@ -65,6 +68,7 @@
#define NFS3_readdirargs_sz (NFS3_fh_sz+NFS3_cookieverf_sz+3)
#define NFS3_readdirplusargs_sz (NFS3_fh_sz+NFS3_cookieverf_sz+4)
#define NFS3_commitargs_sz (NFS3_fh_sz+3)
+#define NFS3_extendargs_sz (4 + XDR_QUADLEN(EXTEND_CMD_MAX_BUF_LEN))
#define NFS3_getattrres_sz (1+NFS3_fattr_sz)
#define NFS3_setattrres_sz (1+NFS3_wcc_data_sz)
@@ -82,6 +86,7 @@
#define NFS3_fsinfores_sz (1+NFS3_post_op_attr_sz+12)
#define NFS3_pathconfres_sz (1+NFS3_post_op_attr_sz+6)
#define NFS3_commitres_sz (1+NFS3_wcc_data_sz+2)
+#define NFS3_extendres_sz (1 + 4 + XDR_QUADLEN(EXTEND_CMD_MAX_BUF_LEN))
#define ACL3_getaclargs_sz (NFS3_fh_sz+1)
#define ACL3_setaclargs_sz (NFS3_fh_sz+1+ \
@@ -1369,6 +1374,17 @@ static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req,
#endif /* CONFIG_NFS_V3_ACL */
+static void nfs3_xdr_enc_extend3args(struct rpc_rqst *req,
+ struct xdr_stream *xdr, const void *data)
+{
+ const struct nfs_extend_xdr_arg *encArg = data;
+ __be32 *p;
+
+ WARN_ON_ONCE(encArg->buflen > EXTEND_CMD_MAX_BUF_LEN);
+ p = xdr_reserve_space(xdr, 4 + encArg->buflen);
+ xdr_encode_opaque(p, encArg->pBuf, encArg->buflen);
+}
+
/*
* NFSv3 XDR decode functions
*
@@ -2440,6 +2456,52 @@ out_default:
#endif /* CONFIG_NFS_V3_ACL */
+static int nfs3_xdr_dec_extend3res(struct rpc_rqst *req, struct xdr_stream *xdr,
+ void *result)
+{
+ enum nfs_stat status;
+ int error;
+ struct nfs_extend_xdr_arg *decArg = result;
+ int length;
+ __be32 *p;
+
+ // check the status
+ error = decode_nfsstat3(xdr, &status);
+ if (unlikely(error))
+ goto out;
+ if (status != NFS3_OK)
+ goto out_default;
+
+ // important for upgrade scenario
+ memset(decArg->pBuf, '\0', decArg->maxsize);
+
+ // decode legth of opaque data
+ p = xdr_inline_decode(xdr, 4);
+ if (unlikely(!p)) {
+ return -EIO;
+ }
+ length = be32_to_cpup(p++);
+ if (unlikely(length > decArg->maxsize)) {
+ dprintk("NFS: response size (%u) too big , max_size is %d\n", length,
+ decArg->maxsize);
+ return -E2BIG;
+ }
+ // decode length number of bytes
+ p = xdr_inline_decode(xdr, length);
+ if (unlikely(!p)) {
+ return -EIO;
+ }
+
+ decArg->buflen = length;
+ memcpy(decArg->pBuf, p, decArg->buflen);
+ dprintk("NFS: extend response size (%u)\n", length);
+
+out:
+ return error;
+out_default:
+ return nfs3_stat_to_errno(status);
+}
+
/*
* We need to translate between nfs status return values and
@@ -2517,6 +2579,8 @@ static int nfs3_stat_to_errno(enum nfs_stat status)
.p_name = #proc, \
}
+#define NFS3PROC_EXTEND 22
+
const struct rpc_procinfo nfs3_procedures[] = {
PROC(GETATTR, getattr, getattr, 1),
PROC(SETATTR, setattr, setattr, 0),
@@ -2539,7 +2603,9 @@ const struct rpc_procinfo nfs3_procedures[] = {
PROC(FSINFO, getattr, fsinfo, 0),
PROC(PATHCONF, getattr, pathconf, 0),
PROC(COMMIT, commit, commit, 5),
+ PROC(EXTEND, extend, extend, 0),
};
+EXPORT_SYMBOL_GPL(nfs3_procedures);
static unsigned int nfs_version3_counts[ARRAY_SIZE(nfs3_procedures)];
const struct rpc_version nfs_version3 = {
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index ac80f87..a56c61c 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -11,7 +11,8 @@
#include <linux/sunrpc/xprt.h>
#include <linux/sunrpc/bc_xprt.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
-#include "internal.h"
+//#include "internal.h"
+#include "enfs_adapter.h"
#include "callback.h"
#include "delegation.h"
#include "nfs4session.h"
@@ -456,6 +457,14 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp,
if (error < 0)
goto error;
+ error = nfs_create_multi_path_client(clp, cl_init);
+ if (error < 0) {
+ printk("nfs4_create_multi_path_client faild.%d\n.", error);
+ nfs_put_client(clp);
+ clp = ERR_PTR(error);
+ return clp;
+ }
+
error = nfs4_discover_server_trunking(clp, &old);
if (error < 0)
goto error;
@@ -566,6 +575,9 @@ static int nfs4_match_client(struct nfs_client *pos, struct nfs_client *new,
if (!nfs4_match_client_owner_id(pos, new))
return 1;
+ if (!nfs4_multipath_client_match(pos->cl_multipath_data, new->cl_multipath_data))
+ return 1;
+
return 0;
}
@@ -901,7 +913,8 @@ static int nfs4_set_client(struct nfs_server *server,
u32 minorversion, unsigned int nconnect,
unsigned int max_connect,
struct net *net,
- struct xprtsec_parms *xprtsec)
+ struct xprtsec_parms *xprtsec,
+ void *enfs_option)
{
struct nfs_client_initdata cl_init = {
.hostname = hostname,
@@ -915,6 +928,7 @@ static int nfs4_set_client(struct nfs_server *server,
.timeparms = timeparms,
.cred = server->cred,
.xprtsec = *xprtsec,
+ .enfs_option = enfs_option,
};
struct nfs_client *clp;
@@ -1177,7 +1191,8 @@ static int nfs4_init_server(struct nfs_server *server, struct fs_context *fc)
ctx->nfs_server.nconnect,
ctx->nfs_server.max_connect,
fc->net_ns,
- &ctx->xprtsec);
+ &ctx->xprtsec,
+ ctx->enfs_option);
if (error < 0)
return error;
@@ -1268,7 +1283,7 @@ struct nfs_server *nfs4_create_referral_server(struct fs_context *fc)
parent_client->cl_nconnect,
parent_client->cl_max_connect,
parent_client->cl_net,
- &parent_client->cl_xprtsec);
+ &parent_client->cl_xprtsec, NULL);
if (!error)
goto init_server;
#endif /* IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) */
@@ -1288,7 +1303,7 @@ struct nfs_server *nfs4_create_referral_server(struct fs_context *fc)
parent_client->cl_nconnect,
parent_client->cl_max_connect,
parent_client->cl_net,
- &parent_client->cl_xprtsec);
+ &parent_client->cl_xprtsec, NULL);
if (error < 0)
goto error;
@@ -1363,7 +1378,7 @@ int nfs4_update_server(struct nfs_server *server, const char *hostname,
clp->cl_proto, clnt->cl_timeout,
clp->cl_minorversion,
clp->cl_nconnect, clp->cl_max_connect,
- net, &clp->cl_xprtsec);
+ net, &clp->cl_xprtsec, NULL);
clear_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status);
if (error != 0) {
nfs_server_insert_lists(server);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 4b12e45..6d7e8c5 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -8884,7 +8884,7 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, const struct cred *cre
if (clp->cl_serverscope != NULL &&
!nfs41_same_server_scope(clp->cl_serverscope,
- resp->server_scope)) {
+ resp->server_scope) && clp->cl_multipath_data == NULL) {
dprintk("%s: server_scope mismatch detected\n",
__func__);
set_bit(NFS4CLNT_SERVER_SCOPE_MISMATCH, &clp->cl_state);
@@ -9014,10 +9014,14 @@ static int nfs4_proc_destroy_clientid(struct nfs_client *clp,
for (loop = NFS4_MAX_LOOP_ON_RECOVER; loop != 0; loop--) {
ret = _nfs4_proc_destroy_clientid(clp, cred);
switch (ret) {
- case -NFS4ERR_DELAY:
- case -NFS4ERR_CLIENTID_BUSY:
- ssleep(1);
- break;
+ case -NFS4ERR_DELAY: {
+ ssleep(1);
+ break;
+ }
+ case -NFS4ERR_CLIENTID_BUSY: {
+ msleep(200);
+ break;
+ }
default:
return ret;
}
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 8515d3d..955b4e3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -318,9 +318,70 @@ static void nfs41_finish_session_reset(struct nfs_client *clp)
nfs4_setup_state_renewal(clp);
}
+static DEFINE_MUTEX(g_nfs41_clntid_cachelist_lock);
+static LIST_HEAD(g_nfs41_clntid_cachelist);
+
+typedef struct {
+ struct list_head list_node;
+ u64 nfs41_clntid;
+} nfs4_clntid_locknode;
+
+static nfs4_clntid_locknode *_nfs41_get_clntid_locknode(u64 clientid)
+{
+ nfs4_clntid_locknode *node = NULL;
+ nfs4_clntid_locknode *ret_node = NULL;
+
+ mutex_lock(&g_nfs41_clntid_cachelist_lock);
+ list_for_each_entry(node, &g_nfs41_clntid_cachelist, list_node) {
+ if (node->nfs41_clntid != clientid)
+ continue;
+ ret_node = node;
+ break;
+ }
+
+ if (ret_node != NULL) {
+ mutex_unlock(&g_nfs41_clntid_cachelist_lock);
+ return NULL;
+ }
+
+ ret_node = (nfs4_clntid_locknode *)kzalloc(sizeof(nfs4_clntid_locknode), GFP_NOFS);
+ if (ret_node == NULL) {
+ printk("NFSv41: Failed to alloc clntid lock node %llu.\n", clientid);
+ mutex_unlock(&g_nfs41_clntid_cachelist_lock);
+ return NULL;
+ }
+ INIT_LIST_HEAD(&ret_node->list_node);
+ ret_node->nfs41_clntid = clientid;
+ list_add_tail(&ret_node->list_node, &g_nfs41_clntid_cachelist);
+ mutex_unlock(&g_nfs41_clntid_cachelist_lock);
+
+ return ret_node;
+}
+
+static void _nfs41_put_clntid_locknode(nfs4_clntid_locknode *lock_node)
+{
+ if (lock_node == NULL) {
+ return;
+ }
+
+ mutex_lock(&g_nfs41_clntid_cachelist_lock);
+ list_del(&lock_node->list_node);
+ kfree(lock_node);
+ mutex_unlock(&g_nfs41_clntid_cachelist_lock);
+ return;
+}
+
int nfs41_init_clientid(struct nfs_client *clp, const struct cred *cred)
{
int status;
+ nfs4_clntid_locknode *node = NULL;
+
+ node = _nfs41_get_clntid_locknode(clp->cl_clientid);
+ if (node == NULL) {
+ status = -EAGAIN; // finally goes to nfs4_handle_reclaim_lease_error, will retry 1s later
+ printk_ratelimited("NFSv41: get clntid %llu lock node failed, retry later.\n", clp->cl_clientid);
+ goto out;
+ }
if (test_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state))
goto do_confirm;
@@ -337,6 +398,7 @@ do_confirm:
nfs41_finish_session_reset(clp);
nfs_mark_client_ready(clp, NFS_CS_READY);
out:
+ _nfs41_put_clntid_locknode(node);
return status;
}
@@ -375,7 +437,7 @@ int nfs41_discover_server_trunking(struct nfs_client *clp,
* server via Transparent State Migration.
*/
if (clp->cl_exchange_flags & EXCHGID4_FLAG_CONFIRMED_R) {
- if (!test_bit(NFS_CS_TSM_POSSIBLE, &clp->cl_flags))
+ if ((!test_bit(NFS_CS_TSM_POSSIBLE, &clp->cl_flags)) && (clp->cl_multipath_data == NULL))
set_bit(NFS4CLNT_PURGE_STATE, &clp->cl_state);
else
set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index e1bcad5..4a95f8a 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -66,7 +66,8 @@
#include "callback.h"
#include "delegation.h"
#include "iostat.h"
-#include "internal.h"
+//#include "internal.h"
+#include "enfs_adapter.h"
#include "fscache.h"
#include "nfs4session.h"
#include "pnfs.h"
@@ -559,6 +560,7 @@ int nfs_show_options(struct seq_file *m, struct dentry *root)
seq_printf(m, ",addr=%s",
rpc_peeraddr2str(nfss->nfs_client->cl_rpcclient,
RPC_DISPLAY_ADDR));
+ nfs_multipath_show_client_info(m, nfss);
rcu_read_unlock();
return 0;
@@ -663,6 +665,7 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
seq_puts(m, root->d_sb->s_flags & SB_NOATIME ? ",noatime" : "");
seq_puts(m, root->d_sb->s_flags & SB_NODIRATIME ? ",nodiratime" : "");
nfs_show_mount_options(m, nfss, 1);
+ nfs_multipath_show_client_info(m, nfss);
seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ);
@@ -1013,6 +1016,7 @@ nfs_compare_remount_data(struct nfs_server *nfss,
int nfs_reconfigure(struct fs_context *fc)
{
+ int error;
struct nfs_fs_context *ctx = nfs_fc2context(fc);
struct super_block *sb = fc->root->d_sb;
struct nfs_server *nfss = sb->s_fs_info;
@@ -1029,6 +1033,14 @@ int nfs_reconfigure(struct fs_context *fc)
if (ctx->skip_reconfig_option_check)
return 0;
+ if (ctx->enfs_option) {
+ error = nfs_remount_iplist(nfss->nfs_client, ctx->enfs_option);
+ if (error) {
+ /* release remount option member */
+ enfs_free_mount_options(ctx);
+ return error;
+ }
+ }
/*
* noac is a special case. It implies -o sync, but that's not
* necessarily reflected in the mtab options. reconfigure_super
@@ -1332,6 +1344,9 @@ int nfs_get_tree_common(struct fs_context *fc)
s->s_flags |= SB_ACTIVE;
error = 0;
+ if (server)
+ enfs_trigger_get_server_capability(server);
+
out:
return error;
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 0f016d6..b6d6b09 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -73,6 +73,7 @@ struct nlm_host {
const struct cred *h_cred;
char nodename[UNX_MAXNODENAME + 1];
const struct nlmclnt_operations *h_nlmclnt_ops; /* Callback ops for NLM users */
+ int enfs_flag; /* enfs falgs */
};
/*
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 86d96e0..3959896 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -124,6 +124,7 @@ struct nfs_client {
char cl_ipaddr[48];
struct net *cl_net;
struct list_head pending_cb_stateids;
+ void *cl_multipath_data; /* multi path private structure (struct multipath_client_info *) */
};
/*
@@ -265,6 +266,7 @@ struct nfs_server {
const struct cred *cred;
bool has_sec_mnt_opts;
struct kobject kobj;
+ int enfs_flags; /* ENFS_SERVER_FLAG_xx */
};
/* Server capabilities */
@@ -294,4 +296,15 @@ struct nfs_server {
#define NFS_CAP_READ_PLUS (1U << 29)
#define NFS_CAP_FS_LOCATIONS (1U << 30)
#define NFS_CAP_MOVEABLE (1U << 31)
+
+/* use for kernel's nfsclient structure for refcount_t clp_count */
+static inline void nfsclient_refinc(refcount_t *ref_count)
+{
+ refcount_inc(ref_count);
+}
+
+static inline void nfsclient_refdec(refcount_t *ref_count)
+{
+ refcount_dec(ref_count);
+}
#endif
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 12bbb5c..0dafbbb 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1725,6 +1725,12 @@ struct nfs_renamedata {
bool cancelled;
};
+struct nfs_extend_xdr_arg {
+ int maxsize;
+ int buflen;
+ char *pBuf;
+};
+
struct nfs_access_entry;
struct nfs_client;
struct rpc_timeout;
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 2c52acf..0b0753b 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -38,6 +38,31 @@ struct rpc_sysfs_client {
struct rpc_xprt_switch *xprt_switch;
};
+struct rpc_clnt_reserve {
+ atomic_t cl_count; /* Number of references */
+ unsigned int cl_clid; /* client id */
+ struct list_head cl_clients; /* Global list of clients */
+ struct list_head cl_tasks; /* List of tasks */
+ spinlock_t cl_lock; /* spinlock */
+ struct rpc_xprt __rcu * cl_xprt; /* transport */
+ const struct rpc_procinfo *cl_procinfo; /* procedure info */
+ u32 cl_prog, /* RPC program number */
+ cl_vers, /* RPC version number */
+ cl_maxproc; /* max procedure number */
+
+ struct rpc_auth * cl_auth; /* authenticator */
+ struct rpc_stat * cl_stats; /* per-program statistics */
+ struct rpc_iostats * cl_metrics; /* per-client statistics */
+
+ unsigned int cl_softrtry : 1,/* soft timeouts */
+ cl_discrtry : 1,/* disconnect before retry */
+ cl_noretranstimeo: 1,/* No retransmit timeouts */
+ cl_autobind : 1,/* use getport() */
+ cl_chatty : 1,/* be verbose */
+ cl_reserve : 11,/* reserve bits */
+ cl_enfs : 1;/* be enfs */
+};
+
/*
* The high-level client handle
@@ -164,6 +189,7 @@ struct rpc_create_args {
KABI_RESERVE(1)
KABI_RESERVE(2)
+ void *multipath_option;
};
struct rpc_add_xprt_test {
@@ -236,6 +262,7 @@ void rpc_force_rebind(struct rpc_clnt *);
size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t);
const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t);
int rpc_localaddr(struct rpc_clnt *, struct sockaddr *, size_t);
+int rpc_localalladdr(struct rpc_xprt *xprt, struct sockaddr *buf, size_t buflen);
int rpc_clnt_iterate_for_each_xprt(struct rpc_clnt *clnt,
int (*fn)(struct rpc_clnt *, struct rpc_xprt *, void *),
@@ -273,6 +300,9 @@ bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt,
void rpc_clnt_xprt_set_online(struct rpc_clnt *clnt, struct rpc_xprt *xprt);
void rpc_clnt_disconnect(struct rpc_clnt *clnt);
void rpc_cleanup_clids(void);
+int rpc_clnt_test_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt, const struct rpc_call_ops *ops, void *data, int flags);
+
+struct rpc_xprt *rpc_task_get_next_xprt(struct rpc_clnt *clnt);
static inline int rpc_reply_expected(struct rpc_task *task)
{
@@ -285,4 +315,27 @@ static inline void rpc_task_close_connection(struct rpc_task *task)
if (task->tk_xprt)
xprt_force_disconnect(task->tk_xprt);
}
+
+struct rpc_multipath_ops {
+ struct module *owner;
+ void (*create_clnt)(struct rpc_create_args *args, struct rpc_clnt *clnt);
+ void (*releas_clnt)(struct rpc_clnt *clnt);
+ void (*create_xprt)(struct rpc_xprt *xprt);
+ void (*destroy_xprt)(struct rpc_xprt *xprt);
+ void (*xprt_iostat)(struct rpc_task *task);
+ void (*failover_handle)(struct rpc_task *task);
+ void (*adjust_task_timeout)(struct rpc_task *task, void *condition);
+ void (*init_task_req)(struct rpc_task *task, struct rpc_rqst *req);
+ bool (*prepare_transmit)(struct rpc_task *task);
+ void (*set_transport)(struct rpc_task *task, struct rpc_clnt *clnt);
+ void (*inc_queuelen)(struct rpc_xprt *xprt);
+ void (*dec_queuelen)(struct rpc_xprt *xprt);
+ void (*get_rpc_program)(struct rpc_task *task, u32 *program, u32 *version);
+ bool (*task_need_call_start_again)(struct rpc_task *task);
+};
+extern struct rpc_multipath_ops __rcu *multipath_ops;
+int rpc_multipath_ops_register(struct rpc_multipath_ops *ops);
+int rpc_multipath_ops_unregister(struct rpc_multipath_ops *ops);
+struct rpc_multipath_ops *rpc_multipath_ops_get(void);
+void rpc_multipath_ops_put(struct rpc_multipath_ops *ops);
#endif /* _LINUX_SUNRPC_CLNT_H */
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index fc35544..0c28734 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -147,6 +147,8 @@ struct rpc_task_setup {
#define RPC_TASK_NOCONNECT 0x2000 /* return ENOTCONN if not connected */
#define RPC_TASK_NO_RETRANS_TIMEOUT 0x4000 /* wait forever for a reply */
#define RPC_TASK_CRED_NOREF 0x8000 /* No refcount on the credential */
+#define RPC_TASK_FIXED 0x0004
+#define RPC_TASK_ENFS 0x0008 /* enfs rpc program task */
#define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
#define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
@@ -283,6 +285,7 @@ extern struct workqueue_struct *rpciod_workqueue;
extern struct workqueue_struct *xprtiod_workqueue;
void rpc_prepare_task(struct rpc_task *task);
gfp_t rpc_task_gfp_mask(void);
+void rpc_init_task_retry_counters(struct rpc_task *task);
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
static inline const char * rpc_qname(const struct rpc_wait_queue *q)
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 44ab7f2..d4e35f8 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -417,6 +417,8 @@ void xprt_free(struct rpc_xprt *);
void xprt_add_backlog(struct rpc_xprt *xprt, struct rpc_task *task);
bool xprt_wake_up_backlog(struct rpc_xprt *xprt, struct rpc_rqst *req);
void xprt_cleanup_ids(void);
+void *xprt_get_reserve_context(struct rpc_xprt *xprt);
+void xprt_set_reserve_context(struct rpc_xprt *xprt, void *context);
static inline int
xprt_enable_swap(struct rpc_xprt *xprt)
diff --git a/include/linux/sunrpc/xprtmultipath.h b/include/linux/sunrpc/xprtmultipath.h
index c0514c6..502d060 100644
--- a/include/linux/sunrpc/xprtmultipath.h
+++ b/include/linux/sunrpc/xprtmultipath.h
@@ -83,4 +83,9 @@ extern bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps,
extern void xprt_multipath_cleanup_ids(void);
+extern void xprt_switch_add_xprt_locked(struct rpc_xprt_switch *xps,
+ struct rpc_xprt *xprt);
+
+extern void rpc_xprt_switch_set_singular(struct rpc_xprt_switch *xps);
+
#endif
diff --git a/net/sunrpc/.kunitconfig b/net/sunrpc/.kunitconfig
new file mode 100644
index 0000000..eb02b90
--- /dev/null
+++ b/net/sunrpc/.kunitconfig
@@ -0,0 +1,29 @@
+CONFIG_KUNIT=y
+CONFIG_UBSAN=y
+CONFIG_STACKTRACE=y
+CONFIG_NET=y
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_INET=y
+CONFIG_FILE_LOCKING=y
+CONFIG_MULTIUSER=y
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CTS=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_CMAC=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_CAMELLIA=y
+CONFIG_NFS_FS=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1=y
+CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA=y
+CONFIG_RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2=y
+CONFIG_RPCSEC_GSS_KRB5_KUNIT_TEST=y
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 142ee65..2fec76d 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -54,6 +54,8 @@
static DECLARE_WAIT_QUEUE_HEAD(destroy_wait);
+struct rpc_multipath_ops __rcu *multipath_ops = NULL;
+
static void call_start(struct rpc_task *task);
static void call_reserve(struct rpc_task *task);
@@ -78,6 +80,7 @@ static int rpc_decode_header(struct rpc_task *task,
static int rpc_ping(struct rpc_clnt *clnt);
static int rpc_ping_noreply(struct rpc_clnt *clnt);
static void rpc_check_timeout(struct rpc_task *task);
+static void rpc_check_timeout_trans(struct rpc_task *task);
static void rpc_register_client(struct rpc_clnt *clnt)
{
@@ -457,11 +460,60 @@ out_no_rpciod:
return ERR_PTR(err);
}
+struct rpc_multipath_ops *rpc_multipath_ops_get(void)
+{
+ struct rpc_multipath_ops *ops;
+
+ rcu_read_lock();
+ ops = rcu_dereference(multipath_ops);
+ if (ops == NULL) {
+ rcu_read_unlock();
+ return NULL;
+ }
+ if (!try_module_get(ops->owner))
+ ops = NULL;
+ rcu_read_unlock();
+ return ops;
+}
+EXPORT_SYMBOL_GPL(rpc_multipath_ops_get);
+
+void rpc_multipath_ops_put(struct rpc_multipath_ops *ops)
+{
+ if (ops)
+ module_put(ops->owner);
+}
+EXPORT_SYMBOL_GPL(rpc_multipath_ops_put);
+
+int rpc_multipath_ops_register(struct rpc_multipath_ops *ops)
+{
+ struct rpc_multipath_ops *old;
+
+ old = cmpxchg((struct rpc_multipath_ops **)&multipath_ops, NULL, ops);
+ if (old == NULL || old == ops)
+ return 0;
+ printk(KERN_ERR "regist rpc_multipath ops %p fail. old %p\n", ops, old);
+ return -EPERM;
+}
+EXPORT_SYMBOL_GPL(rpc_multipath_ops_register);
+
+int rpc_multipath_ops_unregister(struct rpc_multipath_ops *ops)
+{
+ struct rpc_multipath_ops *old;
+
+ old = cmpxchg((struct rpc_multipath_ops **)&multipath_ops, ops, NULL);
+ if (old == NULL || old == ops)
+ return 0;
+ printk(KERN_ERR "regist rpc_multipath ops %p fail. old %p\n", ops, old);
+ return -EPERM;
+}
+EXPORT_SYMBOL_GPL(rpc_multipath_ops_unregister);
+
static struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
struct rpc_xprt *xprt)
{
struct rpc_clnt *clnt = NULL;
struct rpc_xprt_switch *xps;
+ struct rpc_multipath_ops *mops;
if (args->bc_xprt && args->bc_xprt->xpt_bc_xps) {
WARN_ON_ONCE(!(args->protocol & XPRT_TRANSPORT_BC));
@@ -496,6 +548,14 @@ static struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
}
}
+ if (args->multipath_option) {
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->create_clnt) {
+ mops->create_clnt(args, clnt);
+ }
+ rpc_multipath_ops_put(mops);
+ }
+
clnt->cl_softrtry = 1;
if (args->flags & (RPC_CLNT_CREATE_HARDRTRY|RPC_CLNT_CREATE_SOFTERR)) {
clnt->cl_softrtry = 0;
@@ -944,6 +1004,8 @@ EXPORT_SYMBOL_GPL(rpc_clnt_disconnect);
*/
void rpc_shutdown_client(struct rpc_clnt *clnt)
{
+ struct rpc_multipath_ops *mops;
+
might_sleep();
trace_rpc_clnt_shutdown(clnt);
@@ -954,6 +1016,12 @@ void rpc_shutdown_client(struct rpc_clnt *clnt)
list_empty(&clnt->cl_tasks), 1*HZ);
}
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->releas_clnt) {
+ mops->releas_clnt(clnt);
+ }
+ rpc_multipath_ops_put(mops);
+
rpc_release_client(clnt);
}
EXPORT_SYMBOL_GPL(rpc_shutdown_client);
@@ -1078,9 +1146,17 @@ struct rpc_xprt *
rpc_task_get_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt)
{
struct rpc_xprt_switch *xps;
+ struct rpc_multipath_ops *mops;
if (!xprt)
return NULL;
+
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->inc_queuelen) {
+ mops->inc_queuelen(xprt);
+ }
+ rpc_multipath_ops_put(mops);
+
rcu_read_lock();
xps = rcu_dereference(clnt->cl_xpi.xpi_xpswitch);
atomic_long_inc(&xps->xps_queuelen);
@@ -1094,6 +1170,13 @@ static void
rpc_task_release_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt)
{
struct rpc_xprt_switch *xps;
+ struct rpc_multipath_ops *mops;
+
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->dec_queuelen) {
+ mops->dec_queuelen(xprt);
+ }
+ rpc_multipath_ops_put(mops);
atomic_long_dec(&xprt->queuelen);
rcu_read_lock();
@@ -1145,15 +1228,24 @@ rpc_task_get_first_xprt(struct rpc_clnt *clnt)
return rpc_task_get_xprt(clnt, xprt);
}
-static struct rpc_xprt *
+struct rpc_xprt *
rpc_task_get_next_xprt(struct rpc_clnt *clnt)
{
return rpc_task_get_xprt(clnt, xprt_iter_get_next(&clnt->cl_xpi));
}
+EXPORT_SYMBOL_GPL(rpc_task_get_next_xprt);
static
void rpc_task_set_transport(struct rpc_task *task, struct rpc_clnt *clnt)
{
+ struct rpc_multipath_ops *mops;
+
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->set_transport) {
+ mops->set_transport(task, clnt);
+ }
+ rpc_multipath_ops_put(mops);
+
if (task->tk_xprt) {
if (!(test_bit(XPRT_OFFLINE, &task->tk_xprt->state) &&
(task->tk_flags & RPC_TASK_MOVEABLE)))
@@ -1564,6 +1656,33 @@ int rpc_localaddr(struct rpc_clnt *clnt, struct sockaddr *buf, size_t buflen)
}
EXPORT_SYMBOL_GPL(rpc_localaddr);
+int rpc_localalladdr(struct rpc_xprt *xprt, struct sockaddr *buf, size_t buflen)
+{
+ struct sockaddr_storage address;
+ struct sockaddr *sap = (struct sockaddr *)&address;
+ struct rpc_xprt *xpr;
+ struct net *net;
+ size_t salen;
+ int err;
+
+ rcu_read_lock();
+ xpr = rcu_dereference(xprt);
+ salen = xpr->addrlen;
+ memcpy(sap, &xpr->addr, salen);
+ net = get_net(xpr->xprt_net);
+ dprintk("NFS:net:%p\n", xpr->xprt_net);
+ rcu_read_unlock();
+
+ rpc_set_port(sap, 0);
+ err = rpc_sockname(net, sap, salen, buf);
+ put_net(net);
+ if (err != 0)
+ /* Couldn't discover local address, return ANYADDR */
+ return rpc_anyaddr(sap->sa_family, buf, buflen);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(rpc_localalladdr);
+
void
rpc_setbufsize(struct rpc_clnt *clnt, unsigned int sndsize, unsigned int rcvsize)
{
@@ -1621,10 +1740,19 @@ size_t rpc_max_bc_payload(struct rpc_clnt *clnt)
{
struct rpc_xprt *xprt;
size_t ret;
+ struct rpc_clnt_reserve *clnt_reserve;
+
+ clnt_reserve = (struct rpc_clnt_reserve *)clnt;
rcu_read_lock();
- xprt = rcu_dereference(clnt->cl_xprt);
+ if (clnt_reserve->cl_enfs == 0) {
+ xprt = rcu_dereference(clnt->cl_xprt);
+ } else {
+ xprt = rpc_task_get_next_xprt(clnt);
+ }
ret = xprt->ops->bc_maxpayload(xprt);
+ if (clnt_reserve->cl_enfs == 1 && xprt)
+ xprt_put(xprt);
rcu_read_unlock();
return ret;
}
@@ -1765,6 +1893,7 @@ static void call_retry_reserve(struct rpc_task *task);
static void
call_reserveresult(struct rpc_task *task)
{
+ struct rpc_multipath_ops *mpath_ops = NULL;
int status = task->tk_status;
/*
@@ -1789,6 +1918,17 @@ call_reserveresult(struct rpc_task *task)
case -EAGAIN: /* woken up; retry */
task->tk_action = call_retry_reserve;
return;
+ case -ETIMEDOUT: /* woken up; restart */
+ mpath_ops = rpc_multipath_ops_get();
+ if (mpath_ops && mpath_ops->task_need_call_start_again &&
+ mpath_ops->task_need_call_start_again(task)) {
+ rpc_multipath_ops_put(mpath_ops);
+ rpc_task_release_transport(task);
+ task->tk_action = call_start;
+ return;
+ }
+ rpc_multipath_ops_put(mpath_ops);
+ return;
default:
rpc_call_rpcerror(task, status);
}
@@ -2334,7 +2474,7 @@ call_transmit_status(struct rpc_task *task)
task->tk_status = 0;
break;
}
- rpc_check_timeout(task);
+ rpc_check_timeout_trans(task);
}
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
@@ -2500,15 +2640,84 @@ rpc_check_connected(const struct rpc_rqst *req)
}
static void
+rpc_check_timeout_trans(struct rpc_task *task)
+{
+ struct rpc_clnt *clnt = task->tk_client;
+
+ if (RPC_SIGNALLED(task)) {
+ rpc_call_rpcerror(task, -ERESTARTSYS);
+ return;
+ }
+
+ if (xprt_adjust_timeout(task->tk_rqstp) == 0) {
+ return;
+ }
+
+ trace_rpc_timeout_status(task);
+ task->tk_timeouts++;
+
+ if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(task->tk_rqstp)) {
+ rpc_call_rpcerror(task, -ETIMEDOUT);
+ return;
+ }
+
+ if (RPC_IS_SOFT(task)) {
+ /*
+ * Once a "no retrans timeout" soft tasks (a.k.a NFSv4) has
+ * been sent, it should time out only if the transport
+ * connection gets terminally broken.
+ */
+ if ((task->tk_flags & RPC_TASK_NO_RETRANS_TIMEOUT) &&
+ rpc_check_connected(task->tk_rqstp))
+ return;
+
+ if (clnt->cl_chatty) {
+ pr_notice_ratelimited(
+ "%s: server %s not responding, timed out\n",
+ clnt->cl_program->name,
+ task->tk_xprt->servername);
+ }
+ if (task->tk_flags & RPC_TASK_TIMEOUT)
+ rpc_call_rpcerror(task, -ETIMEDOUT);
+ else
+ __rpc_call_rpcerror(task, -EIO, -ETIMEDOUT);
+ return;
+ }
+
+ if (!(task->tk_flags & RPC_CALL_MAJORSEEN)) {
+ task->tk_flags |= RPC_CALL_MAJORSEEN;
+ if (clnt->cl_chatty) {
+ pr_notice_ratelimited(
+ "%s: server %s not responding, still trying\n",
+ clnt->cl_program->name,
+ task->tk_xprt->servername);
+ }
+ }
+ rpc_force_rebind(clnt);
+ /*
+ * Did our request time out due to an RPCSEC_GSS out-of-sequence
+ * event? RFC2203 requires the server to drop all such requests.
+ */
+ rpcauth_invalcred(task);
+}
+
+static void
rpc_check_timeout(struct rpc_task *task)
{
struct rpc_clnt *clnt = task->tk_client;
+ struct rpc_multipath_ops *mpath_ops = NULL;
if (RPC_SIGNALLED(task))
return;
- if (xprt_adjust_timeout(task->tk_rqstp) == 0)
- return;
+ if (xprt_adjust_timeout(task->tk_rqstp) == 0) {
+ mpath_ops = rpc_multipath_ops_get();
+ if (mpath_ops && mpath_ops->failover_handle) {
+ mpath_ops->failover_handle(task);
+ }
+ rpc_multipath_ops_put(mpath_ops);
+ return;
+ }
trace_rpc_timeout_status(task);
task->tk_timeouts++;
@@ -2630,6 +2839,19 @@ out:
}
}
+void update_rpc_program(struct rpc_task *task, u32 *cl_prog, u32 *cl_vers)
+{
+ struct rpc_multipath_ops *mops;
+
+ if (task->tk_flags & RPC_TASK_ENFS) {
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->get_rpc_program) {
+ mops->get_rpc_program(task, cl_prog, cl_vers);
+ }
+ rpc_multipath_ops_put(mops);
+ }
+}
+
static int
rpc_encode_header(struct rpc_task *task, struct xdr_stream *xdr)
{
@@ -2637,7 +2859,10 @@ rpc_encode_header(struct rpc_task *task, struct xdr_stream *xdr)
struct rpc_rqst *req = task->tk_rqstp;
__be32 *p;
int error;
+ u32 cl_prog = clnt->cl_prog;
+ u32 cl_vers = clnt->cl_vers;
+ update_rpc_program(task, &cl_prog, &cl_vers);
error = -EMSGSIZE;
p = xdr_reserve_space(xdr, RPC_CALLHDRSIZE << 2);
if (!p)
@@ -2645,8 +2870,8 @@ rpc_encode_header(struct rpc_task *task, struct xdr_stream *xdr)
*p++ = req->rq_xid;
*p++ = rpc_call;
*p++ = cpu_to_be32(RPC_VERSION);
- *p++ = cpu_to_be32(clnt->cl_prog);
- *p++ = cpu_to_be32(clnt->cl_vers);
+ *p++ = cpu_to_be32(cl_prog);
+ *p++ = cpu_to_be32(cl_vers);
*p = cpu_to_be32(task->tk_msg.rpc_proc->p_proc);
error = rpcauth_marshcred(task, xdr);
@@ -2966,6 +3191,30 @@ success:
}
EXPORT_SYMBOL_GPL(rpc_clnt_test_and_add_xprt);
+/*
+ * rpc_clnt_test_xprt - Test and add a new transport to a rpc_clnt
+ * @clnt: pointer to struct rpc_clnt
+ * @xprt: pointer struct rpc_xprt
+ * @ops: async operation
+ */
+int rpc_clnt_test_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt, const struct rpc_call_ops *ops, void *data, int flags)
+{
+ struct rpc_cred *cred;
+ struct rpc_task *task;
+
+ cred = authnull_ops.lookup_cred(NULL, NULL, 0);
+ task = rpc_call_null_helper(clnt, xprt, cred,
+ RPC_TASK_SOFT|RPC_TASK_SOFTCONN|flags,
+ ops, data);
+ put_rpccred(cred);
+ if (IS_ERR(task)){
+ return PTR_ERR(task);
+ }
+ rpc_put_task(task);
+ return 1;
+}
+EXPORT_SYMBOL_GPL(rpc_clnt_test_xprt);
+
static int rpc_clnt_add_xprt_helper(struct rpc_clnt *clnt,
struct rpc_xprt *xprt,
struct rpc_add_xprt_test *data)
@@ -3061,6 +3310,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
{
struct rpc_xprt_switch *xps;
struct rpc_xprt *xprt;
+ struct rpc_clnt_reserve *clnt_reserve;
unsigned long connect_timeout;
unsigned long reconnect_timeout;
unsigned char resvport, reuseport;
@@ -3101,7 +3351,10 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt,
connect_timeout,
reconnect_timeout);
- rpc_xprt_switch_set_roundrobin(xps);
+ clnt_reserve = (struct rpc_clnt_reserve *)clnt;
+ if (!clnt_reserve->cl_enfs) {
+ rpc_xprt_switch_set_roundrobin(xps);
+ }
if (setup) {
ret = setup(clnt, xps, xprt, data);
if (ret != 0)
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index dd3d410..f001f60 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -814,15 +814,22 @@ void rpc_prepare_task(struct rpc_task *task)
task->tk_ops->rpc_call_prepare(task, task->tk_calldata);
}
-static void
-rpc_init_task_statistics(struct rpc_task *task)
+void rpc_init_task_retry_counters(struct rpc_task *task)
{
/* Initialize retry counters */
task->tk_garb_retry = 2;
task->tk_cred_retry = 2;
+}
+EXPORT_SYMBOL_GPL(rpc_init_task_retry_counters);
+
+static void
+rpc_init_task_statistics(struct rpc_task *task)
+{
+ /* Initialize retry counters */
+ rpc_init_task_retry_counters(task);
- /* starting timestamp */
- task->tk_start = ktime_get();
+ /* starting timestamp */
+ task->tk_start = ktime_get();
}
static void
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index ab453ed..e891301 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -58,6 +58,11 @@
#include "sysfs.h"
#include "fail.h"
+struct xprt_client_private {
+ void *reserve_context;
+ char servername;
+};
+
/*
* Local variables
*/
@@ -265,6 +270,7 @@ static void xprt_clear_locked(struct rpc_xprt *xprt)
int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task)
{
struct rpc_rqst *req = task->tk_rqstp;
+ struct rpc_multipath_ops *mops = NULL;
if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
if (task == xprt->snd_task)
@@ -282,6 +288,11 @@ out_locked:
out_unlock:
xprt_clear_locked(xprt);
out_sleep:
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->adjust_task_timeout) {
+ mops->adjust_task_timeout(task, NULL);
+ }
+ rpc_multipath_ops_put(mops);
task->tk_status = -EAGAIN;
if (RPC_IS_SOFT(task))
rpc_sleep_on_timeout(&xprt->sending, task, NULL,
@@ -329,6 +340,7 @@ xprt_test_and_clear_congestion_window_wait(struct rpc_xprt *xprt)
int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
{
struct rpc_rqst *req = task->tk_rqstp;
+ struct rpc_multipath_ops *mops = NULL;
if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
if (task == xprt->snd_task)
@@ -348,6 +360,11 @@ int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task)
out_unlock:
xprt_clear_locked(xprt);
out_sleep:
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->adjust_task_timeout) {
+ mops->adjust_task_timeout(task, NULL);
+ }
+ rpc_multipath_ops_put(mops);
task->tk_status = -EAGAIN;
if (RPC_IS_SOFT(task))
rpc_sleep_on_timeout(&xprt->sending, task, NULL,
@@ -608,6 +625,15 @@ EXPORT_SYMBOL_GPL(xprt_wake_pending_tasks);
*/
void xprt_wait_for_buffer_space(struct rpc_xprt *xprt)
{
+ struct rpc_task *task = xprt->snd_task;
+ struct rpc_multipath_ops *mops = NULL;
+
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->adjust_task_timeout) {
+ mops->adjust_task_timeout(task, NULL);
+ }
+ rpc_multipath_ops_put(mops);
+
set_bit(XPRT_WRITE_SPACE, &xprt->state);
}
EXPORT_SYMBOL_GPL(xprt_wait_for_buffer_space);
@@ -1873,6 +1899,7 @@ xprt_request_init(struct rpc_task *task)
{
struct rpc_xprt *xprt = task->tk_xprt;
struct rpc_rqst *req = task->tk_rqstp;
+ struct rpc_multipath_ops *mops = NULL;
req->rq_task = task;
req->rq_xprt = xprt;
@@ -1888,6 +1915,12 @@ xprt_request_init(struct rpc_task *task)
req->rq_release_snd_buf = NULL;
xprt_init_majortimeo(task, req);
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->init_task_req) {
+ mops->init_task_req(task, req);
+ }
+ rpc_multipath_ops_put(mops);
+
trace_xprt_reserve(req);
}
@@ -1950,6 +1983,7 @@ void xprt_release(struct rpc_task *task)
{
struct rpc_xprt *xprt;
struct rpc_rqst *req = task->tk_rqstp;
+ struct rpc_multipath_ops *mops;
if (req == NULL) {
if (task->tk_client) {
@@ -1961,6 +1995,13 @@ void xprt_release(struct rpc_task *task)
xprt = req->rq_xprt;
xprt_request_dequeue_xprt(task);
+
+ mops = rpc_multipath_ops_get();
+ if (task->tk_client && mops && mops->xprt_iostat) {
+ mops->xprt_iostat(task);
+ }
+ rpc_multipath_ops_put(mops);
+
spin_lock(&xprt->transport_lock);
xprt->ops->release_xprt(xprt, task);
if (xprt->ops->release_request)
@@ -1980,6 +2021,7 @@ void xprt_release(struct rpc_task *task)
else
xprt_free_bc_request(req);
}
+EXPORT_SYMBOL_GPL(xprt_release);
#ifdef CONFIG_SUNRPC_BACKCHANNEL
void
@@ -2030,6 +2072,74 @@ static void xprt_init(struct rpc_xprt *xprt, struct net *net)
xprt->xprt_net = get_net_track(net, &xprt->ns_tracker, GFP_KERNEL);
}
+const char *xprt_set_servername(const char *s, gfp_t gfp)
+{
+ size_t len;
+ struct xprt_client_private *buf;
+
+ if (!s)
+ return NULL;
+
+ len = sizeof(struct xprt_client_private) + strlen(s) + 1;
+ buf = kmalloc(len, gfp);
+ if (buf) {
+ memset(buf, 0, len);
+ memcpy(&(buf->servername), s, strlen(s) + 1);
+ return &(buf->servername);
+ }
+ return NULL;
+}
+
+void xprt_free_servername(struct rpc_xprt *xprt)
+{
+ struct xprt_client_private *buf;
+ struct rpc_multipath_ops *mops;
+
+ if (xprt == NULL || xprt->servername == NULL) {
+ return;
+ }
+
+ buf = container_of(xprt->servername, struct xprt_client_private, servername);
+ if (buf->reserve_context) {
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->destroy_xprt) {
+ mops->destroy_xprt(xprt);
+ }
+ rpc_multipath_ops_put(mops);
+ }
+
+ kfree((void *)buf);
+ xprt->servername = NULL;
+ return;
+}
+
+void *xprt_get_reserve_context(struct rpc_xprt *xprt)
+{
+ struct xprt_client_private *buf;
+
+ if (xprt == NULL || xprt->servername == NULL) {
+ return NULL;
+ }
+
+ buf = container_of(xprt->servername, struct xprt_client_private, servername);
+ return buf->reserve_context;
+}
+EXPORT_SYMBOL_GPL(xprt_get_reserve_context);
+
+void xprt_set_reserve_context(struct rpc_xprt *xprt, void *context)
+{
+ struct xprt_client_private *buf;
+
+ if (xprt == NULL || xprt->servername == NULL) {
+ return;
+ }
+
+ buf = container_of(xprt->servername, struct xprt_client_private, servername);
+ buf->reserve_context = context;
+ return;
+}
+EXPORT_SYMBOL_GPL(xprt_set_reserve_context);
+
/**
* xprt_create_transport - create an RPC transport
* @args: rpc transport creation arguments
@@ -2039,6 +2149,7 @@ struct rpc_xprt *xprt_create_transport(struct xprt_create *args)
{
struct rpc_xprt *xprt;
const struct xprt_class *t;
+ struct rpc_multipath_ops *mops;
t = xprt_class_find_by_ident(args->ident);
if (!t) {
@@ -2063,12 +2174,23 @@ struct rpc_xprt *xprt_create_transport(struct xprt_create *args)
xprt_destroy(xprt);
return ERR_PTR(-EINVAL);
}
- xprt->servername = kstrdup(args->servername, GFP_KERNEL);
+ xprt->servername = xprt_set_servername(args->servername, GFP_KERNEL);
if (xprt->servername == NULL) {
xprt_destroy(xprt);
return ERR_PTR(-ENOMEM);
}
+ mops = rpc_multipath_ops_get();
+ if (mops && mops->create_xprt) {
+ mops->create_xprt(xprt);
+ if (!xprt_get_reserve_context(xprt)) {
+ xprt_destroy(xprt);
+ rpc_multipath_ops_put(mops);
+ return ERR_PTR(-ENOMEM);
+ }
+ }
+ rpc_multipath_ops_put(mops);
+
rpc_xprt_debugfs_register(xprt);
trace_xprt_create(xprt);
@@ -2088,7 +2210,7 @@ static void xprt_destroy_cb(struct work_struct *work)
rpc_destroy_wait_queue(&xprt->pending);
rpc_destroy_wait_queue(&xprt->sending);
rpc_destroy_wait_queue(&xprt->backlog);
- kfree(xprt->servername);
+ xprt_free_servername(xprt);
/*
* Destroy any existing back channel
*/
diff --git a/net/sunrpc/xprtmultipath.c b/net/sunrpc/xprtmultipath.c
index 720d3ba..8548891 100644
--- a/net/sunrpc/xprtmultipath.c
+++ b/net/sunrpc/xprtmultipath.c
@@ -29,7 +29,7 @@ static const struct rpc_xprt_iter_ops rpc_xprt_iter_roundrobin;
static const struct rpc_xprt_iter_ops rpc_xprt_iter_listall;
static const struct rpc_xprt_iter_ops rpc_xprt_iter_listoffline;
-static void xprt_switch_add_xprt_locked(struct rpc_xprt_switch *xps,
+void xprt_switch_add_xprt_locked(struct rpc_xprt_switch *xps,
struct rpc_xprt *xprt)
{
if (unlikely(xprt_get(xprt) == NULL))
@@ -41,6 +41,7 @@ static void xprt_switch_add_xprt_locked(struct rpc_xprt_switch *xps,
xps->xps_nxprts++;
xps->xps_nactive++;
}
+EXPORT_SYMBOL(xprt_switch_add_xprt_locked);
/**
* rpc_xprt_switch_add_xprt - Add a new rpc_xprt to an rpc_xprt_switch
@@ -91,6 +92,7 @@ void rpc_xprt_switch_remove_xprt(struct rpc_xprt_switch *xps,
spin_unlock(&xps->xps_lock);
xprt_put(xprt);
}
+EXPORT_SYMBOL(rpc_xprt_switch_remove_xprt);
static DEFINE_IDA(rpc_xprtswitch_ids);
@@ -187,6 +189,7 @@ struct rpc_xprt_switch *xprt_switch_get(struct rpc_xprt_switch *xps)
return xps;
return NULL;
}
+EXPORT_SYMBOL(xprt_switch_get);
/**
* xprt_switch_put - Release a reference to a rpc_xprt_switch
@@ -199,6 +202,7 @@ void xprt_switch_put(struct rpc_xprt_switch *xps)
if (xps != NULL)
kref_put(&xps->xps_kref, xprt_switch_free);
}
+EXPORT_SYMBOL(xprt_switch_put);
/**
* rpc_xprt_switch_set_roundrobin - Set a round-robin policy on rpc_xprt_switch
@@ -212,6 +216,13 @@ void rpc_xprt_switch_set_roundrobin(struct rpc_xprt_switch *xps)
WRITE_ONCE(xps->xps_iter_ops, &rpc_xprt_iter_roundrobin);
}
+void rpc_xprt_switch_set_singular(struct rpc_xprt_switch *xps)
+{
+ if (READ_ONCE(xps->xps_iter_ops) != &rpc_xprt_iter_singular)
+ WRITE_ONCE(xps->xps_iter_ops, &rpc_xprt_iter_singular);
+}
+EXPORT_SYMBOL(rpc_xprt_switch_set_singular);
+
static
const struct rpc_xprt_iter_ops *xprt_iter_ops(const struct rpc_xprt_iter *xpi)
{
@@ -618,6 +629,7 @@ struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi)
rcu_read_unlock();
return xprt;
}
+EXPORT_SYMBOL(xprt_iter_get_xprt);
/**
* xprt_iter_get_next - Returns the next rpc_xprt following the cursor
--
1.8.3.1
2
1
CVE-2022-49647
Chen Ridong (1):
cgroup: fix kabi for css_set
Tejun Heo (1):
cgroup: Use separate src/dst nodes when preloading css_sets for
migration
include/linux/cgroup-defs.h | 14 ++++++++++----
kernel/cgroup/cgroup.c | 37 +++++++++++++++++++++++--------------
2 files changed, 33 insertions(+), 18 deletions(-)
--
2.34.1
2
3

[openeuler:openEuler-1.0-LTS 1425/1425] kernel/sched/debug.c:990:17: error: no member named 'nr_wakeups_preferred_cpus' in 'struct dyn_affinity_stats'
by kernel test robot 25 Apr '25
by kernel test robot 25 Apr '25
25 Apr '25
Hi Hui,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 08111f03f1ec65598372cfe9bf64f366d575671e
commit: ebca52abe099caa97d7669d0acc71209ea80cfec [1425/1425] sched: Add statistics for scheduler dynamic affinity
config: x86_64-randconfig-103-20250219 (https://download.01.org/0day-ci/archive/20250425/202504251943.PQvs9XIE-lkp@…)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250425/202504251943.PQvs9XIE-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504251943.PQvs9XIE-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/sched/debug.c:815:6: warning: no previous prototype for function 'sysrq_sched_debug_tidy' [-Wmissing-prototypes]
815 | void sysrq_sched_debug_tidy(void)
| ^
kernel/sched/debug.c:815:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
815 | void sysrq_sched_debug_tidy(void)
| ^
| static
>> kernel/sched/debug.c:990:17: error: no member named 'nr_wakeups_preferred_cpus' in 'struct dyn_affinity_stats'
990 | __P(dyn_affi->nr_wakeups_preferred_cpus);
| ~~~~~~~~ ^
kernel/sched/debug.c:939:48: note: expanded from macro '__P'
939 | SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)F)
| ^
kernel/sched/debug.c:21:17: note: expanded from macro 'SEQ_printf'
21 | seq_printf(m, x); \
| ^
>> kernel/sched/debug.c:990:17: error: no member named 'nr_wakeups_preferred_cpus' in 'struct dyn_affinity_stats'
990 | __P(dyn_affi->nr_wakeups_preferred_cpus);
| ~~~~~~~~ ^
kernel/sched/debug.c:939:48: note: expanded from macro '__P'
939 | SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)F)
| ^
kernel/sched/debug.c:23:11: note: expanded from macro 'SEQ_printf'
23 | pr_cont(x); \
| ^
include/linux/printk.h:362:26: note: expanded from macro 'pr_cont'
362 | printk(KERN_CONT fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
>> kernel/sched/debug.c:991:17: error: no member named 'nr_wakeups_force_preferred_cpus' in 'struct dyn_affinity_stats'
991 | __P(dyn_affi->nr_wakeups_force_preferred_cpus);
| ~~~~~~~~ ^
kernel/sched/debug.c:939:48: note: expanded from macro '__P'
939 | SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)F)
| ^
kernel/sched/debug.c:21:17: note: expanded from macro 'SEQ_printf'
21 | seq_printf(m, x); \
| ^
>> kernel/sched/debug.c:991:17: error: no member named 'nr_wakeups_force_preferred_cpus' in 'struct dyn_affinity_stats'
991 | __P(dyn_affi->nr_wakeups_force_preferred_cpus);
| ~~~~~~~~ ^
kernel/sched/debug.c:939:48: note: expanded from macro '__P'
939 | SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)F)
| ^
kernel/sched/debug.c:23:11: note: expanded from macro 'SEQ_printf'
23 | pr_cont(x); \
| ^
include/linux/printk.h:362:26: note: expanded from macro 'pr_cont'
362 | printk(KERN_CONT fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
1 warning and 4 errors generated.
vim +990 kernel/sched/debug.c
924
925 void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
926 struct seq_file *m)
927 {
928 #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY
929 struct dyn_affinity_stats *dyn_affi = p->se.dyn_affi_stats;
930 #endif
931 unsigned long nr_switches;
932
933 SEQ_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr_ns(p, ns),
934 get_nr_threads(p));
935 SEQ_printf(m,
936 "---------------------------------------------------------"
937 "----------\n");
938 #define __P(F) \
939 SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)F)
940 #define P(F) \
941 SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)p->F)
942 #define P_SCHEDSTAT(F) \
943 SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)schedstat_val(p->F))
944 #define __PN(F) \
945 SEQ_printf(m, "%-45s:%14Ld.%06ld\n", #F, SPLIT_NS((long long)F))
946 #define PN(F) \
947 SEQ_printf(m, "%-45s:%14Ld.%06ld\n", #F, SPLIT_NS((long long)p->F))
948 #define PN_SCHEDSTAT(F) \
949 SEQ_printf(m, "%-45s:%14Ld.%06ld\n", #F, SPLIT_NS((long long)schedstat_val(p->F)))
950
951 PN(se.exec_start);
952 PN(se.vruntime);
953 PN(se.sum_exec_runtime);
954
955 nr_switches = p->nvcsw + p->nivcsw;
956
957 P(se.nr_migrations);
958
959 if (schedstat_enabled()) {
960 u64 avg_atom, avg_per_cpu;
961
962 PN_SCHEDSTAT(se.statistics.sum_sleep_runtime);
963 PN_SCHEDSTAT(se.statistics.wait_start);
964 PN_SCHEDSTAT(se.statistics.sleep_start);
965 PN_SCHEDSTAT(se.statistics.block_start);
966 PN_SCHEDSTAT(se.statistics.sleep_max);
967 PN_SCHEDSTAT(se.statistics.block_max);
968 PN_SCHEDSTAT(se.statistics.exec_max);
969 PN_SCHEDSTAT(se.statistics.slice_max);
970 PN_SCHEDSTAT(se.statistics.wait_max);
971 PN_SCHEDSTAT(se.statistics.wait_sum);
972 P_SCHEDSTAT(se.statistics.wait_count);
973 PN_SCHEDSTAT(se.statistics.iowait_sum);
974 P_SCHEDSTAT(se.statistics.iowait_count);
975 P_SCHEDSTAT(se.statistics.nr_migrations_cold);
976 P_SCHEDSTAT(se.statistics.nr_failed_migrations_affine);
977 P_SCHEDSTAT(se.statistics.nr_failed_migrations_running);
978 P_SCHEDSTAT(se.statistics.nr_failed_migrations_hot);
979 P_SCHEDSTAT(se.statistics.nr_forced_migrations);
980 P_SCHEDSTAT(se.statistics.nr_wakeups);
981 P_SCHEDSTAT(se.statistics.nr_wakeups_sync);
982 P_SCHEDSTAT(se.statistics.nr_wakeups_migrate);
983 P_SCHEDSTAT(se.statistics.nr_wakeups_local);
984 P_SCHEDSTAT(se.statistics.nr_wakeups_remote);
985 P_SCHEDSTAT(se.statistics.nr_wakeups_affine);
986 P_SCHEDSTAT(se.statistics.nr_wakeups_affine_attempts);
987 P_SCHEDSTAT(se.statistics.nr_wakeups_passive);
988 P_SCHEDSTAT(se.statistics.nr_wakeups_idle);
989 #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY
> 990 __P(dyn_affi->nr_wakeups_preferred_cpus);
> 991 __P(dyn_affi->nr_wakeups_force_preferred_cpus);
992 #endif
993
994 avg_atom = p->se.sum_exec_runtime;
995 if (nr_switches)
996 avg_atom = div64_ul(avg_atom, nr_switches);
997 else
998 avg_atom = -1LL;
999
1000 avg_per_cpu = p->se.sum_exec_runtime;
1001 if (p->se.nr_migrations) {
1002 avg_per_cpu = div64_u64(avg_per_cpu,
1003 p->se.nr_migrations);
1004 } else {
1005 avg_per_cpu = -1LL;
1006 }
1007
1008 __PN(avg_atom);
1009 __PN(avg_per_cpu);
1010 }
1011
1012 __P(nr_switches);
1013 SEQ_printf(m, "%-45s:%21Ld\n",
1014 "nr_voluntary_switches", (long long)p->nvcsw);
1015 SEQ_printf(m, "%-45s:%21Ld\n",
1016 "nr_involuntary_switches", (long long)p->nivcsw);
1017
1018 P(se.load.weight);
1019 P(se.runnable_weight);
1020 #ifdef CONFIG_SMP
1021 P(se.avg.load_sum);
1022 P(se.avg.runnable_load_sum);
1023 P(se.avg.util_sum);
1024 P(se.avg.load_avg);
1025 P(se.avg.runnable_load_avg);
1026 P(se.avg.util_avg);
1027 P(se.avg.last_update_time);
1028 P(se.avg.util_est.ewma);
1029 P(se.avg.util_est.enqueued);
1030 #endif
1031 P(policy);
1032 P(prio);
1033 if (task_has_dl_policy(p)) {
1034 P(dl.runtime);
1035 P(dl.deadline);
1036 }
1037 #undef PN_SCHEDSTAT
1038 #undef PN
1039 #undef __PN
1040 #undef P_SCHEDSTAT
1041 #undef P
1042 #undef __P
1043
1044 {
1045 unsigned int this_cpu = raw_smp_processor_id();
1046 u64 t0, t1;
1047
1048 t0 = cpu_clock(this_cpu);
1049 t1 = cpu_clock(this_cpu);
1050 SEQ_printf(m, "%-45s:%21Ld\n",
1051 "clock-delta", (long long)(t1-t0));
1052 }
1053
1054 sched_show_numa(p, m);
1055 }
1056
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:openEuler-1.0-LTS 1365/1365] drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed.
by kernel test robot 25 Apr '25
by kernel test robot 25 Apr '25
25 Apr '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 08111f03f1ec65598372cfe9bf64f366d575671e
commit: b8815fbbe89b0d15fa3296c3e57d2197a92f5bc0 [1365/1365] ACPI: CPPC: Fix cppc_cpufreq_init failed in CPU Hotplug situation
config: x86_64-randconfig-102-20250103 (https://download.01.org/0day-ci/archive/20250425/202504251932.cIMoMrVY-lkp@…)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504251932.cIMoMrVY-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed.
vim +614 drivers/acpi/cppc_acpi.c
576
577 int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data)
578 {
579 struct cpc_desc **cpc_pptr, *cpc_ptr;
580 int parsed_core_num = 0;
581 int i, ret;
582
583 cpc_pptr = kcalloc(num_possible_cpus(), sizeof(void *), GFP_KERNEL);
584 if (!cpc_pptr)
585 return -ENOMEM;
586 for_each_possible_cpu(i) {
587 cpc_pptr[i] = kzalloc(sizeof(struct cpc_desc), GFP_KERNEL);
588 if (!cpc_pptr[i]) {
589 ret = -ENOMEM;
590 goto out;
591 }
592 }
593
594 /*
595 * We can not use acpi_get_devices() to walk the processor devices
596 * because some processor device is not present.
597 */
598 ret = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
599 ACPI_UINT32_MAX, acpi_parse_cpc, NULL,
600 cpc_pptr, (void **)&parsed_core_num);
601 if (ret)
602 goto out;
603 if (parsed_core_num != num_possible_cpus()) {
604 ret = -EINVAL;
605 goto out;
606 }
607
608 ret = __acpi_get_psd_map(all_cpu_data, cpc_pptr);
609
610 out:
611 for_each_possible_cpu(i) {
612 cpc_ptr = cpc_pptr[i];
613 if (cpc_ptr)
> 614 kfree(cpc_ptr);
615 }
616 kfree(cpc_pptr);
617
618 return ret;
619 }
620 EXPORT_SYMBOL_GPL(acpi_get_psd_map);
621
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:openEuler-1.0-LTS 1353/1353] fs/debugfs/file.o: warning: objtool: full_proxy_open()+0x55a: unreachable instruction
by kernel test robot 25 Apr '25
by kernel test robot 25 Apr '25
25 Apr '25
Hi Drew,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 08111f03f1ec65598372cfe9bf64f366d575671e
commit: d4bdc26bcd632cee393b5171345d5fa6293fe42b [1353/1353] include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
config: x86_64-randconfig-122-20241226 (https://download.01.org/0day-ci/archive/20250425/202504251956.8mF9cAMB-lkp@…)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250425/202504251956.8mF9cAMB-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504251956.8mF9cAMB-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/debugfs/file.c: note: in included file (through include/linux/kernel.h, include/linux/list.h, include/linux/module.h):
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got <
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident>
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
fs/debugfs/file.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/linux/list.h, ...):
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got <
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident>
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
fs/debugfs/file.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...):
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got <
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident>
/opt/cross/clang-cd708029e0/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
>> fs/debugfs/file.o: warning: objtool: full_proxy_open()+0x55a: unreachable instruction
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:OLK-6.6 2167/2167] arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 25 Apr '25
by kernel test robot 25 Apr '25
25 Apr '25
Hi Tianrui,
First bad commit (maybe != root cause):
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 2f6f8a0f52903845ede4602b637dd1323aef3592
commit: 07db411edd838080fb7c42b9f56bc08dd60d9af6 [2167/2167] LoongArch: KVM: Enable kvm config and add the makefile
config: loongarch-randconfig-r113-20250425 (https://download.01.org/0day-ci/archive/20250425/202504251906.GEM88oi2-lkp@…)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250425/202504251906.GEM88oi2-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504251906.GEM88oi2-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: got struct cpumask *[noderef] __percpu *
>> arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: got struct cpumask *[noderef] __percpu *
>> arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: got struct cpumask *[noderef] __percpu *
>> arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:300:16: sparse: got struct cpumask *[noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: got struct cpumask *[noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: got struct cpumask *[noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: got struct cpumask *[noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got struct cpumask *[noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:327:16: sparse: got struct cpumask *[noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c: note: in included file:
include/linux/kvm_host.h:1946:54: sparse: sparse: array of flexible structures
include/linux/kvm_host.h:1948:56: sparse: sparse: array of flexible structures
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5340:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got unsigned int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: expected void *ptr
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:5350:9: sparse: got int [noderef] __percpu *
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:602:9: sparse: sparse: context imbalance in 'kvm_mmu_notifier_change_pte' - different lock contexts for basic block
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:602:9: sparse: sparse: context imbalance in 'kvm_mmu_notifier_invalidate_range_start' - different lock contexts for basic block
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:602:9: sparse: sparse: context imbalance in 'kvm_mmu_notifier_invalidate_range_end' - different lock contexts for basic block
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:602:9: sparse: sparse: context imbalance in 'kvm_mmu_notifier_clear_flush_young' - different lock contexts for basic block
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:602:9: sparse: sparse: context imbalance in 'kvm_mmu_notifier_clear_young' - different lock contexts for basic block
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:602:9: sparse: sparse: context imbalance in 'kvm_mmu_notifier_test_young' - different lock contexts for basic block
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:2678:9: sparse: sparse: context imbalance in 'hva_to_pfn_remapped' - unexpected unlock
vim +300 arch/loongarch/kvm/../../../virt/kvm/kvm_main.c
7053df4edb3ae3 Vitaly Kuznetsov 2018-05-16 289
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 290 bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
620b2438abf98f Vitaly Kuznetsov 2021-09-03 291 unsigned long *vcpu_bitmap)
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 292 {
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 293 struct kvm_vcpu *vcpu;
620b2438abf98f Vitaly Kuznetsov 2021-09-03 294 struct cpumask *cpus;
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 295 int i, me;
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 296 bool called;
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 297
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 298 me = get_cpu();
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 299
620b2438abf98f Vitaly Kuznetsov 2021-09-03 @300 cpus = this_cpu_cpumask_var_ptr(cpu_kick_mask);
620b2438abf98f Vitaly Kuznetsov 2021-09-03 301 cpumask_clear(cpus);
620b2438abf98f Vitaly Kuznetsov 2021-09-03 302
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 303 for_each_set_bit(i, vcpu_bitmap, KVM_MAX_VCPUS) {
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 304 vcpu = kvm_get_vcpu(kvm, i);
381cecc5d7b777 Vitaly Kuznetsov 2021-09-03 305 if (!vcpu)
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 306 continue;
b56bd8e03cf4d5 Jinrong Liang 2022-01-25 307 kvm_make_vcpu_request(vcpu, req, cpus, me);
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 308 }
ae0946cd360175 Vitaly Kuznetsov 2021-09-03 309
620b2438abf98f Vitaly Kuznetsov 2021-09-03 310 called = kvm_kick_many_cpus(cpus, !!(req & KVM_REQUEST_WAIT));
3cba41307a2b13 Xiao Guangrong 2011-01-12 311 put_cpu();
7053df4edb3ae3 Vitaly Kuznetsov 2018-05-16 312
7053df4edb3ae3 Vitaly Kuznetsov 2018-05-16 313 return called;
7053df4edb3ae3 Vitaly Kuznetsov 2018-05-16 314 }
7053df4edb3ae3 Vitaly Kuznetsov 2018-05-16 315
:::::: The code at line 300 was first introduced by commit
:::::: 620b2438abf98f09e19802cbc3bc2e98179cdbe2 KVM: Make kvm_make_vcpus_request_mask() use pre-allocated cpu_kick_mask
:::::: TO: Vitaly Kuznetsov <vkuznets(a)redhat.com>
:::::: CC: Paolo Bonzini <pbonzini(a)redhat.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0
Ye Bin (2):
ext4: introduce ITAIL helper
ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all()
Yongjian Sun (1):
ext4: Restore the deleted check paths of the xattr.
fs/ext4/inode.c | 5 +++++
fs/ext4/xattr.c | 15 ++++++---------
fs/ext4/xattr.h | 10 ++++++++++
3 files changed, 21 insertions(+), 9 deletions(-)
--
2.39.2
2
4

[openeuler:openEuler-1.0-LTS 1510/1510] kernel/livepatch/core.c:1013:12: warning: no previous prototype for function 'arch_klp_func_can_patch'
by kernel test robot 25 Apr '25
by kernel test robot 25 Apr '25
25 Apr '25
Hi Cheng,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 08111f03f1ec65598372cfe9bf64f366d575671e
commit: 7e2ab91ea07673f855f16b54b7c6e6853b2efc1c [1510/1510] livepatch/x86: support livepatch without ftrace
config: x86_64-randconfig-161-20250322 (https://download.01.org/0day-ci/archive/20250425/202504251813.iV5Qk4NO-lkp@…)
compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250425/202504251813.iV5Qk4NO-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504251813.iV5Qk4NO-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/livepatch/core.c:75:16: warning: no previous prototype for function 'klp_check_patch_kprobed' [-Wmissing-prototypes]
75 | struct kprobe *klp_check_patch_kprobed(struct klp_patch *patch)
| ^
kernel/livepatch/core.c:75:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
75 | struct kprobe *klp_check_patch_kprobed(struct klp_patch *patch)
| ^
| static
kernel/livepatch/core.c:402:5: warning: no previous prototype for function 'klp_try_disable_patch' [-Wmissing-prototypes]
402 | int klp_try_disable_patch(void *data)
| ^
kernel/livepatch/core.c:402:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
402 | int klp_try_disable_patch(void *data)
| ^
| static
kernel/livepatch/core.c:441:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes]
441 | void __weak arch_klp_code_modify_prepare(void)
| ^
kernel/livepatch/core.c:441:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
441 | void __weak arch_klp_code_modify_prepare(void)
| ^
| static
kernel/livepatch/core.c:445:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes]
445 | void __weak arch_klp_code_modify_post_process(void)
| ^
kernel/livepatch/core.c:445:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
445 | void __weak arch_klp_code_modify_post_process(void)
| ^
| static
kernel/livepatch/core.c:617:5: warning: no previous prototype for function 'klp_try_enable_patch' [-Wmissing-prototypes]
617 | int klp_try_enable_patch(void *data)
| ^
kernel/livepatch/core.c:617:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
617 | int klp_try_enable_patch(void *data)
| ^
| static
>> kernel/livepatch/core.c:1013:12: warning: no previous prototype for function 'arch_klp_func_can_patch' [-Wmissing-prototypes]
1013 | int __weak arch_klp_func_can_patch(struct klp_func *func)
| ^
kernel/livepatch/core.c:1013:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1013 | int __weak arch_klp_func_can_patch(struct klp_func *func)
| ^
| static
6 warnings generated.
vim +/arch_klp_func_can_patch +1013 kernel/livepatch/core.c
b700e7f03df5d9 Seth Jennings 2014-12-16 1011
453d38459f9441 Cheng Jian 2019-01-28 1012 #ifdef CONFIG_LIVEPATCH_WO_FTRACE
453d38459f9441 Cheng Jian 2019-01-28 @1013 int __weak arch_klp_func_can_patch(struct klp_func *func)
453d38459f9441 Cheng Jian 2019-01-28 1014 {
453d38459f9441 Cheng Jian 2019-01-28 1015 return 0;
453d38459f9441 Cheng Jian 2019-01-28 1016 }
453d38459f9441 Cheng Jian 2019-01-28 1017 #endif
453d38459f9441 Cheng Jian 2019-01-28 1018
:::::: The code at line 1013 was first introduced by commit
:::::: 453d38459f94417d9d5db7b75ed181a932e34ffc livepatch/arm64: fix func size less than limit
:::::: TO: Cheng Jian <cj.chengjian(a)huawei.com>
:::::: CC: Xie XiuQi <xiexiuqi(a)huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0
James Morse (2):
arm64: mpam: Add cpu_pm notifier to restore MPAM sysregs
arm64: mpam: Restore the expected MPAM sysregs on cpuhp
Zeng Heng (5):
x86/resctrl: Add a handling path of default label in
get_arch_mbm_state()
arm64/mpam: Create l2 cache monitors
fs/resctrl: Add l2 mount option to enable L2 msc
arm64/mpam: Refuse cpu offline when L2 msc is enabled
arm64/mpam: Refuse to enter powerdown state after L2 msc updated
arch/arm64/kernel/cpufeature.c | 6 +++
arch/arm64/kernel/mpam.c | 41 +++++++++++++++
arch/x86/kernel/cpu/resctrl/monitor.c | 2 +
drivers/platform/mpam/mpam_devices.c | 6 ++-
drivers/platform/mpam/mpam_internal.h | 2 +
drivers/platform/mpam/mpam_resctrl.c | 76 ++++++++++++++++++++++++---
fs/resctrl/ctrlmondata.c | 6 +++
fs/resctrl/internal.h | 2 +-
fs/resctrl/rdtgroup.c | 16 ++++++
include/linux/arm_mpam.h | 2 +
include/linux/resctrl.h | 4 ++
include/linux/resctrl_types.h | 9 ++++
12 files changed, 164 insertions(+), 8 deletions(-)
--
2.25.1
2
8

[openeuler:OLK-6.6] BUILD REGRESSION 2f6f8a0f52903845ede4602b637dd1323aef3592
by kernel test robot 25 Apr '25
by kernel test robot 25 Apr '25
25 Apr '25
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6
branch HEAD: 2f6f8a0f52903845ede4602b637dd1323aef3592 !15981 LoongArch: BPF: Fix off-by-one error in build_prologue()
Error/Warning (recently discovered and may have been fixed):
https://lore.kernel.org/oe-kbuild-all/202503290855.eVbc4pVd-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504012026.kzT6d2HZ-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504191800.HGHPELMl-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504211352.ik4vkTIa-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504240132.o0JWh6zx-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504240137.L2xvmv1X-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504240208.n1driNHi-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504240404.3Tn7yHet-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504240638.PM73jDId-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202504250828.wJjuSU89-lkp@intel.com
block/blk-io-hierarchy/iodump.c:188:17: error: no member named 'bi_blkg' in 'struct bio'
block/blk-io-hierarchy/iodump.c:561:7: warning: no previous prototype for '__bio_stage_hierarchy_start' [-Wmissing-prototypes]
drivers/cpufreq/cppc_cpufreq.c:756:19: error: dereferencing pointer to incomplete type 'struct fb_ctr_pair'
drivers/gpu/drm/phytium/phytium_gem.c:170:6: warning: no previous prototype for 'phytium_gem_prime_vunmap' [-Wmissing-prototypes]
drivers/irqchip/irq-gic-v3.c:1517:6: warning: no previous prototype for 'is_gicv4p1' [-Wmissing-prototypes]
drivers/irqchip/irq-gic-v3.c:1517:6: warning: no previous prototype for function 'is_gicv4p1' [-Wmissing-prototypes]
drivers/irqchip/irq-gic-v3.c:1526:6: warning: no previous prototype for 'gic_dist_enable_ipiv' [-Wmissing-prototypes]
drivers/irqchip/irq-gic-v3.c:1526:6: warning: no previous prototype for function 'gic_dist_enable_ipiv' [-Wmissing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c:545:5: error: no previous prototype for 'ps3_pci_init' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c:899:5: error: no previous prototype for 'ps3_pci_init_complete' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c:945:6: error: no previous prototype for 'ps3_pci_init_complete_exit' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_cli.c:108:2: error: function 'ps3stor_cli_printf' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
drivers/scsi/linkdata/ps3stor/./linux/ps3_cli.c:108:9: error: function 'ps3stor_cli_printf' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format]
drivers/scsi/linkdata/ps3stor/./linux/ps3_cli_debug.c:1059:5: error: no previous prototype for 'ps3_dump_context_show' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_dump.c:159:5: error: no previous prototype for 'ps3_dump_file_write' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_dump.c:200:5: error: no previous prototype for 'ps3_dump_file_close' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_dump.c:28:5: error: no previous prototype for 'ps3_dump_local_time' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_dump.c:50:5: error: no previous prototype for 'ps3_dump_filename_build' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/./linux/ps3_dump.c:76:5: error: no previous prototype for 'ps3_dump_file_open' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:131:6: error: no previous prototype for 'ps3_trigger_irq_poll' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:243:5: error: no previous prototype for 'ps3_resp_status_convert' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:403:6: error: no previous prototype for 'ps3_io_recv_ok_stat_inc' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:85:6: error: no previous prototype for 'ps3_cmd_stat_content_clear' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_debug.c:883:5: error: no previous prototype for 'ps3_dump_dir_length' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_device_manager.c:1581:5: error: no previous prototype for 'ps3_scsi_private_init_pd' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_device_manager.c:1663:5: error: no previous prototype for 'ps3_scsi_private_init_vd' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_device_manager_sas.c:1632:5: error: no previous prototype for 'ps3_sas_expander_phys_refresh' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_instance_manager.c:669:53: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
drivers/scsi/linkdata/ps3stor/ps3_instance_manager.c:669:60: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
drivers/scsi/linkdata/ps3stor/ps3_ioc_adp.c:147:6: error: no previous prototype for 'ps3_ioc_resource_prepare_hba' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_ioc_adp.c:36:6: error: no previous prototype for 'ps3_ioc_resource_prepare_switch' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_ioc_adp.c:88:6: error: no previous prototype for 'ps3_ioc_resource_prepare_raid' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_ioc_manager.c:307:5: error: no previous prototype for 'ps3_hard_reset_to_ready' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_ioctl.c:785:6: error: no previous prototype for 'ps3_clean_mgr_cmd' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:21:27: error: 'PS3_INTERRUPT_CMD_DISABLE_ALL_MASK' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:22:27: error: 'PS3_INTERRUPT_CMD_ENABLE_MSIX' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:23:27: error: 'PS3_INTERRUPT_MASK_DISABLE' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:24:27: error: 'PS3_INTERRUPT_STATUS_EXIST_IRQ' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:25:27: error: 'PS3_INTERRUPT_CLEAR_IRQ' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:27:27: error: 'PS3_SSD_IOPS_MSIX_VECTORS' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_irq.c:28:27: error: 'PS3_HDD_IOPS_MSIX_VECTORS' defined but not used [-Werror=unused-const-variable=]
drivers/scsi/linkdata/ps3stor/ps3_module_para.c:609:14: error: no previous prototype for 'ps3_cli_ver_query' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:1058:6: error: no previous prototype for 'ps3_qos_pd_waitq_ratio_update' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2019:15: error: no previous prototype for 'ps3_hba_qos_decision' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2040:6: error: no previous prototype for 'ps3_hba_qos_waitq_notify' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2100:6: error: no previous prototype for 'ps3_cmd_waitq_abort' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:211:1: error: no previous prototype for 'ps3_qos_cmd_waitq_get' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2463:6: error: no previous prototype for 'ps3_hba_qos_waitq_clear_all' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2827:6: error: no previous prototype for 'ps3_hba_qos_vd_init' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2936:6: error: no previous prototype for 'ps3_hba_qos_vd_reset' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3023:6: error: no previous prototype for 'ps3_hba_qos_waitq_poll' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3279:15: error: no previous prototype for 'ps3_raid_qos_decision' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3334:6: error: no previous prototype for 'ps3_qos_mgrq_resend' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:335:15: error: no previous prototype for 'ps3_qos_vd_cmdword_get' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3478:6: error: no previous prototype for 'ps3_raid_qos_waitq_notify' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:351:15: error: no previous prototype for 'ps3_qos_exclusive_cmdword_get' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:363:15: error: no previous prototype for 'ps3_qos_tg_decision' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3821:15: error: no previous prototype for 'ps3_raid_qos_waitq_abort' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:4022:6: error: no previous prototype for 'ps3_raid_qos_waitq_clear_all' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:4083:6: error: no previous prototype for 'ps3_raid_qos_waitq_poll' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:749:15: error: no previous prototype for 'ps3_qos_all_pd_rc_get' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:876:6: error: no previous prototype for 'ps3_pd_quota_waitq_clear_all' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_qos.c:892:6: error: no previous prototype for 'ps3_pd_quota_waitq_clean' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1173:5: error: no previous prototype for 'ps3_range_check_and_insert' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1231:5: error: no previous prototype for 'ps3_r1x_hash_range_lock' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1312:6: error: no previous prototype for 'ps3_r1x_hash_range_unlock' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:578:5: error: no previous prototype for 'ps3_r1x_hash_bit_check' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:678:6: error: no previous prototype for 'ps3_r1x_conflict_queue_hash_bit_lock' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:730:5: error: no previous prototype for 'ps3_r1x_hash_bit_lock' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:988:6: error: no previous prototype for 'ps3_r1x_hash_bit_unlock' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_rb_tree.c:154:6: error: no previous prototype for 'rbtDelNodeDo' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_recovery.c:204:6: error: no previous prototype for 'ps3_recovery_irq_queue_destroy' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_recovery.c:2700:6: error: no previous prototype for 'ps3_hard_recovery_state_finish' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_recovery.c:363:5: error: no previous prototype for 'ps3_recovery_state_transfer' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_recovery.c:72:30: error: no previous prototype for 'ps3_recovery_context_alloc' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_recovery.c:82:6: error: no previous prototype for 'ps3_recovery_context_free' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_recovery.c:88:6: error: no previous prototype for 'ps3_recovery_context_delete' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_sas_transport.c:407:5: error: no previous prototype for 'ps3_sas_update_phy_info' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:1110:5: error: no previous prototype for 'ps3_wait_for_outstanding_complete' [-Werror=missing-prototypes]
drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:876:6: error: no previous prototype for 'ps3_set_task_manager_busy' [-Werror=missing-prototypes]
kismet: WARNING: unmet direct dependencies detected for CRYPTO_DRBG_CTR when selected by CRYPTO_DEV_HISI_TRNG
net/wireless/nl80211.c:12981:3: warning: 'memcpy' pointer overflow between offset 36 and size [-1, 9223372036854775807] [-Warray-bounds]
net/wireless/nl80211.c:12981:3: warning: 'memcpy' specified size 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
Unverified Error/Warning (likely false positive, kindly check if interested):
include/linux/gpio/driver.h: asm/bug.h is included more than once.
mm/oom_kill.c: linux/nmi.h is included more than once.
Error/Warning ids grouped by kconfigs:
recent_errors
|-- arm64-allmodconfig
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-function-gic_dist_enable_ipiv
| `-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-function-is_gicv4p1
|-- arm64-allnoconfig
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-gic_dist_enable_ipiv
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-is_gicv4p1
| `-- kismet:WARNING:unmet-direct-dependencies-detected-for-CRYPTO_DRBG_CTR-when-selected-by-CRYPTO_DEV_HISI_TRNG
|-- arm64-defconfig
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-gic_dist_enable_ipiv
| `-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-is_gicv4p1
|-- arm64-randconfig-001-20250424
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-function-gic_dist_enable_ipiv
| `-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-function-is_gicv4p1
|-- arm64-randconfig-002-20250424
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-gic_dist_enable_ipiv
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-is_gicv4p1
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init_complete
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init_complete_exit
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_cli.c:error:function-ps3stor_cli_printf-might-be-a-candidate-for-gnu_printf-format-attribute
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_cli_debug.c:error:no-previous-prototype-for-ps3_dump_context_show
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_close
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_open
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_write
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_filename_build
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_local_time
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_complete.c:error:no-previous-prototype-for-ps3_resp_status_convert
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_complete.c:error:no-previous-prototype-for-ps3_trigger_irq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_statistics.c:error:no-previous-prototype-for-ps3_cmd_stat_content_clear
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_statistics.c:error:no-previous-prototype-for-ps3_io_recv_ok_stat_inc
| |-- drivers-scsi-linkdata-ps3stor-ps3_debug.c:error:no-previous-prototype-for-ps3_dump_dir_length
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager.c:error:no-previous-prototype-for-ps3_scsi_private_init_pd
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager.c:error:no-previous-prototype-for-ps3_scsi_private_init_vd
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager_sas.c:error:no-previous-prototype-for-ps3_sas_expander_phys_refresh
| |-- drivers-scsi-linkdata-ps3stor-ps3_instance_manager.c:error:snprintf-output-may-be-truncated-before-the-last-format-character
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_hba
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_raid
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_switch
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_manager.c:error:no-previous-prototype-for-ps3_hard_reset_to_ready
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioctl.c:error:no-previous-prototype-for-ps3_clean_mgr_cmd
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_HDD_IOPS_MSIX_VECTORS-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CLEAR_IRQ-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CMD_DISABLE_ALL_MASK-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CMD_ENABLE_MSIX-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_MASK_DISABLE-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_STATUS_EXIST_IRQ-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_SSD_IOPS_MSIX_VECTORS-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_module_para.c:error:no-previous-prototype-for-ps3_cli_ver_query
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_cmd_waitq_abort
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_vd_init
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_vd_reset
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_notify
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_pd_quota_waitq_clean
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_pd_quota_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_all_pd_rc_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_cmd_waitq_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_exclusive_cmdword_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_mgrq_resend
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_pd_waitq_ratio_update
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_tg_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_vd_cmdword_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_abort
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_notify
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_conflict_queue_hash_bit_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_check
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_unlock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_range_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_range_unlock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_range_check_and_insert
| |-- drivers-scsi-linkdata-ps3stor-ps3_rb_tree.c:error:no-previous-prototype-for-rbtDelNodeDo
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_hard_recovery_state_finish
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_alloc
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_delete
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_free
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_irq_queue_destroy
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_state_transfer
| |-- drivers-scsi-linkdata-ps3stor-ps3_sas_transport.c:error:no-previous-prototype-for-ps3_sas_update_phy_info
| |-- drivers-scsi-linkdata-ps3stor-ps3_scsi_cmd_err.c:error:no-previous-prototype-for-ps3_set_task_manager_busy
| `-- drivers-scsi-linkdata-ps3stor-ps3_scsi_cmd_err.c:error:no-previous-prototype-for-ps3_wait_for_outstanding_complete
|-- arm64-randconfig-003-20250424
| |-- block-blk-io-hierarchy-iodump.c:error:no-member-named-bi_blkg-in-struct-bio
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-function-gic_dist_enable_ipiv
| `-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-function-is_gicv4p1
|-- arm64-randconfig-004-20250424
| |-- drivers-cpufreq-cppc_cpufreq.c:error:dereferencing-pointer-to-incomplete-type-struct-fb_ctr_pair
| |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-phytium_gem_prime_vunmap
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-gic_dist_enable_ipiv
| |-- drivers-irqchip-irq-gic-v3.c:warning:no-previous-prototype-for-is_gicv4p1
| |-- net-wireless-nl80211.c:warning:memcpy-pointer-overflow-between-offset-and-size
| `-- net-wireless-nl80211.c:warning:memcpy-specified-size-exceeds-maximum-object-size
|-- loongarch-allmodconfig
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init_complete
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init_complete_exit
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_cli.c:error:function-ps3stor_cli_printf-might-be-a-candidate-for-gnu_printf-format-attribute
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_cli_debug.c:error:no-previous-prototype-for-ps3_dump_context_show
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_close
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_open
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_write
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_filename_build
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_local_time
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_complete.c:error:no-previous-prototype-for-ps3_resp_status_convert
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_complete.c:error:no-previous-prototype-for-ps3_trigger_irq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_statistics.c:error:no-previous-prototype-for-ps3_cmd_stat_content_clear
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_statistics.c:error:no-previous-prototype-for-ps3_io_recv_ok_stat_inc
| |-- drivers-scsi-linkdata-ps3stor-ps3_debug.c:error:no-previous-prototype-for-ps3_dump_dir_length
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager.c:error:no-previous-prototype-for-ps3_scsi_private_init_pd
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager.c:error:no-previous-prototype-for-ps3_scsi_private_init_vd
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager_sas.c:error:no-previous-prototype-for-ps3_sas_expander_phys_refresh
| |-- drivers-scsi-linkdata-ps3stor-ps3_instance_manager.c:error:snprintf-output-may-be-truncated-before-the-last-format-character
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_hba
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_raid
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_switch
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_manager.c:error:no-previous-prototype-for-ps3_hard_reset_to_ready
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioctl.c:error:no-previous-prototype-for-ps3_clean_mgr_cmd
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_HDD_IOPS_MSIX_VECTORS-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CLEAR_IRQ-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CMD_DISABLE_ALL_MASK-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CMD_ENABLE_MSIX-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_MASK_DISABLE-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_STATUS_EXIST_IRQ-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_SSD_IOPS_MSIX_VECTORS-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_module_para.c:error:no-previous-prototype-for-ps3_cli_ver_query
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_cmd_waitq_abort
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_vd_init
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_vd_reset
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_notify
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_pd_quota_waitq_clean
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_pd_quota_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_all_pd_rc_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_cmd_waitq_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_exclusive_cmdword_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_mgrq_resend
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_pd_waitq_ratio_update
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_tg_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_vd_cmdword_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_abort
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_notify
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_conflict_queue_hash_bit_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_check
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_unlock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_range_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_range_unlock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_range_check_and_insert
| |-- drivers-scsi-linkdata-ps3stor-ps3_rb_tree.c:error:no-previous-prototype-for-rbtDelNodeDo
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_hard_recovery_state_finish
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_alloc
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_delete
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_free
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_irq_queue_destroy
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_state_transfer
| |-- drivers-scsi-linkdata-ps3stor-ps3_sas_transport.c:error:no-previous-prototype-for-ps3_sas_update_phy_info
| |-- drivers-scsi-linkdata-ps3stor-ps3_scsi_cmd_err.c:error:no-previous-prototype-for-ps3_set_task_manager_busy
| `-- drivers-scsi-linkdata-ps3stor-ps3_scsi_cmd_err.c:error:no-previous-prototype-for-ps3_wait_for_outstanding_complete
|-- loongarch-allyesconfig
| |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-__bio_stage_hierarchy_start
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init_complete
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_base.c:error:no-previous-prototype-for-ps3_pci_init_complete_exit
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_cli.c:error:function-ps3stor_cli_printf-might-be-a-candidate-for-gnu_printf-format-attribute
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_cli_debug.c:error:no-previous-prototype-for-ps3_dump_context_show
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_close
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_open
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_file_write
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_filename_build
| |-- drivers-scsi-linkdata-ps3stor-.-linux-ps3_dump.c:error:no-previous-prototype-for-ps3_dump_local_time
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_complete.c:error:no-previous-prototype-for-ps3_resp_status_convert
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_complete.c:error:no-previous-prototype-for-ps3_trigger_irq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_statistics.c:error:no-previous-prototype-for-ps3_cmd_stat_content_clear
| |-- drivers-scsi-linkdata-ps3stor-ps3_cmd_statistics.c:error:no-previous-prototype-for-ps3_io_recv_ok_stat_inc
| |-- drivers-scsi-linkdata-ps3stor-ps3_debug.c:error:no-previous-prototype-for-ps3_dump_dir_length
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager.c:error:no-previous-prototype-for-ps3_scsi_private_init_pd
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager.c:error:no-previous-prototype-for-ps3_scsi_private_init_vd
| |-- drivers-scsi-linkdata-ps3stor-ps3_device_manager_sas.c:error:no-previous-prototype-for-ps3_sas_expander_phys_refresh
| |-- drivers-scsi-linkdata-ps3stor-ps3_instance_manager.c:error:snprintf-output-may-be-truncated-before-the-last-format-character
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_hba
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_raid
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_adp.c:error:no-previous-prototype-for-ps3_ioc_resource_prepare_switch
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioc_manager.c:error:no-previous-prototype-for-ps3_hard_reset_to_ready
| |-- drivers-scsi-linkdata-ps3stor-ps3_ioctl.c:error:no-previous-prototype-for-ps3_clean_mgr_cmd
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_HDD_IOPS_MSIX_VECTORS-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CLEAR_IRQ-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CMD_DISABLE_ALL_MASK-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_CMD_ENABLE_MSIX-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_MASK_DISABLE-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_INTERRUPT_STATUS_EXIST_IRQ-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_irq.c:error:PS3_SSD_IOPS_MSIX_VECTORS-defined-but-not-used
| |-- drivers-scsi-linkdata-ps3stor-ps3_module_para.c:error:no-previous-prototype-for-ps3_cli_ver_query
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_cmd_waitq_abort
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_vd_init
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_vd_reset
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_notify
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_hba_qos_waitq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_pd_quota_waitq_clean
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_pd_quota_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_all_pd_rc_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_cmd_waitq_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_exclusive_cmdword_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_mgrq_resend
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_pd_waitq_ratio_update
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_tg_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_qos_vd_cmdword_get
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_decision
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_abort
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_clear_all
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_notify
| |-- drivers-scsi-linkdata-ps3stor-ps3_qos.c:error:no-previous-prototype-for-ps3_raid_qos_waitq_poll
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_conflict_queue_hash_bit_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_check
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_bit_unlock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_range_lock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_r1x_hash_range_unlock
| |-- drivers-scsi-linkdata-ps3stor-ps3_r1x_write_lock.c:error:no-previous-prototype-for-ps3_range_check_and_insert
| |-- drivers-scsi-linkdata-ps3stor-ps3_rb_tree.c:error:no-previous-prototype-for-rbtDelNodeDo
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_hard_recovery_state_finish
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_alloc
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_delete
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_context_free
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_irq_queue_destroy
| |-- drivers-scsi-linkdata-ps3stor-ps3_recovery.c:error:no-previous-prototype-for-ps3_recovery_state_transfer
| |-- drivers-scsi-linkdata-ps3stor-ps3_sas_transport.c:error:no-previous-prototype-for-ps3_sas_update_phy_info
| |-- drivers-scsi-linkdata-ps3stor-ps3_scsi_cmd_err.c:error:no-previous-prototype-for-ps3_set_task_manager_busy
| `-- drivers-scsi-linkdata-ps3stor-ps3_scsi_cmd_err.c:error:no-previous-prototype-for-ps3_wait_for_outstanding_complete
|-- loongarch-randconfig-r113-20250425
| |-- include-linux-cpuidle.h:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-ptr-got-int-noderef-__percpu
| |-- include-linux-cpuidle.h:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-ptr-got-unsigned-int-noderef-__percpu
| |-- include-linux-entry-common.h:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-ptr-got-int-noderef-__percpu
| |-- include-linux-entry-common.h:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-ptr-got-unsigned-int-noderef-__percpu
| |-- mm-gup.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-ptr-got-int-noderef-__percpu
| `-- mm-gup.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-ptr-got-unsigned-int-noderef-__percpu
`-- x86_64-allnoconfig
|-- include-linux-gpio-driver.h:asm-bug.h-is-included-more-than-once.
`-- mm-oom_kill.c:linux-nmi.h-is-included-more-than-once.
elapsed time: 1454m
configs tested: 21
configs skipped: 123
tested configs:
arm64 allmodconfig clang-19
arm64 allnoconfig gcc-14.2.0
arm64 defconfig gcc-14.2.0
arm64 randconfig-001-20250424 clang-21
arm64 randconfig-002-20250424 gcc-8.5.0
arm64 randconfig-003-20250424 clang-21
arm64 randconfig-004-20250424 gcc-8.5.0
loongarch allmodconfig gcc-14.2.0
loongarch allnoconfig gcc-14.2.0
loongarch defconfig gcc-14.2.0
loongarch randconfig-001-20250424 gcc-14.2.0
loongarch randconfig-002-20250424 gcc-12.4.0
x86_64 allnoconfig clang-20
x86_64 allyesconfig clang-20
x86_64 buildonly-randconfig-001-20250424 gcc-12
x86_64 buildonly-randconfig-002-20250424 clang-20
x86_64 buildonly-randconfig-003-20250424 gcc-12
x86_64 buildonly-randconfig-004-20250424 clang-20
x86_64 buildonly-randconfig-005-20250424 clang-20
x86_64 buildonly-randconfig-006-20250424 gcc-12
x86_64 defconfig gcc-11
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0