From: Greg Kroah-Hartman Date: Mon, 15 Oct 2012 17:29:40 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.47~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ef0df23404098e9cdb922beb0f23ea46e523b81;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: autofs4-fix-reset-pending-flag-on-mount-fail.patch block-fix-request_queue-flags-initialization.patch xen-bootup-allow-read_tscp-call-for-xen-pv-guests.patch xen-bootup-allow-read-write-_cr8-pvops-call.patch --- diff --git a/queue-3.0/autofs4-fix-reset-pending-flag-on-mount-fail.patch b/queue-3.0/autofs4-fix-reset-pending-flag-on-mount-fail.patch new file mode 100644 index 00000000000..8110333c01d --- /dev/null +++ b/queue-3.0/autofs4-fix-reset-pending-flag-on-mount-fail.patch @@ -0,0 +1,41 @@ +From 49999ab27eab6289a8e4f450e148bdab521361b2 Mon Sep 17 00:00:00 2001 +From: Ian Kent +Date: Thu, 11 Oct 2012 08:00:33 +0800 +Subject: autofs4 - fix reset pending flag on mount fail + +From: Ian Kent + +commit 49999ab27eab6289a8e4f450e148bdab521361b2 upstream. + +In autofs4_d_automount(), if a mount fail occurs the AUTOFS_INF_PENDING +mount pending flag is not cleared. + +One effect of this is when using the "browse" option, directory entry +attributes show up with all "?"s due to the incorrect callback and +subsequent failure return (when in fact no callback should be made). + +Signed-off-by: Ian Kent +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/autofs4/root.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/fs/autofs4/root.c ++++ b/fs/autofs4/root.c +@@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automo + ino->flags |= AUTOFS_INF_PENDING; + spin_unlock(&sbi->fs_lock); + status = autofs4_mount_wait(dentry); +- if (status) +- return ERR_PTR(status); + spin_lock(&sbi->fs_lock); + ino->flags &= ~AUTOFS_INF_PENDING; ++ if (status) { ++ spin_unlock(&sbi->fs_lock); ++ return ERR_PTR(status); ++ } + } + done: + if (!(ino->flags & AUTOFS_INF_EXPIRING)) { diff --git a/queue-3.0/block-fix-request_queue-flags-initialization.patch b/queue-3.0/block-fix-request_queue-flags-initialization.patch new file mode 100644 index 00000000000..3fb2032ffec --- /dev/null +++ b/queue-3.0/block-fix-request_queue-flags-initialization.patch @@ -0,0 +1,38 @@ +From 60ea8226cbd5c8301f9a39edc574ddabcb8150e0 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Thu, 20 Sep 2012 14:09:30 -0700 +Subject: block: fix request_queue->flags initialization + +From: Tejun Heo + +commit 60ea8226cbd5c8301f9a39edc574ddabcb8150e0 upstream. + +A queue newly allocated with blk_alloc_queue_node() has only +QUEUE_FLAG_BYPASS set. For request-based drivers, +blk_init_allocated_queue() is called and q->queue_flags is overwritten +with QUEUE_FLAG_DEFAULT which doesn't include BYPASS even though the +initial bypass is still in effect. + +In blk_init_allocated_queue(), or QUEUE_FLAG_DEFAULT to q->queue_flags +instead of overwriting. + +Signed-off-by: Tejun Heo +Acked-by: Vivek Goyal +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + block/blk-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/block/blk-core.c ++++ b/block/blk-core.c +@@ -524,7 +524,7 @@ blk_init_allocated_queue(struct request_ + q->request_fn = rfn; + q->prep_rq_fn = NULL; + q->unprep_rq_fn = NULL; +- q->queue_flags = QUEUE_FLAG_DEFAULT; ++ q->queue_flags |= QUEUE_FLAG_DEFAULT; + + /* Override internal queue lock with supplied lock pointer */ + if (lock) diff --git a/queue-3.0/series b/queue-3.0/series index 1ae3e58f9f8..07e12f2ee39 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -7,3 +7,7 @@ tmpfs-ceph-gfs2-isofs-reiserfs-xfs-fix-fh_len-checking.patch arm-7541-1-add-arm-errata-775420-workaround.patch firewire-cdev-fix-user-memory-corruption-i386-userland-on-amd64-kernel.patch sunrpc-ensure-that-the-tcp-socket-is-closed-when-in-close_wait.patch +xen-bootup-allow-read-write-_cr8-pvops-call.patch +xen-bootup-allow-read_tscp-call-for-xen-pv-guests.patch +block-fix-request_queue-flags-initialization.patch +autofs4-fix-reset-pending-flag-on-mount-fail.patch diff --git a/queue-3.0/xen-bootup-allow-read-write-_cr8-pvops-call.patch b/queue-3.0/xen-bootup-allow-read-write-_cr8-pvops-call.patch new file mode 100644 index 00000000000..02d32e05856 --- /dev/null +++ b/queue-3.0/xen-bootup-allow-read-write-_cr8-pvops-call.patch @@ -0,0 +1,67 @@ +From 1a7bbda5b1ab0e02622761305a32dc38735b90b2 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Wed, 10 Oct 2012 13:25:48 -0400 +Subject: xen/bootup: allow {read|write}_cr8 pvops call. + +From: Konrad Rzeszutek Wilk + +commit 1a7bbda5b1ab0e02622761305a32dc38735b90b2 upstream. + +We actually do not do anything about it. Just return a default +value of zero and if the kernel tries to write anything but 0 +we BUG_ON. + +This fixes the case when an user tries to suspend the machine +and it blows up in save_processor_state b/c 'read_cr8' is set +to NULL and we get: + +kernel BUG at /home/konrad/ssd/linux/arch/x86/include/asm/paravirt.h:100! +invalid opcode: 0000 [#1] SMP +Pid: 2687, comm: init.late Tainted: G O 3.6.0upstream-00002-gac264ac-dirty #4 Bochs Bochs +RIP: e030:[] [] save_processor_state+0x212/0x270 + +.. snip.. +Call Trace: + [] do_suspend_lowlevel+0xf/0xac + [] ? x86_acpi_suspend_lowlevel+0x10c/0x150 + [] acpi_suspend_enter+0x57/0xd5 + +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/enlighten.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +--- a/arch/x86/xen/enlighten.c ++++ b/arch/x86/xen/enlighten.c +@@ -803,7 +803,16 @@ static void xen_write_cr4(unsigned long + + native_write_cr4(cr4); + } +- ++#ifdef CONFIG_X86_64 ++static inline unsigned long xen_read_cr8(void) ++{ ++ return 0; ++} ++static inline void xen_write_cr8(unsigned long val) ++{ ++ BUG_ON(val); ++} ++#endif + static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) + { + int ret; +@@ -968,6 +977,11 @@ static const struct pv_cpu_ops xen_cpu_o + .read_cr4_safe = native_read_cr4_safe, + .write_cr4 = xen_write_cr4, + ++#ifdef CONFIG_X86_64 ++ .read_cr8 = xen_read_cr8, ++ .write_cr8 = xen_write_cr8, ++#endif ++ + .wbinvd = native_wbinvd, + + .read_msr = native_read_msr_safe, diff --git a/queue-3.0/xen-bootup-allow-read_tscp-call-for-xen-pv-guests.patch b/queue-3.0/xen-bootup-allow-read_tscp-call-for-xen-pv-guests.patch new file mode 100644 index 00000000000..5702c902428 --- /dev/null +++ b/queue-3.0/xen-bootup-allow-read_tscp-call-for-xen-pv-guests.patch @@ -0,0 +1,31 @@ +From cd0608e71e9757f4dae35bcfb4e88f4d1a03a8ab Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Wed, 10 Oct 2012 13:30:47 -0400 +Subject: xen/bootup: allow read_tscp call for Xen PV guests. + +From: Konrad Rzeszutek Wilk + +commit cd0608e71e9757f4dae35bcfb4e88f4d1a03a8ab upstream. + +The hypervisor will trap it. However without this patch, +we would crash as the .read_tscp is set to NULL. This patch +fixes it and sets it to the native_read_tscp call. + +Signed-off-by: Konrad Rzeszutek Wilk +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/enlighten.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/x86/xen/enlighten.c ++++ b/arch/x86/xen/enlighten.c +@@ -989,6 +989,8 @@ static const struct pv_cpu_ops xen_cpu_o + .read_tsc = native_read_tsc, + .read_pmc = native_read_pmc, + ++ .read_tscp = native_read_tscp, ++ + .iret = xen_iret, + .irq_enable_sysexit = xen_sysexit, + #ifdef CONFIG_X86_64