Update linux-drd to 3.12.8
This commit is contained in:
parent
234fb05864
commit
02803f082d
11 changed files with 712 additions and 134 deletions
3
linux-drd/.gitignore
vendored
3
linux-drd/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
config.x86_64.last
|
config.x86_64.last*
|
||||||
patch-*.xz
|
patch-*.xz
|
||||||
|
linux.install.pkg
|
||||||
|
|
|
@ -1,26 +1,35 @@
|
||||||
# $Id: PKGBUILD 199010 2013-11-06 08:27:18Z tpowa $
|
# $Id: PKGBUILD 204289 2014-01-16 11:42:03Z tpowa $
|
||||||
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
|
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
|
||||||
# Maintainer: Thomas Baechler <thomas@archlinux.org>
|
# Maintainer: Thomas Baechler <thomas@archlinux.org>
|
||||||
|
|
||||||
# pkgbase=linux # Build stock -ARCH kernel
|
# pkgbase=linux # Build stock -ARCH kernel
|
||||||
pkgbase=linux-drd # Build kernel with a different name
|
pkgbase=linux-drd # Build kernel with a different name
|
||||||
_srcname=linux-3.12
|
_srcname=linux-3.12
|
||||||
pkgver=3.12.6
|
pkgver=3.12.8
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
source=(
|
||||||
"http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
|
"http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
||||||
# the main kernel config files
|
"http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
|
||||||
'config' 'config.x86_64'
|
# the main kernel config files
|
||||||
# standard config files for mkinitcpio ramdisk
|
'config' 'config.x86_64'
|
||||||
'linux.preset'
|
# standard config files for mkinitcpio ramdisk
|
||||||
'change-default-console-loglevel.patch'
|
'linux.preset'
|
||||||
'criu-no-expert.patch'
|
'change-default-console-loglevel.patch'
|
||||||
'aufs3-standalone::git://git.code.sf.net/p/aufs/aufs3-standalone#branch=aufs3.12')
|
'criu-no-expert.patch'
|
||||||
|
'sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch'
|
||||||
|
'sunrpc-replace-gssd_running-with-more-reliable-check.patch'
|
||||||
|
'nfs-check-gssd-running-before-krb5i-auth.patch'
|
||||||
|
'rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-fails.patch'
|
||||||
|
'sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch'
|
||||||
|
'rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-notification-fails.patch'
|
||||||
|
'aufs3-standalone::git://git.code.sf.net/p/aufs/aufs3-standalone#branch=aufs3.12'
|
||||||
|
'aufs3-mmap.patch'
|
||||||
|
)
|
||||||
|
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
|
|
||||||
|
@ -48,11 +57,22 @@ prepare() {
|
||||||
# patch from fedora
|
# patch from fedora
|
||||||
patch -Np1 -i "${srcdir}/criu-no-expert.patch"
|
patch -Np1 -i "${srcdir}/criu-no-expert.patch"
|
||||||
|
|
||||||
# # aufs3
|
# fix 15 seocnds nfs delay
|
||||||
|
patch -Np1 -i "${srcdir}/sunrpc-create-a-new-dummy-pipe-for-gssd-to-hold-open.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/sunrpc-replace-gssd_running-with-more-reliable-check.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/nfs-check-gssd-running-before-krb5i-auth.patch"
|
||||||
|
# fix nfs kernel oops
|
||||||
|
# #37866
|
||||||
|
patch -Np1 -i "${srcdir}/rpc_pipe-remove-the-clntXX-dir-if-creating-the-pipe-fails.patch"
|
||||||
|
patch -Np1 -i "${srcdir}/sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch"
|
||||||
|
|
||||||
|
patch -Np1 -i "${srcdir}/rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-notification-fails.patch"
|
||||||
|
|
||||||
|
## aufs3
|
||||||
patch -p1 -i "${srcdir}/aufs3-standalone/aufs3-kbuild.patch"
|
patch -p1 -i "${srcdir}/aufs3-standalone/aufs3-kbuild.patch"
|
||||||
patch -p1 -i "${srcdir}/aufs3-standalone/aufs3-base.patch"
|
patch -p1 -i "${srcdir}/aufs3-standalone/aufs3-base.patch"
|
||||||
patch -p1 -i "${srcdir}/aufs3-standalone/aufs3-mmap.patch"
|
# patch -p1 -i "${srcdir}/aufs3-standalone/aufs3-mmap.patch"
|
||||||
# patch -p1 -i "${srcdir}/aufs3-mmap.patch"
|
patch -p1 -i "${srcdir}/aufs3-mmap.patch"
|
||||||
cp -R "${srcdir}/aufs3-standalone/Documentation" .
|
cp -R "${srcdir}/aufs3-standalone/Documentation" .
|
||||||
cp -R "${srcdir}/aufs3-standalone/fs" .
|
cp -R "${srcdir}/aufs3-standalone/fs" .
|
||||||
cp -R "${srcdir}/aufs3-standalone/include/uapi/linux/aufs_type.h" \
|
cp -R "${srcdir}/aufs3-standalone/include/uapi/linux/aufs_type.h" \
|
||||||
|
@ -84,8 +104,8 @@ build() {
|
||||||
|
|
||||||
# load configuration
|
# load configuration
|
||||||
# Configure the kernel. Replace the line below with one of your choice.
|
# Configure the kernel. Replace the line below with one of your choice.
|
||||||
make menuconfig # CLI menu for configuration
|
#make menuconfig # CLI menu for configuration
|
||||||
#make nconfig # new CLI menu for configuration
|
make nconfig # new CLI menu for configuration
|
||||||
#make xconfig # X-based configuration
|
#make xconfig # X-based configuration
|
||||||
#make oldconfig # using old config from previous kernel version
|
#make oldconfig # using old config from previous kernel version
|
||||||
# ... or manually edit .config
|
# ... or manually edit .config
|
||||||
|
@ -351,10 +371,17 @@ for _p in ${pkgname[@]}; do
|
||||||
done
|
done
|
||||||
|
|
||||||
md5sums=('cc6ee608854e0da4b64f6c1ff8b6398c'
|
md5sums=('cc6ee608854e0da4b64f6c1ff8b6398c'
|
||||||
'9e75be8b127e58f1a76c0015eabb12ae'
|
'03d34842e3a1197d17055610f62627b8'
|
||||||
'798bca5d2f0a1505c9b86a5227a2b339'
|
'a9281e90e529795eaf10b45d70ab2868'
|
||||||
'a038d66d835bcaa61d3083dde31d56e0'
|
'04b3adc5c78f9db16dfe8075205d73a0'
|
||||||
'eb14dcfd80c00852ef81ded6e826826a'
|
'eb14dcfd80c00852ef81ded6e826826a'
|
||||||
'98beb36f9b8cf16e58de2483ea9985e3'
|
'98beb36f9b8cf16e58de2483ea9985e3'
|
||||||
'd50c1ac47394e9aec637002ef3392bd1'
|
'd50c1ac47394e9aec637002ef3392bd1'
|
||||||
'SKIP')
|
'd4a75f77e6bd5d700dcd534cd5f0dfce'
|
||||||
|
'dc86fdc37615c97f03c1e0c31b7b833a'
|
||||||
|
'88eef9d3b5012ef7e82af1af8cc4e517'
|
||||||
|
'cec0bb8981936eab2943b2009b7a6fff'
|
||||||
|
'88d9cddf9e0050a76ec4674f264fb2a1'
|
||||||
|
'cb9016630212ef07b168892fbcfd4e5d'
|
||||||
|
'SKIP'
|
||||||
|
'f1d75b8006daca313788e2f01d6a5465')
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
aufs3.11 mmap patch
|
aufs3.12 mmap patch
|
||||||
|
|
||||||
diff --git a/fs/buffer.c b/fs/buffer.c
|
diff --git a/fs/buffer.c b/fs/buffer.c
|
||||||
index 4d74335..3b1db7d 100644
|
index 6024877..95bbf13 100644
|
||||||
--- a/fs/buffer.c
|
--- a/fs/buffer.c
|
||||||
+++ b/fs/buffer.c
|
+++ b/fs/buffer.c
|
||||||
@@ -2436,7 +2436,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
|
@@ -2446,7 +2446,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
|
||||||
* Update file times before taking page lock. We may end up failing the
|
* Update file times before taking page lock. We may end up failing the
|
||||||
* fault so this update may be superfluous but who really cares...
|
* fault so this update may be superfluous but who really cares...
|
||||||
*/
|
*/
|
||||||
- file_update_time(vma->vm_file);
|
- file_update_time(vma->vm_file);
|
||||||
+ vma_file_update_time(vma);
|
+ vma_file_update_time(vma);
|
||||||
|
|
||||||
ret = __block_page_mkwrite(vma, vmf, get_block);
|
ret = __block_page_mkwrite(vma, vmf, get_block);
|
||||||
sb_end_pagefault(sb);
|
sb_end_pagefault(sb);
|
||||||
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
|
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
|
||||||
|
@ -19,7 +19,7 @@ index ccfd99b..bca7789 100644
|
||||||
+++ b/fs/proc/nommu.c
|
+++ b/fs/proc/nommu.c
|
||||||
@@ -45,7 +45,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
|
@@ -45,7 +45,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
|
||||||
file = region->vm_file;
|
file = region->vm_file;
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
- struct inode *inode = file_inode(region->vm_file);
|
- struct inode *inode = file_inode(region->vm_file);
|
||||||
+ struct inode *inode;
|
+ struct inode *inode;
|
||||||
|
@ -29,12 +29,12 @@ index ccfd99b..bca7789 100644
|
||||||
ino = inode->i_ino;
|
ino = inode->i_ino;
|
||||||
}
|
}
|
||||||
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
|
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
|
||||||
index 107d026..9942e5f 100644
|
index 390bdab..ad05546 100644
|
||||||
--- a/fs/proc/task_mmu.c
|
--- a/fs/proc/task_mmu.c
|
||||||
+++ b/fs/proc/task_mmu.c
|
+++ b/fs/proc/task_mmu.c
|
||||||
@@ -272,7 +272,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
|
@@ -272,7 +272,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
- struct inode *inode = file_inode(vma->vm_file);
|
- struct inode *inode = file_inode(vma->vm_file);
|
||||||
+ struct inode *inode;
|
+ struct inode *inode;
|
||||||
|
@ -43,9 +43,9 @@ index 107d026..9942e5f 100644
|
||||||
dev = inode->i_sb->s_dev;
|
dev = inode->i_sb->s_dev;
|
||||||
ino = inode->i_ino;
|
ino = inode->i_ino;
|
||||||
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
|
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
|
||||||
@@ -1382,6 +1384,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
|
@@ -1412,6 +1414,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
|
||||||
seq_printf(m, "%08lx %s", vma->vm_start, buffer);
|
seq_printf(m, "%08lx %s", vma->vm_start, buffer);
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
+ file = vma_pr_or_file(vma);
|
+ file = vma_pr_or_file(vma);
|
||||||
seq_printf(m, " file=");
|
seq_printf(m, " file=");
|
||||||
|
@ -57,7 +57,7 @@ index 56123a6..d19737f 100644
|
||||||
+++ b/fs/proc/task_nommu.c
|
+++ b/fs/proc/task_nommu.c
|
||||||
@@ -149,7 +149,9 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
|
@@ -149,7 +149,9 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
|
||||||
file = vma->vm_file;
|
file = vma->vm_file;
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
- struct inode *inode = file_inode(vma->vm_file);
|
- struct inode *inode = file_inode(vma->vm_file);
|
||||||
+ struct inode *inode;
|
+ struct inode *inode;
|
||||||
|
@ -67,7 +67,7 @@ index 56123a6..d19737f 100644
|
||||||
ino = inode->i_ino;
|
ino = inode->i_ino;
|
||||||
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
|
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
|
||||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||||
index f022460..4f3e9ca 100644
|
index 8b6e55e..1359c80 100644
|
||||||
--- a/include/linux/mm.h
|
--- a/include/linux/mm.h
|
||||||
+++ b/include/linux/mm.h
|
+++ b/include/linux/mm.h
|
||||||
@@ -17,6 +17,9 @@
|
@@ -17,6 +17,9 @@
|
||||||
|
@ -77,13 +77,13 @@ index f022460..4f3e9ca 100644
|
||||||
+#include <linux/dcache.h>
|
+#include <linux/dcache.h>
|
||||||
+#include <linux/file.h>
|
+#include <linux/file.h>
|
||||||
+#include <linux/fs.h>
|
+#include <linux/fs.h>
|
||||||
|
|
||||||
struct mempolicy;
|
struct mempolicy;
|
||||||
struct anon_vma;
|
struct anon_vma;
|
||||||
@@ -1023,6 +1026,87 @@ static inline int fixup_user_fault(struct task_struct *tsk,
|
@@ -1017,6 +1020,87 @@ static inline int fixup_user_fault(struct task_struct *tsk,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+/*
|
+/*
|
||||||
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
|
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
|
||||||
+ * in /proc/PID/maps.
|
+ * in /proc/PID/maps.
|
||||||
|
@ -169,7 +169,7 @@ index f022460..4f3e9ca 100644
|
||||||
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
|
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
|
||||||
void *buf, int len, int write);
|
void *buf, int len, int write);
|
||||||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
|
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
|
||||||
index faf4b7c..cd750ff 100644
|
index d9851ee..4bde7bf 100644
|
||||||
--- a/include/linux/mm_types.h
|
--- a/include/linux/mm_types.h
|
||||||
+++ b/include/linux/mm_types.h
|
+++ b/include/linux/mm_types.h
|
||||||
@@ -213,6 +213,7 @@ struct vm_region {
|
@@ -213,6 +213,7 @@ struct vm_region {
|
||||||
|
@ -177,7 +177,7 @@ index faf4b7c..cd750ff 100644
|
||||||
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
|
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
|
||||||
struct file *vm_file; /* the backing file or NULL */
|
struct file *vm_file; /* the backing file or NULL */
|
||||||
+ struct file *vm_prfile; /* the virtual backing file or NULL */
|
+ struct file *vm_prfile; /* the virtual backing file or NULL */
|
||||||
|
|
||||||
int vm_usage; /* region usage count (access under nommu_region_sem) */
|
int vm_usage; /* region usage count (access under nommu_region_sem) */
|
||||||
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
|
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
|
||||||
@@ -281,6 +282,7 @@ struct vm_area_struct {
|
@@ -281,6 +282,7 @@ struct vm_area_struct {
|
||||||
|
@ -186,28 +186,28 @@ index faf4b7c..cd750ff 100644
|
||||||
struct file * vm_file; /* File we map to (can be NULL). */
|
struct file * vm_file; /* File we map to (can be NULL). */
|
||||||
+ struct file *vm_prfile; /* shadow of vm_file */
|
+ struct file *vm_prfile; /* shadow of vm_file */
|
||||||
void * vm_private_data; /* was vm_pte (shared mem) */
|
void * vm_private_data; /* was vm_pte (shared mem) */
|
||||||
|
|
||||||
#ifndef CONFIG_MMU
|
#ifndef CONFIG_MMU
|
||||||
diff --git a/kernel/fork.c b/kernel/fork.c
|
diff --git a/kernel/fork.c b/kernel/fork.c
|
||||||
index bf46287..947c36d 100644
|
index 086fe73..003e30c 100644
|
||||||
--- a/kernel/fork.c
|
--- a/kernel/fork.c
|
||||||
+++ b/kernel/fork.c
|
+++ b/kernel/fork.c
|
||||||
@@ -415,7 +415,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
|
@@ -412,7 +412,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
|
||||||
struct inode *inode = file_inode(file);
|
struct inode *inode = file_inode(file);
|
||||||
struct address_space *mapping = file->f_mapping;
|
struct address_space *mapping = file->f_mapping;
|
||||||
|
|
||||||
- get_file(file);
|
- get_file(file);
|
||||||
+ vma_get_file(tmp);
|
+ vma_get_file(tmp);
|
||||||
if (tmp->vm_flags & VM_DENYWRITE)
|
if (tmp->vm_flags & VM_DENYWRITE)
|
||||||
atomic_dec(&inode->i_writecount);
|
atomic_dec(&inode->i_writecount);
|
||||||
mutex_lock(&mapping->i_mmap_mutex);
|
mutex_lock(&mapping->i_mmap_mutex);
|
||||||
diff --git a/mm/filemap.c b/mm/filemap.c
|
diff --git a/mm/filemap.c b/mm/filemap.c
|
||||||
index 4b51ac1..cc2fd08 100644
|
index ae4846f..3f890ee 100644
|
||||||
--- a/mm/filemap.c
|
--- a/mm/filemap.c
|
||||||
+++ b/mm/filemap.c
|
+++ b/mm/filemap.c
|
||||||
@@ -1733,7 +1733,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
|
@@ -1735,7 +1735,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||||
int ret = VM_FAULT_LOCKED;
|
int ret = VM_FAULT_LOCKED;
|
||||||
|
|
||||||
sb_start_pagefault(inode->i_sb);
|
sb_start_pagefault(inode->i_sb);
|
||||||
- file_update_time(vma->vm_file);
|
- file_update_time(vma->vm_file);
|
||||||
+ vma_file_update_time(vma);
|
+ vma_file_update_time(vma);
|
||||||
|
@ -224,17 +224,18 @@ index 5bff081..246a9c7 100644
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
- struct file *file = get_file(vma->vm_file);
|
- struct file *file = get_file(vma->vm_file);
|
||||||
+ struct file *file = vma->vm_file;
|
+ struct file *file = vma->vm_file;
|
||||||
|
/* mmap_region may free vma; grab the info now */
|
||||||
|
vm_flags = vma->vm_flags;
|
||||||
|
|
||||||
+ vma_get_file(vma);
|
+ vma_get_file(vma);
|
||||||
addr = mmap_region(file, start, size,
|
addr = mmap_region(file, start, size, vm_flags, pgoff);
|
||||||
vma->vm_flags, pgoff);
|
|
||||||
- fput(file);
|
- fput(file);
|
||||||
+ vma_fput(vma);
|
+ vma_fput(vma);
|
||||||
if (IS_ERR_VALUE(addr)) {
|
if (IS_ERR_VALUE(addr)) {
|
||||||
err = addr;
|
err = addr;
|
||||||
} else {
|
} else {
|
||||||
diff --git a/mm/madvise.c b/mm/madvise.c
|
diff --git a/mm/madvise.c b/mm/madvise.c
|
||||||
index 7055883..e6b768d 100644
|
index 539eeb9..5e700b1 100644
|
||||||
--- a/mm/madvise.c
|
--- a/mm/madvise.c
|
||||||
+++ b/mm/madvise.c
|
+++ b/mm/madvise.c
|
||||||
@@ -327,12 +327,12 @@ static long madvise_remove(struct vm_area_struct *vma,
|
@@ -327,12 +327,12 @@ static long madvise_remove(struct vm_area_struct *vma,
|
||||||
|
@ -253,10 +254,10 @@ index 7055883..e6b768d 100644
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
diff --git a/mm/memory.c b/mm/memory.c
|
diff --git a/mm/memory.c b/mm/memory.c
|
||||||
index af84bc0..95a666b 100644
|
index d176154..49cafa9 100644
|
||||||
--- a/mm/memory.c
|
--- a/mm/memory.c
|
||||||
+++ b/mm/memory.c
|
+++ b/mm/memory.c
|
||||||
@@ -2754,7 +2754,7 @@ reuse:
|
@@ -2745,7 +2745,7 @@ reuse:
|
||||||
set_page_dirty_balance(dirty_page, page_mkwrite);
|
set_page_dirty_balance(dirty_page, page_mkwrite);
|
||||||
/* file_update_time outside page_lock */
|
/* file_update_time outside page_lock */
|
||||||
if (vma->vm_file)
|
if (vma->vm_file)
|
||||||
|
@ -265,8 +266,8 @@ index af84bc0..95a666b 100644
|
||||||
}
|
}
|
||||||
put_page(dirty_page);
|
put_page(dirty_page);
|
||||||
if (page_mkwrite) {
|
if (page_mkwrite) {
|
||||||
@@ -3465,7 +3465,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
@@ -3456,7 +3456,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||||
|
|
||||||
/* file_update_time outside page_lock */
|
/* file_update_time outside page_lock */
|
||||||
if (vma->vm_file && !page_mkwrite)
|
if (vma->vm_file && !page_mkwrite)
|
||||||
- file_update_time(vma->vm_file);
|
- file_update_time(vma->vm_file);
|
||||||
|
@ -275,7 +276,7 @@ index af84bc0..95a666b 100644
|
||||||
unlock_page(vmf.page);
|
unlock_page(vmf.page);
|
||||||
if (anon)
|
if (anon)
|
||||||
diff --git a/mm/mmap.c b/mm/mmap.c
|
diff --git a/mm/mmap.c b/mm/mmap.c
|
||||||
index f9c97d1..dbd8dd2 100644
|
index 9d54851..64ae6ce 100644
|
||||||
--- a/mm/mmap.c
|
--- a/mm/mmap.c
|
||||||
+++ b/mm/mmap.c
|
+++ b/mm/mmap.c
|
||||||
@@ -250,7 +250,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
|
@@ -250,7 +250,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
|
||||||
|
@ -296,26 +297,26 @@ index f9c97d1..dbd8dd2 100644
|
||||||
}
|
}
|
||||||
if (next->anon_vma)
|
if (next->anon_vma)
|
||||||
anon_vma_merge(vma, next);
|
anon_vma_merge(vma, next);
|
||||||
@@ -1621,8 +1621,8 @@ out:
|
@@ -1622,8 +1622,8 @@ out:
|
||||||
unmap_and_free_vma:
|
unmap_and_free_vma:
|
||||||
if (vm_flags & VM_DENYWRITE)
|
if (vm_flags & VM_DENYWRITE)
|
||||||
allow_write_access(file);
|
allow_write_access(file);
|
||||||
+ vma_fput(vma);
|
+ vma_fput(vma);
|
||||||
vma->vm_file = NULL;
|
vma->vm_file = NULL;
|
||||||
- fput(file);
|
- fput(file);
|
||||||
|
|
||||||
/* Undo any partial mapping done by a device driver. */
|
/* Undo any partial mapping done by a device driver. */
|
||||||
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
|
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
|
||||||
@@ -2415,7 +2415,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
@@ -2412,7 +2412,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
||||||
goto out_free_mpol;
|
goto out_free_mpol;
|
||||||
|
|
||||||
if (new->vm_file)
|
if (new->vm_file)
|
||||||
- get_file(new->vm_file);
|
- get_file(new->vm_file);
|
||||||
+ vma_get_file(new);
|
+ vma_get_file(new);
|
||||||
|
|
||||||
if (new->vm_ops && new->vm_ops->open)
|
if (new->vm_ops && new->vm_ops->open)
|
||||||
new->vm_ops->open(new);
|
new->vm_ops->open(new);
|
||||||
@@ -2434,7 +2434,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
@@ -2431,7 +2431,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
|
||||||
if (new->vm_ops && new->vm_ops->close)
|
if (new->vm_ops && new->vm_ops->close)
|
||||||
new->vm_ops->close(new);
|
new->vm_ops->close(new);
|
||||||
if (new->vm_file)
|
if (new->vm_file)
|
||||||
|
@ -323,8 +324,8 @@ index f9c97d1..dbd8dd2 100644
|
||||||
+ vma_fput(new);
|
+ vma_fput(new);
|
||||||
unlink_anon_vmas(new);
|
unlink_anon_vmas(new);
|
||||||
out_free_mpol:
|
out_free_mpol:
|
||||||
mpol_put(pol);
|
mpol_put(vma_policy(new));
|
||||||
@@ -2833,7 +2833,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
|
@@ -2828,7 +2828,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
|
||||||
if (anon_vma_clone(new_vma, vma))
|
if (anon_vma_clone(new_vma, vma))
|
||||||
goto out_free_mempol;
|
goto out_free_mempol;
|
||||||
if (new_vma->vm_file)
|
if (new_vma->vm_file)
|
||||||
|
@ -356,11 +357,11 @@ index ecd1f15..d4306cd 100644
|
||||||
+++ b/mm/nommu.c
|
+++ b/mm/nommu.c
|
||||||
@@ -652,7 +652,7 @@ static void __put_nommu_region(struct vm_region *region)
|
@@ -652,7 +652,7 @@ static void __put_nommu_region(struct vm_region *region)
|
||||||
up_write(&nommu_region_sem);
|
up_write(&nommu_region_sem);
|
||||||
|
|
||||||
if (region->vm_file)
|
if (region->vm_file)
|
||||||
- fput(region->vm_file);
|
- fput(region->vm_file);
|
||||||
+ vmr_fput(region);
|
+ vmr_fput(region);
|
||||||
|
|
||||||
/* IO memory and memory shared directly out of the pagecache
|
/* IO memory and memory shared directly out of the pagecache
|
||||||
* from ramfs/tmpfs mustn't be released here */
|
* from ramfs/tmpfs mustn't be released here */
|
||||||
@@ -810,7 +810,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
|
@@ -810,7 +810,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86 3.12.0-1 Kernel Configuration
|
# Linux/x86 3.12.7-1 Kernel Configuration
|
||||||
#
|
#
|
||||||
# CONFIG_64BIT is not set
|
# CONFIG_64BIT is not set
|
||||||
CONFIG_X86_32=y
|
CONFIG_X86_32=y
|
||||||
|
@ -1455,7 +1455,7 @@ CONFIG_DEVTMPFS=y
|
||||||
CONFIG_STANDALONE=y
|
CONFIG_STANDALONE=y
|
||||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||||
CONFIG_FW_LOADER=y
|
CONFIG_FW_LOADER=y
|
||||||
CONFIG_FIRMWARE_IN_KERNEL=y
|
# CONFIG_FIRMWARE_IN_KERNEL is not set
|
||||||
CONFIG_EXTRA_FIRMWARE=""
|
CONFIG_EXTRA_FIRMWARE=""
|
||||||
CONFIG_FW_LOADER_USER_HELPER=y
|
CONFIG_FW_LOADER_USER_HELPER=y
|
||||||
# CONFIG_DEBUG_DRIVER is not set
|
# CONFIG_DEBUG_DRIVER is not set
|
||||||
|
@ -3169,7 +3169,15 @@ CONFIG_I2C=m
|
||||||
CONFIG_I2C_BOARDINFO=y
|
CONFIG_I2C_BOARDINFO=y
|
||||||
CONFIG_I2C_COMPAT=y
|
CONFIG_I2C_COMPAT=y
|
||||||
CONFIG_I2C_CHARDEV=m
|
CONFIG_I2C_CHARDEV=m
|
||||||
# CONFIG_I2C_MUX is not set
|
CONFIG_I2C_MUX=m
|
||||||
|
|
||||||
|
#
|
||||||
|
# Multiplexer I2C Chip support
|
||||||
|
#
|
||||||
|
# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set
|
||||||
|
# CONFIG_I2C_MUX_GPIO is not set
|
||||||
|
CONFIG_I2C_MUX_PCA9541=m
|
||||||
|
CONFIG_I2C_MUX_PCA954x=m
|
||||||
CONFIG_I2C_HELPER_AUTO=y
|
CONFIG_I2C_HELPER_AUTO=y
|
||||||
CONFIG_I2C_SMBUS=m
|
CONFIG_I2C_SMBUS=m
|
||||||
CONFIG_I2C_ALGOBIT=m
|
CONFIG_I2C_ALGOBIT=m
|
||||||
|
@ -4895,18 +4903,6 @@ CONFIG_USB_SERIAL_IPW=m
|
||||||
CONFIG_USB_SERIAL_IUU=m
|
CONFIG_USB_SERIAL_IUU=m
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_PDA=m
|
CONFIG_USB_SERIAL_KEYSPAN_PDA=m
|
||||||
CONFIG_USB_SERIAL_KEYSPAN=m
|
CONFIG_USB_SERIAL_KEYSPAN=m
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_MPR=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA28=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA19=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
|
|
||||||
CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
|
|
||||||
CONFIG_USB_SERIAL_KLSI=m
|
CONFIG_USB_SERIAL_KLSI=m
|
||||||
CONFIG_USB_SERIAL_KOBIL_SCT=m
|
CONFIG_USB_SERIAL_KOBIL_SCT=m
|
||||||
CONFIG_USB_SERIAL_MCT_U232=m
|
CONFIG_USB_SERIAL_MCT_U232=m
|
||||||
|
@ -5277,7 +5273,6 @@ CONFIG_DMA_OF=y
|
||||||
#
|
#
|
||||||
# DMA Clients
|
# DMA Clients
|
||||||
#
|
#
|
||||||
CONFIG_NET_DMA=y
|
|
||||||
CONFIG_ASYNC_TX_DMA=y
|
CONFIG_ASYNC_TX_DMA=y
|
||||||
# CONFIG_DMATEST is not set
|
# CONFIG_DMATEST is not set
|
||||||
CONFIG_DCA=m
|
CONFIG_DCA=m
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86 3.12.5-1 Kernel Configuration
|
# Linux/x86 3.12.8-1 Kernel Configuration
|
||||||
#
|
#
|
||||||
CONFIG_64BIT=y
|
CONFIG_64BIT=y
|
||||||
CONFIG_X86_64=y
|
CONFIG_X86_64=y
|
||||||
|
@ -496,8 +496,7 @@ CONFIG_USE_PERCPU_NUMA_NODE_ID=y
|
||||||
# CONFIG_HIBERNATION is not set
|
# CONFIG_HIBERNATION is not set
|
||||||
CONFIG_PM_RUNTIME=y
|
CONFIG_PM_RUNTIME=y
|
||||||
CONFIG_PM=y
|
CONFIG_PM=y
|
||||||
CONFIG_PM_DEBUG=y
|
# CONFIG_PM_DEBUG is not set
|
||||||
CONFIG_PM_ADVANCED_DEBUG=y
|
|
||||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||||
CONFIG_ACPI=y
|
CONFIG_ACPI=y
|
||||||
# CONFIG_ACPI_PROCFS is not set
|
# CONFIG_ACPI_PROCFS is not set
|
||||||
|
@ -512,7 +511,7 @@ CONFIG_ACPI_FAN=m
|
||||||
CONFIG_ACPI_PROCESSOR=y
|
CONFIG_ACPI_PROCESSOR=y
|
||||||
CONFIG_ACPI_IPMI=m
|
CONFIG_ACPI_IPMI=m
|
||||||
CONFIG_ACPI_PROCESSOR_AGGREGATOR=m
|
CONFIG_ACPI_PROCESSOR_AGGREGATOR=m
|
||||||
CONFIG_ACPI_THERMAL=m
|
CONFIG_ACPI_THERMAL=y
|
||||||
CONFIG_ACPI_NUMA=y
|
CONFIG_ACPI_NUMA=y
|
||||||
# CONFIG_ACPI_CUSTOM_DSDT is not set
|
# CONFIG_ACPI_CUSTOM_DSDT is not set
|
||||||
CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y
|
CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y
|
||||||
|
@ -1176,42 +1175,19 @@ CONFIG_NET_DROP_MONITOR=y
|
||||||
# CONFIG_CAN is not set
|
# CONFIG_CAN is not set
|
||||||
# CONFIG_IRDA is not set
|
# CONFIG_IRDA is not set
|
||||||
# CONFIG_BT is not set
|
# CONFIG_BT is not set
|
||||||
CONFIG_AF_RXRPC=m
|
# CONFIG_AF_RXRPC is not set
|
||||||
# CONFIG_AF_RXRPC_DEBUG is not set
|
|
||||||
CONFIG_RXKAD=m
|
|
||||||
CONFIG_FIB_RULES=y
|
CONFIG_FIB_RULES=y
|
||||||
# CONFIG_WIRELESS is not set
|
# CONFIG_WIRELESS is not set
|
||||||
# CONFIG_WIMAX is not set
|
# CONFIG_WIMAX is not set
|
||||||
CONFIG_RFKILL=m
|
CONFIG_RFKILL=m
|
||||||
CONFIG_RFKILL_LEDS=y
|
CONFIG_RFKILL_LEDS=y
|
||||||
CONFIG_RFKILL_INPUT=y
|
CONFIG_RFKILL_INPUT=y
|
||||||
CONFIG_NET_9P=m
|
# CONFIG_NET_9P is not set
|
||||||
CONFIG_NET_9P_VIRTIO=m
|
# CONFIG_CAIF is not set
|
||||||
# CONFIG_NET_9P_DEBUG is not set
|
|
||||||
CONFIG_CAIF=m
|
|
||||||
# CONFIG_CAIF_DEBUG is not set
|
|
||||||
CONFIG_CAIF_NETDEV=m
|
|
||||||
CONFIG_CAIF_USB=m
|
|
||||||
CONFIG_CEPH_LIB=m
|
CONFIG_CEPH_LIB=m
|
||||||
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
|
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
|
||||||
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
|
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
|
||||||
CONFIG_NFC=m
|
# CONFIG_NFC is not set
|
||||||
CONFIG_NFC_NCI=m
|
|
||||||
# CONFIG_NFC_NCI_SPI is not set
|
|
||||||
CONFIG_NFC_HCI=m
|
|
||||||
# CONFIG_NFC_SHDLC is not set
|
|
||||||
|
|
||||||
#
|
|
||||||
# Near Field Communication (NFC) devices
|
|
||||||
#
|
|
||||||
CONFIG_NFC_PN533=m
|
|
||||||
CONFIG_NFC_WILINK=m
|
|
||||||
CONFIG_NFC_MEI_PHY=m
|
|
||||||
CONFIG_NFC_SIM=m
|
|
||||||
CONFIG_NFC_PN544=m
|
|
||||||
CONFIG_NFC_PN544_MEI=m
|
|
||||||
CONFIG_NFC_MICROREAD=m
|
|
||||||
CONFIG_NFC_MICROREAD_MEI=m
|
|
||||||
CONFIG_HAVE_BPF_JIT=y
|
CONFIG_HAVE_BPF_JIT=y
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1851,11 +1827,6 @@ CONFIG_ATM_SOLOS=m
|
||||||
#
|
#
|
||||||
# CAIF transport drivers
|
# CAIF transport drivers
|
||||||
#
|
#
|
||||||
CONFIG_CAIF_TTY=m
|
|
||||||
CONFIG_CAIF_SPI_SLAVE=m
|
|
||||||
CONFIG_CAIF_SPI_SYNC=y
|
|
||||||
CONFIG_CAIF_HSI=m
|
|
||||||
CONFIG_CAIF_VIRTIO=m
|
|
||||||
CONFIG_VHOST_NET=m
|
CONFIG_VHOST_NET=m
|
||||||
CONFIG_VHOST_SCSI=m
|
CONFIG_VHOST_SCSI=m
|
||||||
CONFIG_VHOST_RING=m
|
CONFIG_VHOST_RING=m
|
||||||
|
@ -4259,7 +4230,6 @@ CONFIG_DMA_ACPI=y
|
||||||
#
|
#
|
||||||
# DMA Clients
|
# DMA Clients
|
||||||
#
|
#
|
||||||
CONFIG_NET_DMA=y
|
|
||||||
CONFIG_ASYNC_TX_DMA=y
|
CONFIG_ASYNC_TX_DMA=y
|
||||||
# CONFIG_DMATEST is not set
|
# CONFIG_DMATEST is not set
|
||||||
CONFIG_DCA=m
|
CONFIG_DCA=m
|
||||||
|
@ -4618,13 +4588,8 @@ CONFIG_XFS_RT=y
|
||||||
# CONFIG_XFS_DEBUG is not set
|
# CONFIG_XFS_DEBUG is not set
|
||||||
# CONFIG_GFS2_FS is not set
|
# CONFIG_GFS2_FS is not set
|
||||||
# CONFIG_OCFS2_FS is not set
|
# CONFIG_OCFS2_FS is not set
|
||||||
CONFIG_BTRFS_FS=m
|
# CONFIG_BTRFS_FS is not set
|
||||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
# CONFIG_NILFS2_FS is not set
|
||||||
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
|
|
||||||
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
|
|
||||||
# CONFIG_BTRFS_DEBUG is not set
|
|
||||||
# CONFIG_BTRFS_ASSERT is not set
|
|
||||||
CONFIG_NILFS2_FS=m
|
|
||||||
CONFIG_FS_POSIX_ACL=y
|
CONFIG_FS_POSIX_ACL=y
|
||||||
CONFIG_EXPORTFS=y
|
CONFIG_EXPORTFS=y
|
||||||
CONFIG_FILE_LOCKING=y
|
CONFIG_FILE_LOCKING=y
|
||||||
|
@ -4633,13 +4598,8 @@ CONFIG_DNOTIFY=y
|
||||||
CONFIG_INOTIFY_USER=y
|
CONFIG_INOTIFY_USER=y
|
||||||
CONFIG_FANOTIFY=y
|
CONFIG_FANOTIFY=y
|
||||||
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
|
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
|
||||||
CONFIG_QUOTA=y
|
# CONFIG_QUOTA is not set
|
||||||
CONFIG_QUOTA_NETLINK_INTERFACE=y
|
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
|
||||||
# CONFIG_PRINT_QUOTA_WARNING is not set
|
|
||||||
# CONFIG_QUOTA_DEBUG is not set
|
|
||||||
CONFIG_QUOTA_TREE=m
|
|
||||||
CONFIG_QFMT_V1=m
|
|
||||||
CONFIG_QFMT_V2=m
|
|
||||||
CONFIG_QUOTACTL=y
|
CONFIG_QUOTACTL=y
|
||||||
CONFIG_QUOTACTL_COMPAT=y
|
CONFIG_QUOTACTL_COMPAT=y
|
||||||
CONFIG_AUTOFS4_FS=y
|
CONFIG_AUTOFS4_FS=y
|
||||||
|
@ -4784,10 +4744,6 @@ CONFIG_CIFS_FSCACHE=y
|
||||||
# CONFIG_NCP_FS is not set
|
# CONFIG_NCP_FS is not set
|
||||||
# CONFIG_CODA_FS is not set
|
# CONFIG_CODA_FS is not set
|
||||||
# CONFIG_AFS_FS is not set
|
# CONFIG_AFS_FS is not set
|
||||||
CONFIG_9P_FS=m
|
|
||||||
CONFIG_9P_FSCACHE=y
|
|
||||||
CONFIG_9P_FS_POSIX_ACL=y
|
|
||||||
CONFIG_9P_FS_SECURITY=y
|
|
||||||
CONFIG_NLS=y
|
CONFIG_NLS=y
|
||||||
CONFIG_NLS_DEFAULT="utf8"
|
CONFIG_NLS_DEFAULT="utf8"
|
||||||
CONFIG_NLS_CODEPAGE_437=m
|
CONFIG_NLS_CODEPAGE_437=m
|
||||||
|
|
48
linux-drd/nfs-check-gssd-running-before-krb5i-auth.patch
Normal file
48
linux-drd/nfs-check-gssd-running-before-krb5i-auth.patch
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
Bugzilla: N/A
|
||||||
|
Upstream-status: queued in NFS git tree (for 3.13/3.14?)
|
||||||
|
|
||||||
|
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 files changed, 6 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff -up linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c.orig linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c
|
||||||
|
--- linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c.orig 2013-09-02 16:46:10.000000000 -0400
|
||||||
|
+++ linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c 2013-11-21 10:20:27.288286000 -0500
|
||||||
|
@@ -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"
|
||||||
|
@@ -206,7 +207,11 @@ struct nfs_client *nfs4_init_client(stru
|
||||||
|
if (clp->cl_minorversion != 0)
|
||||||
|
__set_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags);
|
||||||
|
__set_bit(NFS_CS_DISCRTRY, &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)
|
||||||
|
|
||||||
|
_______________________________________________
|
||||||
|
kernel mailing list
|
||||||
|
kernel@lists.fedoraproject.org
|
||||||
|
https://admin.fedoraproject.org/mailman/listinfo/kernel
|
|
@ -0,0 +1,50 @@
|
||||||
|
Bugzilla: 1037793
|
||||||
|
Upstream-status: submitted for 3.14
|
||||||
|
|
||||||
|
Currently, it could leak dentry references in some cases. Make sure
|
||||||
|
we clean up properly.
|
||||||
|
|
||||||
|
Signed-off-by: Jeff Layton <jlayton@redhat.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.4.2
|
||||||
|
|
||||||
|
--
|
||||||
|
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||||
|
the body of a message to majordomo@vger.kernel.org
|
||||||
|
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -0,0 +1,32 @@
|
||||||
|
Bugzilla: 1037793
|
||||||
|
Upstream-status: submitted for 3.14
|
||||||
|
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
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.4.2
|
||||||
|
|
||||||
|
--
|
||||||
|
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||||
|
the body of a message to majordomo@vger.kernel.org
|
||||||
|
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -0,0 +1,96 @@
|
||||||
|
Bugzilla: 1037793
|
||||||
|
Upstream-status: submitted for 3.14
|
||||||
|
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
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.4.2
|
|
@ -0,0 +1,233 @@
|
||||||
|
Bugzilla: N/A
|
||||||
|
Upstream-status: queued in NFS git tree (for 3.13/3.14?)
|
||||||
|
|
||||||
|
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 -up linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h
|
||||||
|
--- linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h.orig 2013-09-02 16:46:10.000000000 -0400
|
||||||
|
+++ linux-3.11.9-200.fc19.x86_64/include/linux/sunrpc/rpc_pipe_fs.h 2013-11-21 10:11:17.893026000 -0500
|
||||||
|
@@ -64,7 +64,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 -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h
|
||||||
|
--- linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h.orig 2013-09-02 16:46:10.000000000 -0400
|
||||||
|
+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/netns.h 2013-11-21 10:11:17.897029000 -0500
|
||||||
|
@@ -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 -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c
|
||||||
|
--- linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c.orig 2013-09-02 16:46:10.000000000 -0400
|
||||||
|
+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/rpc_pipe.c 2013-11-21 10:11:17.903026000 -0500
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
@@ -1019,6 +1019,7 @@ enum {
|
||||||
|
RPCAUTH_nfsd4_cb,
|
||||||
|
RPCAUTH_cache,
|
||||||
|
RPCAUTH_nfsd,
|
||||||
|
+ RPCAUTH_gssd,
|
||||||
|
RPCAUTH_RootEOF
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -1055,6 +1056,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,
|
||||||
|
+ },
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -1068,13 +1073,25 @@ struct dentry *rpc_d_lookup_sb(const str
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -1104,11 +1121,73 @@ void rpc_put_sb_net(const struct net *ne
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
@@ -1126,6 +1205,13 @@ rpc_fill_super(struct super_block *sb, v
|
||||||
|
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);
|
||||||
|
@@ -1140,6 +1226,7 @@ rpc_fill_super(struct super_block *sb, v
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_depopulate:
|
||||||
|
+ dput(gssd_dentry);
|
||||||
|
blocking_notifier_call_chain(&rpc_pipefs_notifier_list,
|
||||||
|
RPC_PIPEFS_UMOUNT,
|
||||||
|
sb);
|
||||||
|
diff -up linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c.orig linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c
|
||||||
|
--- linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c.orig 2013-09-02 16:46:10.000000000 -0400
|
||||||
|
+++ linux-3.11.9-200.fc19.x86_64/net/sunrpc/sunrpc_syms.c 2013-11-21 10:11:17.908026000 -0500
|
||||||
|
@@ -44,12 +44,17 @@ static __net_init int sunrpc_init_net(st
|
||||||
|
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);
|
||||||
|
|
|
@ -0,0 +1,139 @@
|
||||||
|
Bugzilla: N/A
|
||||||
|
Upstream-status: queued in NFS git tree (for 3.13/3.14?)
|
||||||
|
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
Fixed up to apply to 3.12.1 by Josh Boyer <jwboyer@fedoraproject.org>
|
||||||
|
|
||||||
|
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 0846566..1ada878 100644
|
||||||
|
--- a/net/sunrpc/auth_gss/auth_gss.c
|
||||||
|
+++ b/net/sunrpc/auth_gss/auth_gss.c
|
||||||
|
@@ -517,8 +517,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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -581,7 +580,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;
|
||||||
|
|
||||||
|
@@ -589,17 +587,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 40aef18..ad444f3 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;
|
||||||
|
@@ -1231,7 +1228,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;
|
||||||
|
}
|
||||||
|
@@ -1385,6 +1381,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)
|
Loading…
Reference in a new issue