From cc98f00d000a8227b24c080ec56fffe053d3839f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 5 Jan 2010 11:45:53 -0800 Subject: [PATCH] some .27 patches --- ...mission-may_open-is-not-write-access.patch | 37 +++++++++++++++ ...e-active-mmu-pages-in-free_mmu_pages.patch | 47 +++++++++++++++++++ ...owersaving-for-rt61pci-and-rt2800pci.patch | 38 +++++++++++++++ queue-2.6.27/series | 3 ++ 4 files changed, 125 insertions(+) create mode 100644 queue-2.6.27/generic_permission-may_open-is-not-write-access.patch create mode 100644 queue-2.6.27/revert-kvm-mmu-do-not-free-active-mmu-pages-in-free_mmu_pages.patch create mode 100644 queue-2.6.27/rt2x00-disable-powersaving-for-rt61pci-and-rt2800pci.patch diff --git a/queue-2.6.27/generic_permission-may_open-is-not-write-access.patch b/queue-2.6.27/generic_permission-may_open-is-not-write-access.patch new file mode 100644 index 00000000000..deb321a8c2d --- /dev/null +++ b/queue-2.6.27/generic_permission-may_open-is-not-write-access.patch @@ -0,0 +1,37 @@ +From 7ea6600148c265b1fd53e521022b1d7aec81d974 Mon Sep 17 00:00:00 2001 +From: Serge E. Hallyn +Date: Tue, 29 Dec 2009 14:50:19 -0600 +Subject: generic_permission: MAY_OPEN is not write access + +From: Serge E. Hallyn + +commit 7ea6600148c265b1fd53e521022b1d7aec81d974 upstream. + +generic_permission was refusing CAP_DAC_READ_SEARCH-enabled +processes from opening DAC-protected files read-only, because +do_filp_open adds MAY_OPEN to the open mask. + +Ignore MAY_OPEN. After this patch, CAP_DAC_READ_SEARCH is +again sufficient to open(fname, O_RDONLY) on a file to which +DAC otherwise refuses us read permission. + +Reported-by: Mike Kazantsev +Signed-off-by: Serge E. Hallyn +Tested-by: Mike Kazantsev +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/namei.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -220,6 +220,7 @@ int generic_permission(struct inode *ino + /* + * Searching includes executable on directories, else just read. + */ ++ mask &= MAY_READ | MAY_WRITE | MAY_EXEC; + if (mask == MAY_READ || (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))) + if (capable(CAP_DAC_READ_SEARCH)) + return 0; diff --git a/queue-2.6.27/revert-kvm-mmu-do-not-free-active-mmu-pages-in-free_mmu_pages.patch b/queue-2.6.27/revert-kvm-mmu-do-not-free-active-mmu-pages-in-free_mmu_pages.patch new file mode 100644 index 00000000000..ecfb23cf863 --- /dev/null +++ b/queue-2.6.27/revert-kvm-mmu-do-not-free-active-mmu-pages-in-free_mmu_pages.patch @@ -0,0 +1,47 @@ +From d2127c8300fb1ec54af56faee17170e7a525326d Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Subject: Revert: KVM: MMU: do not free active mmu pages in free_mmu_pages() + +This reverts the commit d2127c8300fb1ec54af56faee17170e7a525326d, which was +the commit f00be0cae4e6ad0a8c7be381c6d9be3586800b3e upstream. + +This was done based on comments saying it was causing problems. + +Cc: Gleb Natapov +Cc: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + + +--- + arch/x86/kvm/mmu.c | 8 ++++++++ + virt/kvm/kvm_main.c | 2 -- + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/arch/x86/kvm/mmu.c ++++ b/arch/x86/kvm/mmu.c +@@ -1995,6 +1995,14 @@ EXPORT_SYMBOL_GPL(kvm_disable_tdp); + + static void free_mmu_pages(struct kvm_vcpu *vcpu) + { ++ struct kvm_mmu_page *sp; ++ ++ while (!list_empty(&vcpu->kvm->arch.active_mmu_pages)) { ++ sp = container_of(vcpu->kvm->arch.active_mmu_pages.next, ++ struct kvm_mmu_page, link); ++ kvm_mmu_zap_page(vcpu->kvm, sp); ++ cond_resched(); ++ } + free_page((unsigned long)vcpu->arch.mmu.pae_root); + } + +--- a/virt/kvm/kvm_main.c ++++ b/virt/kvm/kvm_main.c +@@ -406,8 +406,6 @@ static void kvm_destroy_vm(struct kvm *k + #endif + #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER) + mmu_notifier_unregister(&kvm->mmu_notifier, kvm->mm); +-#else +- kvm_arch_flush_shadow(kvm); + #endif + kvm_arch_destroy_vm(kvm); + mmdrop(mm); diff --git a/queue-2.6.27/rt2x00-disable-powersaving-for-rt61pci-and-rt2800pci.patch b/queue-2.6.27/rt2x00-disable-powersaving-for-rt61pci-and-rt2800pci.patch new file mode 100644 index 00000000000..fb757b4978b --- /dev/null +++ b/queue-2.6.27/rt2x00-disable-powersaving-for-rt61pci-and-rt2800pci.patch @@ -0,0 +1,38 @@ +From 93b6bd26b74efe46b4579592560f9f1cb7b61994 Mon Sep 17 00:00:00 2001 +From: Gertjan van Wingerde +Date: Mon, 14 Dec 2009 20:33:55 +0100 +Subject: rt2x00: Disable powersaving for rt61pci and rt2800pci. + +From: Gertjan van Wingerde + +commit 93b6bd26b74efe46b4579592560f9f1cb7b61994 upstream. + +We've had many reports of rt61pci failures with powersaving enabled. +Therefore, as a stop-gap measure, disable powersaving of the rt61pci +until we have found a proper solution. +Also disable powersaving on rt2800pci as it most probably will show +the same problem. + +Signed-off-by: Gertjan van Wingerde +Acked-by: Ivo van Doorn +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rt2x00/rt61pci.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/wireless/rt2x00/rt61pci.c ++++ b/drivers/net/wireless/rt2x00/rt61pci.c +@@ -2281,6 +2281,11 @@ static void rt61pci_probe_hw_mode(struct + unsigned int i; + + /* ++ * Disable powersaving as default. ++ */ ++ rt2x00dev->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; ++ ++ /* + * Initialize all hw fields. + */ + rt2x00dev->hw->flags = diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 8eb83f14d52..4c729bddbff 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -5,3 +5,6 @@ i2c-tsl2550-fix-lux-value-in-extended-mode.patch ipv6-reassembly-use-seperate-reassembly-queues-for-conntrack-and-local-delivery.patch s390-dasd-support-diag-access-for-read-only-devices.patch x86-ptrace-make-genregs_get-set-more-robust.patch +rt2x00-disable-powersaving-for-rt61pci-and-rt2800pci.patch +generic_permission-may_open-is-not-write-access.patch +revert-kvm-mmu-do-not-free-active-mmu-pages-in-free_mmu_pages.patch -- 2.47.3