start preparation for v3.14, clean up patches and PKGBUILD first
This commit is contained in:
parent
26f591d09d
commit
735ed690b3
@ -1,9 +1,7 @@
|
|||||||
From a62207820fb65f168c8a7f9c0abb71d736f3d7e0 Mon Sep 17 00:00:00 2001
|
From 5d77ba2d26110c678b40fd723866a17d4036de12 Mon Sep 17 00:00:00 2001
|
||||||
From: Lucas De Marchi <lucas.demarchi@intel.com>
|
From: Lucas De Marchi <lucas.demarchi@intel.com>
|
||||||
Date: Tue, 18 Feb 2014 02:19:26 -0300
|
Date: Tue, 18 Feb 2014 02:19:26 -0300
|
||||||
Subject: [PATCH] Bluetooth: allocate static minor for vhci
|
Subject: [PATCH 1/3] Bluetooth: allocate static minor for vhci
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Commit bfacbb9 (Bluetooth: Use devname:vhci module alias for virtual HCI
|
Commit bfacbb9 (Bluetooth: Use devname:vhci module alias for virtual HCI
|
||||||
driver) added the module alias to hci_vhci module so it's possible to
|
driver) added the module alias to hci_vhci module so it's possible to
|
||||||
@ -30,7 +28,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|||||||
3 files changed, 4 insertions(+), 1 deletion(-)
|
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
|
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
|
||||||
index 80b7241..fce9398 100644
|
index 10378cc..04356f5 100644
|
||||||
--- a/Documentation/devices.txt
|
--- a/Documentation/devices.txt
|
||||||
+++ b/Documentation/devices.txt
|
+++ b/Documentation/devices.txt
|
||||||
@@ -353,6 +353,7 @@ Your cooperation is appreciated.
|
@@ -353,6 +353,7 @@ Your cooperation is appreciated.
|
||||||
@ -42,10 +40,10 @@ index 80b7241..fce9398 100644
|
|||||||
140 = /dev/relay8 Berkshire Products Octal relay card
|
140 = /dev/relay8 Berkshire Products Octal relay card
|
||||||
141 = /dev/relay16 Berkshire Products ISO-16 relay card
|
141 = /dev/relay16 Berkshire Products ISO-16 relay card
|
||||||
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
|
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
|
||||||
index 7b16738..59095e6 100644
|
index 1ef6990..add1c6a 100644
|
||||||
--- a/drivers/bluetooth/hci_vhci.c
|
--- a/drivers/bluetooth/hci_vhci.c
|
||||||
+++ b/drivers/bluetooth/hci_vhci.c
|
+++ b/drivers/bluetooth/hci_vhci.c
|
||||||
@@ -352,7 +352,7 @@ static const struct file_operations vhci_fops = {
|
@@ -359,7 +359,7 @@ static const struct file_operations vhci_fops = {
|
||||||
static struct miscdevice vhci_miscdev= {
|
static struct miscdevice vhci_miscdev= {
|
||||||
.name = "vhci",
|
.name = "vhci",
|
||||||
.fops = &vhci_fops,
|
.fops = &vhci_fops,
|
||||||
@ -54,13 +52,13 @@ index 7b16738..59095e6 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int __init vhci_init(void)
|
static int __init vhci_init(void)
|
||||||
@@ -378,3 +378,4 @@ MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION);
|
@@ -385,3 +385,4 @@ MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION);
|
||||||
MODULE_VERSION(VERSION);
|
MODULE_VERSION(VERSION);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_ALIAS("devname:vhci");
|
MODULE_ALIAS("devname:vhci");
|
||||||
+MODULE_ALIAS_MISCDEV(VHCI_MINOR);
|
+MODULE_ALIAS_MISCDEV(VHCI_MINOR);
|
||||||
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
|
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
|
||||||
index f7eaf2d..e5db611 100644
|
index 3737f72..7bb6148 100644
|
||||||
--- a/include/linux/miscdevice.h
|
--- a/include/linux/miscdevice.h
|
||||||
+++ b/include/linux/miscdevice.h
|
+++ b/include/linux/miscdevice.h
|
||||||
@@ -23,6 +23,7 @@
|
@@ -23,6 +23,7 @@
|
||||||
@ -72,5 +70,5 @@ index f7eaf2d..e5db611 100644
|
|||||||
#define DMAPI_MINOR 140 /* DMAPI */
|
#define DMAPI_MINOR 140 /* DMAPI */
|
||||||
#define NVRAM_MINOR 144
|
#define NVRAM_MINOR 144
|
||||||
--
|
--
|
||||||
1.9.0
|
1.9.1
|
||||||
|
|
||||||
|
@ -1,241 +0,0 @@
|
|||||||
From 4b9a445e3eeb8bd9278b1ae51c1b3a651e370cd6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Date: Thu, 14 Nov 2013 07:25:17 -0500
|
|
||||||
Subject: [PATCH 1/6] sunrpc: create a new dummy pipe for gssd to hold open
|
|
||||||
|
|
||||||
rpc.gssd will naturally hold open any pipe named */clnt*/gssd that shows
|
|
||||||
up under rpc_pipefs. That behavior gives us a reliable mechanism to tell
|
|
||||||
whether it's actually running or not.
|
|
||||||
|
|
||||||
Create a new toplevel "gssd" directory in rpc_pipefs when it's mounted.
|
|
||||||
Under that directory create another directory called "clntXX", and then
|
|
||||||
within that a pipe called "gssd".
|
|
||||||
|
|
||||||
We'll never send an upcall along that pipe, and any downcall written to
|
|
||||||
it will just return -EINVAL.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
|
||||||
---
|
|
||||||
include/linux/sunrpc/rpc_pipe_fs.h | 3 +-
|
|
||||||
net/sunrpc/netns.h | 1 +
|
|
||||||
net/sunrpc/rpc_pipe.c | 93 ++++++++++++++++++++++++++++++++++++--
|
|
||||||
net/sunrpc/sunrpc_syms.c | 8 +++-
|
|
||||||
4 files changed, 100 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
|
|
||||||
index a353e03..85f1342 100644
|
|
||||||
--- a/include/linux/sunrpc/rpc_pipe_fs.h
|
|
||||||
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
|
|
||||||
@@ -84,7 +84,8 @@ enum {
|
|
||||||
|
|
||||||
extern struct dentry *rpc_d_lookup_sb(const struct super_block *sb,
|
|
||||||
const unsigned char *dir_name);
|
|
||||||
-extern void rpc_pipefs_init_net(struct net *net);
|
|
||||||
+extern int rpc_pipefs_init_net(struct net *net);
|
|
||||||
+extern void rpc_pipefs_exit_net(struct net *net);
|
|
||||||
extern struct super_block *rpc_get_sb_net(const struct net *net);
|
|
||||||
extern void rpc_put_sb_net(const struct net *net);
|
|
||||||
|
|
||||||
diff --git a/net/sunrpc/netns.h b/net/sunrpc/netns.h
|
|
||||||
index 779742c..8a8e841 100644
|
|
||||||
--- a/net/sunrpc/netns.h
|
|
||||||
+++ b/net/sunrpc/netns.h
|
|
||||||
@@ -14,6 +14,7 @@ struct sunrpc_net {
|
|
||||||
struct cache_detail *rsi_cache;
|
|
||||||
|
|
||||||
struct super_block *pipefs_sb;
|
|
||||||
+ struct rpc_pipe *gssd_dummy;
|
|
||||||
struct mutex pipefs_sb_lock;
|
|
||||||
|
|
||||||
struct list_head all_clients;
|
|
||||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
|
||||||
index bf04b30..c23458b 100644
|
|
||||||
--- a/net/sunrpc/rpc_pipe.c
|
|
||||||
+++ b/net/sunrpc/rpc_pipe.c
|
|
||||||
@@ -38,7 +38,7 @@
|
|
||||||
#define NET_NAME(net) ((net == &init_net) ? " (init_net)" : "")
|
|
||||||
|
|
||||||
static struct file_system_type rpc_pipe_fs_type;
|
|
||||||
-
|
|
||||||
+static const struct rpc_pipe_ops gssd_dummy_pipe_ops;
|
|
||||||
|
|
||||||
static struct kmem_cache *rpc_inode_cachep __read_mostly;
|
|
||||||
|
|
||||||
@@ -1159,6 +1159,7 @@ enum {
|
|
||||||
RPCAUTH_nfsd4_cb,
|
|
||||||
RPCAUTH_cache,
|
|
||||||
RPCAUTH_nfsd,
|
|
||||||
+ RPCAUTH_gssd,
|
|
||||||
RPCAUTH_RootEOF
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1195,6 +1196,10 @@ static const struct rpc_filelist files[] = {
|
|
||||||
.name = "nfsd",
|
|
||||||
.mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
|
||||||
},
|
|
||||||
+ [RPCAUTH_gssd] = {
|
|
||||||
+ .name = "gssd",
|
|
||||||
+ .mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
|
||||||
+ },
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -1208,13 +1213,25 @@ struct dentry *rpc_d_lookup_sb(const struct super_block *sb,
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(rpc_d_lookup_sb);
|
|
||||||
|
|
||||||
-void rpc_pipefs_init_net(struct net *net)
|
|
||||||
+int rpc_pipefs_init_net(struct net *net)
|
|
||||||
{
|
|
||||||
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
|
||||||
|
|
||||||
+ sn->gssd_dummy = rpc_mkpipe_data(&gssd_dummy_pipe_ops, 0);
|
|
||||||
+ if (IS_ERR(sn->gssd_dummy))
|
|
||||||
+ return PTR_ERR(sn->gssd_dummy);
|
|
||||||
+
|
|
||||||
mutex_init(&sn->pipefs_sb_lock);
|
|
||||||
sn->gssd_running = 1;
|
|
||||||
sn->pipe_version = -1;
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void rpc_pipefs_exit_net(struct net *net)
|
|
||||||
+{
|
|
||||||
+ struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
|
||||||
+
|
|
||||||
+ rpc_destroy_pipe_data(sn->gssd_dummy);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -1244,11 +1261,73 @@ void rpc_put_sb_net(const struct net *net)
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(rpc_put_sb_net);
|
|
||||||
|
|
||||||
+static const struct rpc_filelist gssd_dummy_clnt_dir[] = {
|
|
||||||
+ [0] = {
|
|
||||||
+ .name = "clntXX",
|
|
||||||
+ .mode = S_IFDIR | S_IRUGO | S_IXUGO,
|
|
||||||
+ },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static ssize_t
|
|
||||||
+dummy_downcall(struct file *filp, const char __user *src, size_t len)
|
|
||||||
+{
|
|
||||||
+ return -EINVAL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct rpc_pipe_ops gssd_dummy_pipe_ops = {
|
|
||||||
+ .upcall = rpc_pipe_generic_upcall,
|
|
||||||
+ .downcall = dummy_downcall,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * rpc_gssd_dummy_populate - create a dummy gssd pipe
|
|
||||||
+ * @root: root of the rpc_pipefs filesystem
|
|
||||||
+ * @pipe_data: pipe data created when netns is initialized
|
|
||||||
+ *
|
|
||||||
+ * Create a dummy set of directories and a pipe that gssd can hold open to
|
|
||||||
+ * indicate that it is up and running.
|
|
||||||
+ */
|
|
||||||
+static struct dentry *
|
|
||||||
+rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
|
||||||
+{
|
|
||||||
+ int ret = 0;
|
|
||||||
+ struct dentry *gssd_dentry;
|
|
||||||
+ struct dentry *clnt_dentry = NULL;
|
|
||||||
+ struct dentry *pipe_dentry = NULL;
|
|
||||||
+ struct qstr q = QSTR_INIT(files[RPCAUTH_gssd].name,
|
|
||||||
+ strlen(files[RPCAUTH_gssd].name));
|
|
||||||
+
|
|
||||||
+ /* We should never get this far if "gssd" doesn't exist */
|
|
||||||
+ gssd_dentry = d_hash_and_lookup(root, &q);
|
|
||||||
+ if (!gssd_dentry)
|
|
||||||
+ return ERR_PTR(-ENOENT);
|
|
||||||
+
|
|
||||||
+ ret = rpc_populate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1, NULL);
|
|
||||||
+ if (ret) {
|
|
||||||
+ pipe_dentry = ERR_PTR(ret);
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ q.name = gssd_dummy_clnt_dir[0].name;
|
|
||||||
+ q.len = strlen(gssd_dummy_clnt_dir[0].name);
|
|
||||||
+ clnt_dentry = d_hash_and_lookup(gssd_dentry, &q);
|
|
||||||
+ if (!clnt_dentry) {
|
|
||||||
+ pipe_dentry = ERR_PTR(-ENOENT);
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
|
|
||||||
+out:
|
|
||||||
+ dput(clnt_dentry);
|
|
||||||
+ dput(gssd_dentry);
|
|
||||||
+ return pipe_dentry;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
rpc_fill_super(struct super_block *sb, void *data, int silent)
|
|
||||||
{
|
|
||||||
struct inode *inode;
|
|
||||||
- struct dentry *root;
|
|
||||||
+ struct dentry *root, *gssd_dentry;
|
|
||||||
struct net *net = data;
|
|
||||||
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
|
||||||
int err;
|
|
||||||
@@ -1266,6 +1345,13 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
|
|
||||||
return -ENOMEM;
|
|
||||||
if (rpc_populate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF, NULL))
|
|
||||||
return -ENOMEM;
|
|
||||||
+
|
|
||||||
+ gssd_dentry = rpc_gssd_dummy_populate(root, sn->gssd_dummy);
|
|
||||||
+ if (IS_ERR(gssd_dentry)) {
|
|
||||||
+ __rpc_depopulate(root, files, RPCAUTH_lockd, RPCAUTH_RootEOF);
|
|
||||||
+ return PTR_ERR(gssd_dentry);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
dprintk("RPC: sending pipefs MOUNT notification for net %p%s\n",
|
|
||||||
net, NET_NAME(net));
|
|
||||||
mutex_lock(&sn->pipefs_sb_lock);
|
|
||||||
@@ -1280,6 +1366,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
err_depopulate:
|
|
||||||
+ dput(gssd_dentry);
|
|
||||||
blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
|
|
||||||
RPC_PIPEFS_UMOUNT,
|
|
||||||
sb);
|
|
||||||
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
|
|
||||||
index 3d6498a..cd30120 100644
|
|
||||||
--- a/net/sunrpc/sunrpc_syms.c
|
|
||||||
+++ b/net/sunrpc/sunrpc_syms.c
|
|
||||||
@@ -44,12 +44,17 @@ static __net_init int sunrpc_init_net(struct net *net)
|
|
||||||
if (err)
|
|
||||||
goto err_unixgid;
|
|
||||||
|
|
||||||
- rpc_pipefs_init_net(net);
|
|
||||||
+ err = rpc_pipefs_init_net(net);
|
|
||||||
+ if (err)
|
|
||||||
+ goto err_pipefs;
|
|
||||||
+
|
|
||||||
INIT_LIST_HEAD(&sn->all_clients);
|
|
||||||
spin_lock_init(&sn->rpc_client_lock);
|
|
||||||
spin_lock_init(&sn->rpcb_clnt_lock);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
+err_pipefs:
|
|
||||||
+ unix_gid_cache_destroy(net);
|
|
||||||
err_unixgid:
|
|
||||||
ip_map_cache_destroy(net);
|
|
||||||
err_ipmap:
|
|
||||||
@@ -60,6 +65,7 @@ err_proc:
|
|
||||||
|
|
||||||
static __net_exit void sunrpc_exit_net(struct net *net)
|
|
||||||
{
|
|
||||||
+ rpc_pipefs_exit_net(net);
|
|
||||||
unix_gid_cache_destroy(net);
|
|
||||||
ip_map_cache_destroy(net);
|
|
||||||
rpc_proc_exit(net);
|
|
||||||
--
|
|
||||||
1.8.5.3
|
|
||||||
|
|
@ -0,0 +1,93 @@
|
|||||||
|
From 9bc5b710f5957763d6944f38143b627d127c15ff Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Gundersen <teg@jklm.no>
|
||||||
|
Date: Mon, 3 Feb 2014 11:14:13 +1030
|
||||||
|
Subject: [PATCH 2/3] module: allow multiple calls to MODULE_DEVICE_TABLE() per
|
||||||
|
module
|
||||||
|
|
||||||
|
Commit 78551277e4df5: "Input: i8042 - add PNP modaliases" had a bug, where the
|
||||||
|
second call to MODULE_DEVICE_TABLE() overrode the first resulting in not all
|
||||||
|
the modaliases being exposed.
|
||||||
|
|
||||||
|
This fixes the problem by including the name of the device_id table in the
|
||||||
|
__mod_*_device_table alias, allowing us to export several device_id tables
|
||||||
|
per module.
|
||||||
|
|
||||||
|
Suggested-by: Kay Sievers <kay@vrfy.org>
|
||||||
|
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||||
|
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
||||||
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
||||||
|
---
|
||||||
|
include/linux/module.h | 2 +-
|
||||||
|
scripts/mod/file2alias.c | 14 +++++++++-----
|
||||||
|
2 files changed, 10 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||||
|
index eaf60ff..ad18f60 100644
|
||||||
|
--- a/include/linux/module.h
|
||||||
|
+++ b/include/linux/module.h
|
||||||
|
@@ -142,7 +142,7 @@ extern const struct gtype##_id __mod_##gtype##_table \
|
||||||
|
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
||||||
|
|
||||||
|
#define MODULE_DEVICE_TABLE(type, name) \
|
||||||
|
- MODULE_GENERIC_TABLE(type##_device, name)
|
||||||
|
+ MODULE_GENERIC_TABLE(type##__##name##_device, name)
|
||||||
|
|
||||||
|
/* Version of form [<epoch>:]<version>[-<extra-version>].
|
||||||
|
* Or for CVS/RCS ID version, everything but the number is stripped.
|
||||||
|
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
|
||||||
|
index 25e5cb0..ce16404 100644
|
||||||
|
--- a/scripts/mod/file2alias.c
|
||||||
|
+++ b/scripts/mod/file2alias.c
|
||||||
|
@@ -42,7 +42,7 @@ typedef unsigned char __u8;
|
||||||
|
|
||||||
|
/* This array collects all instances that use the generic do_table */
|
||||||
|
struct devtable {
|
||||||
|
- const char *device_id; /* name of table, __mod_<name>_device_table. */
|
||||||
|
+ const char *device_id; /* name of table, __mod_<name>__*_device_table. */
|
||||||
|
unsigned long id_size;
|
||||||
|
void *function;
|
||||||
|
};
|
||||||
|
@@ -146,7 +146,8 @@ static void device_id_check(const char *modname, const char *device_id,
|
||||||
|
|
||||||
|
if (size % id_size || size < id_size) {
|
||||||
|
fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo "
|
||||||
|
- "of the size of section __mod_%s_device_table=%lu.\n"
|
||||||
|
+ "of the size of "
|
||||||
|
+ "section __mod_%s__<identifier>_device_table=%lu.\n"
|
||||||
|
"Fix definition of struct %s_device_id "
|
||||||
|
"in mod_devicetable.h\n",
|
||||||
|
modname, device_id, id_size, device_id, size, device_id);
|
||||||
|
@@ -1206,7 +1207,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
|
||||||
|
{
|
||||||
|
void *symval;
|
||||||
|
char *zeros = NULL;
|
||||||
|
- const char *name;
|
||||||
|
+ const char *name, *identifier;
|
||||||
|
unsigned int namelen;
|
||||||
|
|
||||||
|
/* We're looking for a section relative symbol */
|
||||||
|
@@ -1217,7 +1218,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
|
||||||
|
if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- /* All our symbols are of form <prefix>__mod_XXX_device_table. */
|
||||||
|
+ /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */
|
||||||
|
name = strstr(symname, "__mod_");
|
||||||
|
if (!name)
|
||||||
|
return;
|
||||||
|
@@ -1227,7 +1228,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
|
||||||
|
return;
|
||||||
|
if (strcmp(name + namelen - strlen("_device_table"), "_device_table"))
|
||||||
|
return;
|
||||||
|
- namelen -= strlen("_device_table");
|
||||||
|
+ identifier = strstr(name, "__");
|
||||||
|
+ if (!identifier)
|
||||||
|
+ return;
|
||||||
|
+ namelen = identifier - name;
|
||||||
|
|
||||||
|
/* Handle all-NULL symbols allocated into .bss */
|
||||||
|
if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) {
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -1,143 +0,0 @@
|
|||||||
From 89f842435c630f8426f414e6030bc2ffea0d6f81 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Date: Thu, 14 Nov 2013 07:25:18 -0500
|
|
||||||
Subject: [PATCH 2/6] sunrpc: replace sunrpc_net->gssd_running flag with a more
|
|
||||||
reliable check
|
|
||||||
|
|
||||||
Now that we have a more reliable method to tell if gssd is running, we
|
|
||||||
can replace the sn->gssd_running flag with a function that will query to
|
|
||||||
see if it's up and running.
|
|
||||||
|
|
||||||
There's also no need to attempt an upcall that we know will fail, so
|
|
||||||
just return -EACCES if gssd isn't running. Finally, fix the warn_gss()
|
|
||||||
message not to claim that that the upcall timed out since we don't
|
|
||||||
necesarily perform one now when gssd isn't running, and remove the
|
|
||||||
extraneous newline from the message.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
|
||||||
---
|
|
||||||
include/linux/sunrpc/rpc_pipe_fs.h | 2 ++
|
|
||||||
net/sunrpc/auth_gss/auth_gss.c | 17 +++++++----------
|
|
||||||
net/sunrpc/netns.h | 2 --
|
|
||||||
net/sunrpc/rpc_pipe.c | 14 ++++++++++----
|
|
||||||
4 files changed, 19 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
|
|
||||||
index 85f1342..7f490be 100644
|
|
||||||
--- a/include/linux/sunrpc/rpc_pipe_fs.h
|
|
||||||
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
|
|
||||||
@@ -131,5 +131,7 @@ extern int rpc_unlink(struct dentry *);
|
|
||||||
extern int register_rpc_pipefs(void);
|
|
||||||
extern void unregister_rpc_pipefs(void);
|
|
||||||
|
|
||||||
+extern bool gssd_running(struct net *net);
|
|
||||||
+
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
|
|
||||||
index 42fdfc6..0a2aee0 100644
|
|
||||||
--- a/net/sunrpc/auth_gss/auth_gss.c
|
|
||||||
+++ b/net/sunrpc/auth_gss/auth_gss.c
|
|
||||||
@@ -536,8 +536,7 @@ static void warn_gssd(void)
|
|
||||||
unsigned long now = jiffies;
|
|
||||||
|
|
||||||
if (time_after(now, ratelimit)) {
|
|
||||||
- printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n"
|
|
||||||
- "Please check user daemon is running.\n");
|
|
||||||
+ pr_warn("RPC: AUTH_GSS upcall failed. Please check user daemon is running.\n");
|
|
||||||
ratelimit = now + 15*HZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -600,7 +599,6 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
|
|
||||||
struct rpc_pipe *pipe;
|
|
||||||
struct rpc_cred *cred = &gss_cred->gc_base;
|
|
||||||
struct gss_upcall_msg *gss_msg;
|
|
||||||
- unsigned long timeout;
|
|
||||||
DEFINE_WAIT(wait);
|
|
||||||
int err;
|
|
||||||
|
|
||||||
@@ -608,17 +606,16 @@ gss_create_upcall(struct gss_auth *gss_auth, struct gss_cred *gss_cred)
|
|
||||||
__func__, from_kuid(&init_user_ns, cred->cr_uid));
|
|
||||||
retry:
|
|
||||||
err = 0;
|
|
||||||
- /* Default timeout is 15s unless we know that gssd is not running */
|
|
||||||
- timeout = 15 * HZ;
|
|
||||||
- if (!sn->gssd_running)
|
|
||||||
- timeout = HZ >> 2;
|
|
||||||
+ /* if gssd is down, just skip upcalling altogether */
|
|
||||||
+ if (!gssd_running(net)) {
|
|
||||||
+ warn_gssd();
|
|
||||||
+ return -EACCES;
|
|
||||||
+ }
|
|
||||||
gss_msg = gss_setup_upcall(gss_auth, cred);
|
|
||||||
if (PTR_ERR(gss_msg) == -EAGAIN) {
|
|
||||||
err = wait_event_interruptible_timeout(pipe_version_waitqueue,
|
|
||||||
- sn->pipe_version >= 0, timeout);
|
|
||||||
+ sn->pipe_version >= 0, 15 * HZ);
|
|
||||||
if (sn->pipe_version < 0) {
|
|
||||||
- if (err == 0)
|
|
||||||
- sn->gssd_running = 0;
|
|
||||||
warn_gssd();
|
|
||||||
err = -EACCES;
|
|
||||||
}
|
|
||||||
diff --git a/net/sunrpc/netns.h b/net/sunrpc/netns.h
|
|
||||||
index 8a8e841..94e506f 100644
|
|
||||||
--- a/net/sunrpc/netns.h
|
|
||||||
+++ b/net/sunrpc/netns.h
|
|
||||||
@@ -33,8 +33,6 @@ struct sunrpc_net {
|
|
||||||
int pipe_version;
|
|
||||||
atomic_t pipe_users;
|
|
||||||
struct proc_dir_entry *use_gssp_proc;
|
|
||||||
-
|
|
||||||
- unsigned int gssd_running;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern int sunrpc_net_id;
|
|
||||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
|
||||||
index c23458b..5cd7ad1 100644
|
|
||||||
--- a/net/sunrpc/rpc_pipe.c
|
|
||||||
+++ b/net/sunrpc/rpc_pipe.c
|
|
||||||
@@ -216,14 +216,11 @@ rpc_destroy_inode(struct inode *inode)
|
|
||||||
static int
|
|
||||||
rpc_pipe_open(struct inode *inode, struct file *filp)
|
|
||||||
{
|
|
||||||
- struct net *net = inode->i_sb->s_fs_info;
|
|
||||||
- struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
|
||||||
struct rpc_pipe *pipe;
|
|
||||||
int first_open;
|
|
||||||
int res = -ENXIO;
|
|
||||||
|
|
||||||
mutex_lock(&inode->i_mutex);
|
|
||||||
- sn->gssd_running = 1;
|
|
||||||
pipe = RPC_I(inode)->pipe;
|
|
||||||
if (pipe == NULL)
|
|
||||||
goto out;
|
|
||||||
@@ -1222,7 +1219,6 @@ int rpc_pipefs_init_net(struct net *net)
|
|
||||||
return PTR_ERR(sn->gssd_dummy);
|
|
||||||
|
|
||||||
mutex_init(&sn->pipefs_sb_lock);
|
|
||||||
- sn->gssd_running = 1;
|
|
||||||
sn->pipe_version = -1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1376,6 +1372,16 @@ err_depopulate:
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
+bool
|
|
||||||
+gssd_running(struct net *net)
|
|
||||||
+{
|
|
||||||
+ struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
|
|
||||||
+ struct rpc_pipe *pipe = sn->gssd_dummy;
|
|
||||||
+
|
|
||||||
+ return pipe->nreaders || pipe->nwriters;
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL_GPL(gssd_running);
|
|
||||||
+
|
|
||||||
static struct dentry *
|
|
||||||
rpc_mount(struct file_system_type *fs_type,
|
|
||||||
int flags, const char *dev_name, void *data)
|
|
||||||
--
|
|
||||||
1.8.5.3
|
|
||||||
|
|
75
0003-module-remove-MODULE_GENERIC_TABLE.patch
Normal file
75
0003-module-remove-MODULE_GENERIC_TABLE.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From 06d2e746733a83469944481cb7f4fb1c7134a8ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rusty Russell <rusty@rustcorp.com.au>
|
||||||
|
Date: Mon, 3 Feb 2014 11:15:13 +1030
|
||||||
|
Subject: [PATCH 3/3] module: remove MODULE_GENERIC_TABLE
|
||||||
|
|
||||||
|
MODULE_DEVICE_TABLE() calles MODULE_GENERIC_TABLE(); make it do the
|
||||||
|
work directly. This also removes a wart introduced in the last patch,
|
||||||
|
where the alias is defined to be an unknown struct type "struct
|
||||||
|
type##__##name##_device_id" instead of "struct type##_device_id" (it's
|
||||||
|
an extern so GCC doesn't care, but it's wrong).
|
||||||
|
|
||||||
|
The other user of MODULE_GENERIC_TABLE (ISAPNP_CARD_TABLE) is unused,
|
||||||
|
so delete it.
|
||||||
|
|
||||||
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
||||||
|
---
|
||||||
|
include/linux/isapnp.h | 4 ----
|
||||||
|
include/linux/module.h | 19 ++++++++-----------
|
||||||
|
2 files changed, 8 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h
|
||||||
|
index e2d28b0..3c77bf9 100644
|
||||||
|
--- a/include/linux/isapnp.h
|
||||||
|
+++ b/include/linux/isapnp.h
|
||||||
|
@@ -56,10 +56,6 @@
|
||||||
|
#define ISAPNP_DEVICE_ID(_va, _vb, _vc, _function) \
|
||||||
|
{ .vendor = ISAPNP_VENDOR(_va, _vb, _vc), .function = ISAPNP_FUNCTION(_function) }
|
||||||
|
|
||||||
|
-/* export used IDs outside module */
|
||||||
|
-#define ISAPNP_CARD_TABLE(name) \
|
||||||
|
- MODULE_GENERIC_TABLE(isapnp_card, name)
|
||||||
|
-
|
||||||
|
struct isapnp_card_id {
|
||||||
|
unsigned long driver_data; /* data private to the driver */
|
||||||
|
unsigned short card_vendor, card_device;
|
||||||
|
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||||
|
index ad18f60..5686b37 100644
|
||||||
|
--- a/include/linux/module.h
|
||||||
|
+++ b/include/linux/module.h
|
||||||
|
@@ -82,15 +82,6 @@ void sort_extable(struct exception_table_entry *start,
|
||||||
|
void sort_main_extable(void);
|
||||||
|
void trim_init_extable(struct module *m);
|
||||||
|
|
||||||
|
-#ifdef MODULE
|
||||||
|
-#define MODULE_GENERIC_TABLE(gtype, name) \
|
||||||
|
-extern const struct gtype##_id __mod_##gtype##_table \
|
||||||
|
- __attribute__ ((unused, alias(__stringify(name))))
|
||||||
|
-
|
||||||
|
-#else /* !MODULE */
|
||||||
|
-#define MODULE_GENERIC_TABLE(gtype, name)
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
/* Generic info of form tag = "info" */
|
||||||
|
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
|
||||||
|
|
||||||
|
@@ -141,8 +132,14 @@ extern const struct gtype##_id __mod_##gtype##_table \
|
||||||
|
/* What your module does. */
|
||||||
|
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
|
||||||
|
|
||||||
|
-#define MODULE_DEVICE_TABLE(type, name) \
|
||||||
|
- MODULE_GENERIC_TABLE(type##__##name##_device, name)
|
||||||
|
+#ifdef MODULE
|
||||||
|
+/* Creates an alias so file2alias.c can find device table. */
|
||||||
|
+#define MODULE_DEVICE_TABLE(type, name) \
|
||||||
|
+ extern const struct type##_device_id __mod_##type##__##name##_device_table \
|
||||||
|
+ __attribute__ ((unused, alias(__stringify(name))))
|
||||||
|
+#else /* !MODULE */
|
||||||
|
+#define MODULE_DEVICE_TABLE(type, name)
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Version of form [<epoch>:]<version>[-<extra-version>].
|
||||||
|
* Or for CVS/RCS ID version, everything but the number is stripped.
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
From 6aa23d76a7b549521a03b63b6d5b7880ea87eab7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Date: Thu, 14 Nov 2013 07:25:19 -0500
|
|
||||||
Subject: [PATCH 3/6] nfs: check if gssd is running before attempting to use
|
|
||||||
krb5i auth in SETCLIENTID call
|
|
||||||
|
|
||||||
Currently, the client will attempt to use krb5i in the SETCLIENTID call
|
|
||||||
even if rpc.gssd isn't running. When that fails, it'll then fall back to
|
|
||||||
RPC_AUTH_UNIX. This introduced a delay when mounting if rpc.gssd isn't
|
|
||||||
running, and causes warning messages to pop up in the ring buffer.
|
|
||||||
|
|
||||||
Check to see if rpc.gssd is running before even attempting to use krb5i
|
|
||||||
auth, and just silently skip trying to do so if it isn't. In the event
|
|
||||||
that the admin is actually trying to mount with krb5*, it will still
|
|
||||||
fail at a later stage of the mount attempt.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
|
||||||
---
|
|
||||||
fs/nfs/nfs4client.c | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
|
|
||||||
index b4a160a..c1b7a80 100644
|
|
||||||
--- a/fs/nfs/nfs4client.c
|
|
||||||
+++ b/fs/nfs/nfs4client.c
|
|
||||||
@@ -10,6 +10,7 @@
|
|
||||||
#include <linux/sunrpc/auth.h>
|
|
||||||
#include <linux/sunrpc/xprt.h>
|
|
||||||
#include <linux/sunrpc/bc_xprt.h>
|
|
||||||
+#include <linux/sunrpc/rpc_pipe_fs.h>
|
|
||||||
#include "internal.h"
|
|
||||||
#include "callback.h"
|
|
||||||
#include "delegation.h"
|
|
||||||
@@ -370,7 +371,11 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp,
|
|
||||||
__set_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags);
|
|
||||||
__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
|
|
||||||
__set_bit(NFS_CS_NO_RETRANS_TIMEOUT, &clp->cl_flags);
|
|
||||||
- error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_GSS_KRB5I);
|
|
||||||
+
|
|
||||||
+ error = -EINVAL;
|
|
||||||
+ if (gssd_running(clp->cl_net))
|
|
||||||
+ error = nfs_create_rpc_client(clp, timeparms,
|
|
||||||
+ RPC_AUTH_GSS_KRB5I);
|
|
||||||
if (error == -EINVAL)
|
|
||||||
error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX);
|
|
||||||
if (error < 0)
|
|
||||||
--
|
|
||||||
1.8.5.3
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 3396f92f8be606ea485b0a82d4e7749a448b013b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Date: Thu, 5 Dec 2013 07:33:49 -0500
|
|
||||||
Subject: [PATCH 4/6] rpc_pipe: remove the clntXX dir if creating the pipe
|
|
||||||
fails
|
|
||||||
|
|
||||||
In the event that we create the gssd/clntXX dir, but the pipe creation
|
|
||||||
subsequently fails, then we should remove the clntXX dir before
|
|
||||||
returning.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
|
||||||
---
|
|
||||||
net/sunrpc/rpc_pipe.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
|
||||||
index 5cd7ad1..0b74c61 100644
|
|
||||||
--- a/net/sunrpc/rpc_pipe.c
|
|
||||||
+++ b/net/sunrpc/rpc_pipe.c
|
|
||||||
@@ -1313,6 +1313,8 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
|
||||||
}
|
|
||||||
|
|
||||||
pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
|
|
||||||
+ if (IS_ERR(pipe_dentry))
|
|
||||||
+ __rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
|
||||||
out:
|
|
||||||
dput(clnt_dentry);
|
|
||||||
dput(gssd_dentry);
|
|
||||||
--
|
|
||||||
1.8.5.3
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
|||||||
From e2f0c83a9de331d9352185ca3642616c13127539 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Date: Thu, 5 Dec 2013 07:34:44 -0500
|
|
||||||
Subject: [PATCH 5/6] sunrpc: add an "info" file for the dummy gssd pipe
|
|
||||||
|
|
||||||
rpc.gssd expects to see an "info" file in each clntXX dir. Since adding
|
|
||||||
the dummy gssd pipe, users that run rpc.gssd see a lot of these messages
|
|
||||||
spamming the logs:
|
|
||||||
|
|
||||||
rpc.gssd[508]: ERROR: can't open /var/lib/nfs/rpc_pipefs/gssd/clntXX/info: No such file or directory
|
|
||||||
rpc.gssd[508]: ERROR: failed to read service info
|
|
||||||
|
|
||||||
Add a dummy gssd/clntXX/info file to help silence these messages.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
|
||||||
---
|
|
||||||
net/sunrpc/rpc_pipe.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
|
|
||||||
1 file changed, 49 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
|
||||||
index 0b74c61..5d973b2 100644
|
|
||||||
--- a/net/sunrpc/rpc_pipe.c
|
|
||||||
+++ b/net/sunrpc/rpc_pipe.c
|
|
||||||
@@ -17,6 +17,7 @@
|
|
||||||
#include <linux/fsnotify.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/rcupdate.h>
|
|
||||||
+#include <linux/utsname.h>
|
|
||||||
|
|
||||||
#include <asm/ioctls.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
@@ -1275,6 +1276,44 @@ static const struct rpc_pipe_ops gssd_dummy_pipe_ops = {
|
|
||||||
.downcall = dummy_downcall,
|
|
||||||
};
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Here we present a bogus "info" file to keep rpc.gssd happy. We don't expect
|
|
||||||
+ * that it will ever use this info to handle an upcall, but rpc.gssd expects
|
|
||||||
+ * that this file will be there and have a certain format.
|
|
||||||
+ */
|
|
||||||
+static int
|
|
||||||
+rpc_show_dummy_info(struct seq_file *m, void *v)
|
|
||||||
+{
|
|
||||||
+ seq_printf(m, "RPC server: %s\n", utsname()->nodename);
|
|
||||||
+ seq_printf(m, "service: foo (1) version 0\n");
|
|
||||||
+ seq_printf(m, "address: 127.0.0.1\n");
|
|
||||||
+ seq_printf(m, "protocol: tcp\n");
|
|
||||||
+ seq_printf(m, "port: 0\n");
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+rpc_dummy_info_open(struct inode *inode, struct file *file)
|
|
||||||
+{
|
|
||||||
+ return single_open(file, rpc_show_dummy_info, NULL);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct file_operations rpc_dummy_info_operations = {
|
|
||||||
+ .owner = THIS_MODULE,
|
|
||||||
+ .open = rpc_dummy_info_open,
|
|
||||||
+ .read = seq_read,
|
|
||||||
+ .llseek = seq_lseek,
|
|
||||||
+ .release = single_release,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const struct rpc_filelist gssd_dummy_info_file[] = {
|
|
||||||
+ [0] = {
|
|
||||||
+ .name = "info",
|
|
||||||
+ .i_fop = &rpc_dummy_info_operations,
|
|
||||||
+ .mode = S_IFREG | S_IRUSR,
|
|
||||||
+ },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* rpc_gssd_dummy_populate - create a dummy gssd pipe
|
|
||||||
* @root: root of the rpc_pipefs filesystem
|
|
||||||
@@ -1312,9 +1351,18 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data)
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ ret = rpc_populate(clnt_dentry, gssd_dummy_info_file, 0, 1, NULL);
|
|
||||||
+ if (ret) {
|
|
||||||
+ __rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
|
||||||
+ pipe_dentry = ERR_PTR(ret);
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
pipe_dentry = rpc_mkpipe_dentry(clnt_dentry, "gssd", NULL, pipe_data);
|
|
||||||
- if (IS_ERR(pipe_dentry))
|
|
||||||
+ if (IS_ERR(pipe_dentry)) {
|
|
||||||
+ __rpc_depopulate(clnt_dentry, gssd_dummy_info_file, 0, 1);
|
|
||||||
__rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1);
|
|
||||||
+ }
|
|
||||||
out:
|
|
||||||
dput(clnt_dentry);
|
|
||||||
dput(gssd_dentry);
|
|
||||||
--
|
|
||||||
1.8.5.3
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
From 23e66ba97127ff3b064d4c6c5138aa34eafc492f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Date: Mon, 9 Dec 2013 09:38:00 -0500
|
|
||||||
Subject: [PATCH 6/6] rpc_pipe: fix cleanup of dummy gssd directory when
|
|
||||||
notification fails
|
|
||||||
|
|
||||||
Currently, it could leak dentry references in some cases. Make sure
|
|
||||||
we clean up properly.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
||||||
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|
|
||||||
---
|
|
||||||
net/sunrpc/rpc_pipe.c | 14 +++++++++++++-
|
|
||||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
|
|
||||||
index 5d973b2..b185548 100644
|
|
||||||
--- a/net/sunrpc/rpc_pipe.c
|
|
||||||
+++ b/net/sunrpc/rpc_pipe.c
|
|
||||||
@@ -1369,6 +1369,18 @@ out:
|
|
||||||
return pipe_dentry;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void
|
|
||||||
+rpc_gssd_dummy_depopulate(struct dentry *pipe_dentry)
|
|
||||||
+{
|
|
||||||
+ struct dentry *clnt_dir = pipe_dentry->d_parent;
|
|
||||||
+ struct dentry *gssd_dir = clnt_dir->d_parent;
|
|
||||||
+
|
|
||||||
+ __rpc_rmpipe(clnt_dir->d_inode, pipe_dentry);
|
|
||||||
+ __rpc_depopulate(clnt_dir, gssd_dummy_info_file, 0, 1);
|
|
||||||
+ __rpc_depopulate(gssd_dir, gssd_dummy_clnt_dir, 0, 1);
|
|
||||||
+ dput(pipe_dentry);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
rpc_fill_super(struct super_block *sb, void *data, int silent)
|
|
||||||
{
|
|
||||||
@@ -1412,7 +1424,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
err_depopulate:
|
|
||||||
- dput(gssd_dentry);
|
|
||||||
+ rpc_gssd_dummy_depopulate(gssd_dentry);
|
|
||||||
blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
|
|
||||||
RPC_PIPEFS_UMOUNT,
|
|
||||||
sb);
|
|
||||||
--
|
|
||||||
1.8.5.3
|
|
||||||
|
|
72
PKGBUILD
72
PKGBUILD
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
pkgbase=linux # Build stock -ARCH kernel
|
pkgbase=linux # Build stock -ARCH kernel
|
||||||
#pkgbase=linux-custom # Build kernel with a different name
|
#pkgbase=linux-custom # Build kernel with a different name
|
||||||
_srcname=linux-3.13
|
_srcname=linux-3.14
|
||||||
pkgver=3.13.7
|
pkgver=3.14
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
@ -12,40 +12,24 @@ license=('GPL2')
|
|||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
source=("https://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
source=("https://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
||||||
"https://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
|
#"https://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
|
||||||
# the main kernel config files
|
# the main kernel config files
|
||||||
'config' 'config.x86_64'
|
'config' 'config.x86_64'
|
||||||
# standard config files for mkinitcpio ramdisk
|
# standard config files for mkinitcpio ramdisk
|
||||||
'linux.preset'
|
'linux.preset'
|
||||||
'change-default-console-loglevel.patch'
|
'change-default-console-loglevel.patch'
|
||||||
'criu-no-expert.patch'
|
|
||||||
'0001-sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch'
|
|
||||||
'0002-sunrpc-replace-sunrpc_net-gssd_running-flag-with-a-m.patch'
|
|
||||||
'0003-nfs-check-if-gssd-is-running-before-attempting-to-us.patch'
|
|
||||||
'0004-rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-.patch'
|
|
||||||
'0005-sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch'
|
|
||||||
'0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch'
|
|
||||||
'0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch'
|
|
||||||
'0001-Bluetooth-allocate-static-minor-for-vhci.patch'
|
'0001-Bluetooth-allocate-static-minor-for-vhci.patch'
|
||||||
'i8042-fix-aliases.patch'
|
'0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch'
|
||||||
|
'0003-module-remove-MODULE_GENERIC_TABLE.patch'
|
||||||
)
|
)
|
||||||
md5sums=('0ecbaf65c00374eb4a826c2f9f37606f'
|
sha256sums=('61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa'
|
||||||
'cb33b329d3417846d310c7f58a2614b6'
|
'daeeef19e9bb520a6572d7eacf6e8b52e91a8176914c5912389b3e8d7b27aa41'
|
||||||
'ba4468d313adfaf22368add7f58204aa'
|
'12943874b15423e255d05057c87ffe46a93a37cc3bdaa1497a1d07d63d8bd3e5'
|
||||||
'035bb27dac306f5c028d96cad14bb249'
|
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
|
||||||
'eb14dcfd80c00852ef81ded6e826826a'
|
'faced4eb4c47c4eb1a9ee8a5bf8a7c4b49d6b4d78efbe426e410730e6267d182'
|
||||||
'98beb36f9b8cf16e58de2483ea9985e3'
|
'17984c2dafbc3099cafe01dbf03039844099c3cc7719d9bc8633b1ca6a6ab17b'
|
||||||
'989dc54ff8b179b0f80333cc97c0d43f'
|
'03522828e5a2af5b5ccfdedb21ec429797e4391549091781df899e7aacb9818a'
|
||||||
'dd2adb99cd3feed6f11022562901965c'
|
'fa447576b7f86b495ff922f6b217e5c5864484d23428dd62e46f8fb7778cec7c')
|
||||||
'b00cc399d3797cb0793e18b5bf387a50'
|
|
||||||
'7cbd2349cdf046acc37b652c06ba36be'
|
|
||||||
'10dbaf863e22b2437e68f9190d65c861'
|
|
||||||
'd5907a721b97299f0685c583499f7820'
|
|
||||||
'a724515b350b29c53f20e631c6cf9a14'
|
|
||||||
'e6fa278c092ad83780e2dd0568e24ca6'
|
|
||||||
'06f1751777e0772c18c3fa4fbae91aa5'
|
|
||||||
'93dbf73af819b77f03453a9c6de2bb47'
|
|
||||||
)
|
|
||||||
|
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
|
|
||||||
@ -53,7 +37,7 @@ prepare() {
|
|||||||
cd "${srcdir}/${_srcname}"
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
# add upstream patch
|
# add upstream patch
|
||||||
patch -p1 -i "${srcdir}/patch-${pkgver}"
|
#patch -p1 -i "${srcdir}/patch-${pkgver}"
|
||||||
|
|
||||||
# add latest fixes from stable queue, if needed
|
# add latest fixes from stable queue, if needed
|
||||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||||
@ -63,34 +47,16 @@ prepare() {
|
|||||||
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
|
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
|
||||||
patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
|
patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"
|
||||||
|
|
||||||
# allow Checkpoint/restore (for criu) without EXPERT=y
|
|
||||||
patch -p1 -i "${srcdir}/criu-no-expert.patch"
|
|
||||||
|
|
||||||
# fix 15 seocnds nfs delay
|
|
||||||
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=4b9a445e3eeb8bd9278b1ae51c1b3a651e370cd6
|
|
||||||
patch -p1 -i "${srcdir}/0001-sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch"
|
|
||||||
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=89f842435c630f8426f414e6030bc2ffea0d6f81
|
|
||||||
patch -p1 -i "${srcdir}/0002-sunrpc-replace-sunrpc_net-gssd_running-flag-with-a-m.patch"
|
|
||||||
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=6aa23d76a7b549521a03b63b6d5b7880ea87eab7
|
|
||||||
patch -p1 -i "${srcdir}/0003-nfs-check-if-gssd-is-running-before-attempting-to-us.patch"
|
|
||||||
|
|
||||||
# fix nfs kernel oops
|
|
||||||
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=3396f92f8be606ea485b0a82d4e7749a448b013b
|
|
||||||
patch -p1 -i "${srcdir}/0004-rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-.patch"
|
|
||||||
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=e2f0c83a9de331d9352185ca3642616c13127539
|
|
||||||
patch -p1 -i "${srcdir}/0005-sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch"
|
|
||||||
# http://git.linux-nfs.org/?p=trondmy/linux-nfs.git;a=commitdiff;h=23e66ba97127ff3b064d4c6c5138aa34eafc492f
|
|
||||||
patch -p1 -i "${srcdir}/0006-rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-no.patch"
|
|
||||||
|
|
||||||
# Fix symbols: Revert http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=83460ec8dcac14142e7860a01fa59c267ac4657c
|
# Fix symbols: Revert http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=83460ec8dcac14142e7860a01fa59c267ac4657c
|
||||||
patch -Rp1 -i "${srcdir}/0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch"
|
#patch -Rp1 -i "${srcdir}/0001-syscalls.h-use-gcc-alias-instead-of-assembler-aliase.patch"
|
||||||
|
|
||||||
# Fix i8042 aliases
|
|
||||||
patch -p1 -i "${srcdir}/i8042-fix-aliases.patch"
|
|
||||||
|
|
||||||
# Fix vhci warning in kmod (to restore every kernel maintainer's sanity)
|
# Fix vhci warning in kmod (to restore every kernel maintainer's sanity)
|
||||||
patch -p1 -i "${srcdir}/0001-Bluetooth-allocate-static-minor-for-vhci.patch"
|
patch -p1 -i "${srcdir}/0001-Bluetooth-allocate-static-minor-for-vhci.patch"
|
||||||
|
|
||||||
|
# Fix atkbd aliases
|
||||||
|
patch -p1 -i "${srcdir}/0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch"
|
||||||
|
patch -p1 -i "${srcdir}/0003-module-remove-MODULE_GENERIC_TABLE.patch"
|
||||||
|
|
||||||
if [ "${CARCH}" = "x86_64" ]; then
|
if [ "${CARCH}" = "x86_64" ]; then
|
||||||
cat "${srcdir}/config.x86_64" > ./.config
|
cat "${srcdir}/config.x86_64" > ./.config
|
||||||
else
|
else
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/init/Kconfig b/init/Kconfig
|
|
||||||
index 4e5d96a..4b94ffe 100644
|
|
||||||
--- a/init/Kconfig
|
|
||||||
+++ b/init/Kconfig
|
|
||||||
@@ -1078,7 +1078,7 @@ config DEBUG_BLK_CGROUP
|
|
||||||
endif # CGROUPS
|
|
||||||
|
|
||||||
config CHECKPOINT_RESTORE
|
|
||||||
- bool "Checkpoint/restore support" if EXPERT
|
|
||||||
+ bool "Checkpoint/restore support"
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
Enables additional kernel features in a sake of checkpoint/restore.
|
|
@ -1,113 +0,0 @@
|
|||||||
commit 5a420e61e39862c7c3356080eddb23dfe4ccadb7
|
|
||||||
Author: Tom Gundersen <teg@jklm.no>
|
|
||||||
Date: Sun Jan 26 17:00:32 2014 +0100
|
|
||||||
|
|
||||||
Input: i8042 - fix PNP modaliases when both aux and kdb are enabled
|
|
||||||
|
|
||||||
Commit 78551277e4 exposed the PNP modaliases for the i8042 module. However,
|
|
||||||
when both the aux and the kbd drivers are enabled the aux entries would
|
|
||||||
override the kdb ones.
|
|
||||||
|
|
||||||
Refactor the device_id lists, and unconditionally attempt to load the driver
|
|
||||||
if either a kdb or aux devices is present.
|
|
||||||
|
|
||||||
Signed-off-by: Tom Gundersen <teg@jklm.no>
|
|
||||||
|
|
||||||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
|
|
||||||
index 0ec9abb..dbc6958 100644
|
|
||||||
--- a/drivers/input/serio/i8042-x86ia64io.h
|
|
||||||
+++ b/drivers/input/serio/i8042-x86ia64io.h
|
|
||||||
@@ -747,25 +747,27 @@ static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static struct pnp_device_id pnp_kbd_devids[] = {
|
|
||||||
- { .id = "PNP0300", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0301", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0302", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0303", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0304", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0305", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0306", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0309", .driver_data = 0 },
|
|
||||||
- { .id = "PNP030a", .driver_data = 0 },
|
|
||||||
- { .id = "PNP030b", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0320", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0343", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0344", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0345", .driver_data = 0 },
|
|
||||||
+#define KBD_DEVIDS \
|
|
||||||
+ { .id = "PNP0300", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0301", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0302", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0303", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0304", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0305", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0306", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0309", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP030a", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP030b", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0320", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0343", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0344", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0345", .driver_data = 0 }, \
|
|
||||||
{ .id = "CPQA0D7", .driver_data = 0 },
|
|
||||||
+
|
|
||||||
+static struct pnp_device_id pnp_kbd_devids[] = {
|
|
||||||
+ KBD_DEVIDS
|
|
||||||
{ .id = "", },
|
|
||||||
};
|
|
||||||
-MODULE_DEVICE_TABLE(pnp, pnp_kbd_devids);
|
|
||||||
|
|
||||||
static struct pnp_driver i8042_pnp_kbd_driver = {
|
|
||||||
.name = "i8042 kbd",
|
|
||||||
@@ -773,21 +775,23 @@ static struct pnp_driver i8042_pnp_kbd_driver = {
|
|
||||||
.probe = i8042_pnp_kbd_probe,
|
|
||||||
};
|
|
||||||
|
|
||||||
-static struct pnp_device_id pnp_aux_devids[] = {
|
|
||||||
- { .id = "AUI0200", .driver_data = 0 },
|
|
||||||
- { .id = "FJC6000", .driver_data = 0 },
|
|
||||||
- { .id = "FJC6001", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f03", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f0b", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f0e", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f12", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f13", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f19", .driver_data = 0 },
|
|
||||||
- { .id = "PNP0f1c", .driver_data = 0 },
|
|
||||||
+#define AUX_DEVIDS \
|
|
||||||
+ { .id = "AUI0200", .driver_data = 0 }, \
|
|
||||||
+ { .id = "FJC6000", .driver_data = 0 }, \
|
|
||||||
+ { .id = "FJC6001", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f03", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f0b", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f0e", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f12", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f13", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f19", .driver_data = 0 }, \
|
|
||||||
+ { .id = "PNP0f1c", .driver_data = 0 }, \
|
|
||||||
{ .id = "SYN0801", .driver_data = 0 },
|
|
||||||
+
|
|
||||||
+static struct pnp_device_id pnp_aux_devids[] = {
|
|
||||||
+ AUX_DEVIDS
|
|
||||||
{ .id = "", },
|
|
||||||
};
|
|
||||||
-MODULE_DEVICE_TABLE(pnp, pnp_aux_devids);
|
|
||||||
|
|
||||||
static struct pnp_driver i8042_pnp_aux_driver = {
|
|
||||||
.name = "i8042 aux",
|
|
||||||
@@ -795,6 +799,13 @@ static struct pnp_driver i8042_pnp_aux_driver = {
|
|
||||||
.probe = i8042_pnp_aux_probe,
|
|
||||||
};
|
|
||||||
|
|
||||||
+static struct pnp_device_id pnp_kdb_aux_devids[] = {
|
|
||||||
+ KBD_DEVIDS
|
|
||||||
+ AUX_DEVIDS
|
|
||||||
+ { .id = "", },
|
|
||||||
+};
|
|
||||||
+MODULE_DEVICE_TABLE(pnp, pnp_kdb_aux_devids);
|
|
||||||
+
|
|
||||||
static void i8042_pnp_exit(void)
|
|
||||||
{
|
|
||||||
if (i8042_pnp_kbd_registered) {
|
|
Loading…
Reference in New Issue
Block a user