From: Greg Kroah-Hartman Date: Wed, 15 Sep 2010 22:59:01 +0000 (-0700) Subject: .35 patches X-Git-Tag: v2.6.27.54~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8dcbdb54b735999f54f54da49c8a036808a246eb;p=thirdparty%2Fkernel%2Fstable-queue.git .35 patches --- diff --git a/queue-2.6.35/ath5k-check-return-value-of-ieee80211_get_tx_rate.patch b/queue-2.6.35/ath5k-check-return-value-of-ieee80211_get_tx_rate.patch new file mode 100644 index 00000000000..7b7849f38ad --- /dev/null +++ b/queue-2.6.35/ath5k-check-return-value-of-ieee80211_get_tx_rate.patch @@ -0,0 +1,38 @@ +From d8e1ba76d619dbc0be8fbeee4e6c683b5c812d3a Mon Sep 17 00:00:00 2001 +From: John W. Linville +Date: Tue, 24 Aug 2010 15:27:34 -0400 +Subject: ath5k: check return value of ieee80211_get_tx_rate + +From: John W. Linville + +commit d8e1ba76d619dbc0be8fbeee4e6c683b5c812d3a upstream. + +This avoids a NULL pointer dereference as reported here: + + https://bugzilla.redhat.com/show_bug.cgi?id=625889 + +When the WARN condition is hit in ieee80211_get_tx_rate, it will return +NULL. So, we need to check the return value and avoid dereferencing it +in that case. + +Signed-off-by: John W. Linville +Acked-by: Bob Copeland +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath5k/base.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/wireless/ath/ath5k/base.c ++++ b/drivers/net/wireless/ath/ath5k/base.c +@@ -1318,6 +1318,10 @@ ath5k_txbuf_setup(struct ath5k_softc *sc + PCI_DMA_TODEVICE); + + rate = ieee80211_get_tx_rate(sc->hw, info); ++ if (!rate) { ++ ret = -EINVAL; ++ goto err_unmap; ++ } + + if (info->flags & IEEE80211_TX_CTL_NO_ACK) + flags |= AR5K_TXDESC_NOACK; diff --git a/queue-2.6.35/binfmt_misc-fix-binfmt_misc-priority.patch b/queue-2.6.35/binfmt_misc-fix-binfmt_misc-priority.patch new file mode 100644 index 00000000000..d3ff1870a16 --- /dev/null +++ b/queue-2.6.35/binfmt_misc-fix-binfmt_misc-priority.patch @@ -0,0 +1,40 @@ +From ee3aebdd8f5f8eac41c25c80ceee3d728f920f3b Mon Sep 17 00:00:00 2001 +From: Jan Sembera +Date: Thu, 9 Sep 2010 16:37:54 -0700 +Subject: binfmt_misc: fix binfmt_misc priority + +From: Jan Sembera + +commit ee3aebdd8f5f8eac41c25c80ceee3d728f920f3b upstream. + +Commit 74641f584da ("alpha: binfmt_aout fix") (May 2009) introduced a +regression - binfmt_misc is now consulted after binfmt_elf, which will +unfortunately break ia32el. ia32 ELF binaries on ia64 used to be matched +using binfmt_misc and executed using wrapper. As 32bit binaries are now +matched by binfmt_elf before bindmt_misc kicks in, the wrapper is ignored. + +The fix increases precedence of binfmt_misc to the original state. + +Signed-off-by: Jan Sembera +Cc: Ivan Kokshaysky +Cc: Al Viro +Cc: Richard Henderson +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/binfmt_misc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/binfmt_misc.c ++++ b/fs/binfmt_misc.c +@@ -723,7 +723,7 @@ static int __init init_misc_binfmt(void) + { + int err = register_filesystem(&bm_fs_type); + if (!err) { +- err = register_binfmt(&misc_format); ++ err = insert_binfmt(&misc_format); + if (err) + unregister_filesystem(&bm_fs_type); + } diff --git a/queue-2.6.35/bounce-call-flush_dcache_page-after-bounce_copy_vec.patch b/queue-2.6.35/bounce-call-flush_dcache_page-after-bounce_copy_vec.patch new file mode 100644 index 00000000000..e706a3f17f4 --- /dev/null +++ b/queue-2.6.35/bounce-call-flush_dcache_page-after-bounce_copy_vec.patch @@ -0,0 +1,43 @@ +From ac8456d6f9a3011c824176bd6084d39e5f70a382 Mon Sep 17 00:00:00 2001 +From: Gary King +Date: Thu, 9 Sep 2010 16:38:05 -0700 +Subject: bounce: call flush_dcache_page() after bounce_copy_vec() + +From: Gary King + +commit ac8456d6f9a3011c824176bd6084d39e5f70a382 upstream. + +I have been seeing problems on Tegra 2 (ARMv7 SMP) systems with HIGHMEM +enabled on 2.6.35 (plus some patches targetted at 2.6.36 to perform cache +maintenance lazily), and the root cause appears to be that the mm bouncing +code is calling flush_dcache_page before it copies the bounce buffer into +the bio. + +The bounced page needs to be flushed after data is copied into it, to +ensure that architecture implementations can synchronize instruction and +data caches if necessary. + +Signed-off-by: Gary King +Cc: Tejun Heo +Cc: Russell King +Acked-by: Jens Axboe +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/bounce.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/bounce.c ++++ b/mm/bounce.c +@@ -116,8 +116,8 @@ static void copy_to_high_bio_irq(struct + */ + vfrom = page_address(fromvec->bv_page) + tovec->bv_offset; + +- flush_dcache_page(tovec->bv_page); + bounce_copy_vec(tovec, vfrom); ++ flush_dcache_page(tovec->bv_page); + } + } + diff --git a/queue-2.6.35/compat-make-compat_alloc_user_space-incorporate-the-access_ok.patch b/queue-2.6.35/compat-make-compat_alloc_user_space-incorporate-the-access_ok.patch new file mode 100644 index 00000000000..26dd5c78a65 --- /dev/null +++ b/queue-2.6.35/compat-make-compat_alloc_user_space-incorporate-the-access_ok.patch @@ -0,0 +1,173 @@ +From c41d68a513c71e35a14f66d71782d27a79a81ea6 Mon Sep 17 00:00:00 2001 +From: H. Peter Anvin +Date: Tue, 7 Sep 2010 16:16:18 -0700 +Subject: compat: Make compat_alloc_user_space() incorporate the access_ok() + +From: H. Peter Anvin + +commit c41d68a513c71e35a14f66d71782d27a79a81ea6 upstream. + +compat_alloc_user_space() expects the caller to independently call +access_ok() to verify the returned area. A missing call could +introduce problems on some architectures. + +This patch incorporates the access_ok() check into +compat_alloc_user_space() and also adds a sanity check on the length. +The existing compat_alloc_user_space() implementations are renamed +arch_compat_alloc_user_space() and are used as part of the +implementation of the new global function. + +This patch assumes NULL will cause __get_user()/__put_user() to either +fail or access userspace on all architectures. This should be +followed by checking the return value of compat_access_user_space() +for NULL in the callers, at which time the access_ok() in the callers +can also be removed. + +Reported-by: Ben Hawkes +Signed-off-by: H. Peter Anvin +Acked-by: Benjamin Herrenschmidt +Acked-by: Chris Metcalf +Acked-by: David S. Miller +Acked-by: Ingo Molnar +Acked-by: Thomas Gleixner +Acked-by: Tony Luck +Cc: Andrew Morton +Cc: Arnd Bergmann +Cc: Fenghua Yu +Cc: H. Peter Anvin +Cc: Heiko Carstens +Cc: Helge Deller +Cc: James Bottomley +Cc: Kyle McMartin +Cc: Martin Schwidefsky +Cc: Paul Mackerras +Cc: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + arch/ia64/include/asm/compat.h | 2 +- + arch/mips/include/asm/compat.h | 2 +- + arch/parisc/include/asm/compat.h | 2 +- + arch/powerpc/include/asm/compat.h | 2 +- + arch/s390/include/asm/compat.h | 2 +- + arch/sparc/include/asm/compat.h | 2 +- + arch/x86/include/asm/compat.h | 2 +- + include/linux/compat.h | 3 +++ + kernel/compat.c | 21 +++++++++++++++++++++ + 9 files changed, 31 insertions(+), 7 deletions(-) + +--- a/arch/ia64/include/asm/compat.h ++++ b/arch/ia64/include/asm/compat.h +@@ -199,7 +199,7 @@ ptr_to_compat(void __user *uptr) + } + + static __inline__ void __user * +-compat_alloc_user_space (long len) ++arch_compat_alloc_user_space (long len) + { + struct pt_regs *regs = task_pt_regs(current); + return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len); +--- a/arch/mips/include/asm/compat.h ++++ b/arch/mips/include/asm/compat.h +@@ -145,7 +145,7 @@ static inline compat_uptr_t ptr_to_compa + return (u32)(unsigned long)uptr; + } + +-static inline void __user *compat_alloc_user_space(long len) ++static inline void __user *arch_compat_alloc_user_space(long len) + { + struct pt_regs *regs = (struct pt_regs *) + ((unsigned long) current_thread_info() + THREAD_SIZE - 32) - 1; +--- a/arch/parisc/include/asm/compat.h ++++ b/arch/parisc/include/asm/compat.h +@@ -147,7 +147,7 @@ static inline compat_uptr_t ptr_to_compa + return (u32)(unsigned long)uptr; + } + +-static __inline__ void __user *compat_alloc_user_space(long len) ++static __inline__ void __user *arch_compat_alloc_user_space(long len) + { + struct pt_regs *regs = ¤t->thread.regs; + return (void __user *)regs->gr[30]; +--- a/arch/powerpc/include/asm/compat.h ++++ b/arch/powerpc/include/asm/compat.h +@@ -134,7 +134,7 @@ static inline compat_uptr_t ptr_to_compa + return (u32)(unsigned long)uptr; + } + +-static inline void __user *compat_alloc_user_space(long len) ++static inline void __user *arch_compat_alloc_user_space(long len) + { + struct pt_regs *regs = current->thread.regs; + unsigned long usp = regs->gpr[1]; +--- a/arch/s390/include/asm/compat.h ++++ b/arch/s390/include/asm/compat.h +@@ -181,7 +181,7 @@ static inline int is_compat_task(void) + + #endif + +-static inline void __user *compat_alloc_user_space(long len) ++static inline void __user *arch_compat_alloc_user_space(long len) + { + unsigned long stack; + +--- a/arch/sparc/include/asm/compat.h ++++ b/arch/sparc/include/asm/compat.h +@@ -167,7 +167,7 @@ static inline compat_uptr_t ptr_to_compa + return (u32)(unsigned long)uptr; + } + +-static inline void __user *compat_alloc_user_space(long len) ++static inline void __user *arch_compat_alloc_user_space(long len) + { + struct pt_regs *regs = current_thread_info()->kregs; + unsigned long usp = regs->u_regs[UREG_I6]; +--- a/arch/x86/include/asm/compat.h ++++ b/arch/x86/include/asm/compat.h +@@ -205,7 +205,7 @@ static inline compat_uptr_t ptr_to_compa + return (u32)(unsigned long)uptr; + } + +-static inline void __user *compat_alloc_user_space(long len) ++static inline void __user *arch_compat_alloc_user_space(long len) + { + struct pt_regs *regs = task_pt_regs(current); + return (void __user *)regs->sp - len; +--- a/include/linux/compat.h ++++ b/include/linux/compat.h +@@ -360,5 +360,8 @@ extern ssize_t compat_rw_copy_check_uvec + const struct compat_iovec __user *uvector, unsigned long nr_segs, + unsigned long fast_segs, struct iovec *fast_pointer, + struct iovec **ret_pointer); ++ ++extern void __user *compat_alloc_user_space(unsigned long len); ++ + #endif /* CONFIG_COMPAT */ + #endif /* _LINUX_COMPAT_H */ +--- a/kernel/compat.c ++++ b/kernel/compat.c +@@ -1137,3 +1137,24 @@ compat_sys_sysinfo(struct compat_sysinfo + + return 0; + } ++ ++/* ++ * Allocate user-space memory for the duration of a single system call, ++ * in order to marshall parameters inside a compat thunk. ++ */ ++void __user *compat_alloc_user_space(unsigned long len) ++{ ++ void __user *ptr; ++ ++ /* If len would occupy more than half of the entire compat space... */ ++ if (unlikely(len > (((compat_uptr_t)~0) >> 1))) ++ return NULL; ++ ++ ptr = arch_compat_alloc_user_space(len); ++ ++ if (unlikely(!access_ok(VERIFY_WRITE, ptr, len))) ++ return NULL; ++ ++ return ptr; ++} ++EXPORT_SYMBOL_GPL(compat_alloc_user_space); diff --git a/queue-2.6.35/input-i8042-fix-device-removal-on-unload.patch b/queue-2.6.35/input-i8042-fix-device-removal-on-unload.patch new file mode 100644 index 00000000000..361e68348ea --- /dev/null +++ b/queue-2.6.35/input-i8042-fix-device-removal-on-unload.patch @@ -0,0 +1,36 @@ +From af045b86662f17bf130239a65995c61a34f00a6b Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Tue, 31 Aug 2010 17:27:02 -0700 +Subject: Input: i8042 - fix device removal on unload + +From: Dmitry Torokhov + +commit af045b86662f17bf130239a65995c61a34f00a6b upstream. + +We need to call platform_device_unregister(i8042_platform_device) +before calling platform_driver_unregister() because i8042_remove() +resets i8042_platform_device to NULL. This leaves the platform device +instance behind and prevents driver reload. + +Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16613 + +Reported-by: Seryodkin Victor +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/serio/i8042.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/input/serio/i8042.c ++++ b/drivers/input/serio/i8042.c +@@ -1483,8 +1483,8 @@ static int __init i8042_init(void) + + static void __exit i8042_exit(void) + { +- platform_driver_unregister(&i8042_driver); + platform_device_unregister(i8042_platform_device); ++ platform_driver_unregister(&i8042_driver); + i8042_platform_exit(); + + panic_blink = NULL; diff --git a/queue-2.6.35/input-i8042-reset-keyboard-controller-wehen-resuming-from-s2r.patch b/queue-2.6.35/input-i8042-reset-keyboard-controller-wehen-resuming-from-s2r.patch new file mode 100644 index 00000000000..b208e6c10da --- /dev/null +++ b/queue-2.6.35/input-i8042-reset-keyboard-controller-wehen-resuming-from-s2r.patch @@ -0,0 +1,145 @@ +From 1ca56e513a9fd356d5a9e0de45dbe0e189e00386 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Tue, 20 Jul 2010 20:25:34 -0700 +Subject: Input: i8042 - reset keyboard controller wehen resuming from S2R + +From: Dmitry Torokhov + +commit 1ca56e513a9fd356d5a9e0de45dbe0e189e00386 upstream. + +Some laptops, such as Lenovo 3000 N100, require keyboard controller reset +in order to have touchpad operable after suspend to RAM. Even if box does +not need the reset it should be safe to do so, so instead of chasing +after misbehaving boxes and grow DMI tables, let's reset the controller +unconditionally. + +Reported-and-tested-by: Jerome Lacoste +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/serio/i8042.c | 65 +++++++++++++++++++++++++++----------------- + 1 file changed, 41 insertions(+), 24 deletions(-) + +--- a/drivers/input/serio/i8042.c ++++ b/drivers/input/serio/i8042.c +@@ -861,9 +861,6 @@ static int i8042_controller_selftest(voi + unsigned char param; + int i = 0; + +- if (!i8042_reset) +- return 0; +- + /* + * We try this 5 times; on some really fragile systems this does not + * take the first time... +@@ -1020,7 +1017,8 @@ static void i8042_controller_reset(void) + * Reset the controller if requested. + */ + +- i8042_controller_selftest(); ++ if (i8042_reset) ++ i8042_controller_selftest(); + + /* + * Restore the original control register setting. +@@ -1094,23 +1092,11 @@ static void i8042_dritek_enable(void) + #ifdef CONFIG_PM + + /* +- * Here we try to restore the original BIOS settings to avoid +- * upsetting it. +- */ +- +-static int i8042_pm_reset(struct device *dev) +-{ +- i8042_controller_reset(); +- +- return 0; +-} +- +-/* + * Here we try to reset everything back to a state we had + * before suspending. + */ + +-static int i8042_pm_restore(struct device *dev) ++static int i8042_controller_resume(bool force_reset) + { + int error; + +@@ -1118,9 +1104,11 @@ static int i8042_pm_restore(struct devic + if (error) + return error; + +- error = i8042_controller_selftest(); +- if (error) +- return error; ++ if (i8042_reset || force_reset) { ++ error = i8042_controller_selftest(); ++ if (error) ++ return error; ++ } + + /* + * Restore original CTR value and disable all ports +@@ -1162,6 +1150,28 @@ static int i8042_pm_restore(struct devic + return 0; + } + ++/* ++ * Here we try to restore the original BIOS settings to avoid ++ * upsetting it. ++ */ ++ ++static int i8042_pm_reset(struct device *dev) ++{ ++ i8042_controller_reset(); ++ ++ return 0; ++} ++ ++static int i8042_pm_resume(struct device *dev) ++{ ++ /* ++ * On resume from S2R we always try to reset the controller ++ * to bring it in a sane state. (In case of S2D we expect ++ * BIOS to reset the controller for us.) ++ */ ++ return i8042_controller_resume(true); ++} ++ + static int i8042_pm_thaw(struct device *dev) + { + i8042_interrupt(0, NULL); +@@ -1169,9 +1179,14 @@ static int i8042_pm_thaw(struct device * + return 0; + } + ++static int i8042_pm_restore(struct device *dev) ++{ ++ return i8042_controller_resume(false); ++} ++ + static const struct dev_pm_ops i8042_pm_ops = { + .suspend = i8042_pm_reset, +- .resume = i8042_pm_restore, ++ .resume = i8042_pm_resume, + .thaw = i8042_pm_thaw, + .poweroff = i8042_pm_reset, + .restore = i8042_pm_restore, +@@ -1389,9 +1404,11 @@ static int __init i8042_probe(struct pla + + i8042_platform_device = dev; + +- error = i8042_controller_selftest(); +- if (error) +- return error; ++ if (i8042_reset) { ++ error = i8042_controller_selftest(); ++ if (error) ++ return error; ++ } + + error = i8042_controller_init(); + if (error) diff --git a/queue-2.6.35/kernel-groups.c-fix-integer-overflow-in-groups_search.patch b/queue-2.6.35/kernel-groups.c-fix-integer-overflow-in-groups_search.patch new file mode 100644 index 00000000000..de559c09d91 --- /dev/null +++ b/queue-2.6.35/kernel-groups.c-fix-integer-overflow-in-groups_search.patch @@ -0,0 +1,39 @@ +From 1c24de60e50fb19b94d94225458da17c720f0729 Mon Sep 17 00:00:00 2001 +From: Jerome Marchand +Date: Thu, 9 Sep 2010 16:37:59 -0700 +Subject: kernel/groups.c: fix integer overflow in groups_search + +From: Jerome Marchand + +commit 1c24de60e50fb19b94d94225458da17c720f0729 upstream. + +gid_t is a unsigned int. If group_info contains a gid greater than +MAX_INT, groups_search() function may look on the wrong side of the search +tree. + +This solves some unfair "permission denied" problems. + +Signed-off-by: Jerome Marchand +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/groups.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/kernel/groups.c ++++ b/kernel/groups.c +@@ -143,10 +143,9 @@ int groups_search(const struct group_inf + right = group_info->ngroups; + while (left < right) { + unsigned int mid = (left+right)/2; +- int cmp = grp - GROUP_AT(group_info, mid); +- if (cmp > 0) ++ if (grp > GROUP_AT(group_info, mid)) + left = mid + 1; +- else if (cmp < 0) ++ else if (grp < GROUP_AT(group_info, mid)) + right = mid; + else + return 1; diff --git a/queue-2.6.35/memory-hotplug-fix-next-block-calculation-in-is_removable.patch b/queue-2.6.35/memory-hotplug-fix-next-block-calculation-in-is_removable.patch new file mode 100644 index 00000000000..523405f3acd --- /dev/null +++ b/queue-2.6.35/memory-hotplug-fix-next-block-calculation-in-is_removable.patch @@ -0,0 +1,59 @@ +From 0dcc48c15f63ee86c2fcd33968b08d651f0360a5 Mon Sep 17 00:00:00 2001 +From: KAMEZAWA Hiroyuki +Date: Thu, 9 Sep 2010 16:38:01 -0700 +Subject: memory hotplug: fix next block calculation in is_removable + +From: KAMEZAWA Hiroyuki + +commit 0dcc48c15f63ee86c2fcd33968b08d651f0360a5 upstream. + +next_active_pageblock() is for finding next _used_ freeblock. It skips +several blocks when it finds there are a chunk of free pages lager than +pageblock. But it has 2 bugs. + + 1. We have no lock. page_order(page) - pageblock_order can be minus. + 2. pageblocks_stride += is wrong. it should skip page_order(p) of pages. + +Signed-off-by: KAMEZAWA Hiroyuki +Cc: Michal Hocko +Cc: Wu Fengguang +Cc: Mel Gorman +Cc: KAMEZAWA Hiroyuki +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memory_hotplug.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/mm/memory_hotplug.c ++++ b/mm/memory_hotplug.c +@@ -584,19 +584,19 @@ static inline int pageblock_free(struct + /* Return the start of the next active pageblock after a given page */ + static struct page *next_active_pageblock(struct page *page) + { +- int pageblocks_stride; +- + /* Ensure the starting page is pageblock-aligned */ + BUG_ON(page_to_pfn(page) & (pageblock_nr_pages - 1)); + +- /* Move forward by at least 1 * pageblock_nr_pages */ +- pageblocks_stride = 1; +- + /* If the entire pageblock is free, move to the end of free page */ +- if (pageblock_free(page)) +- pageblocks_stride += page_order(page) - pageblock_order; ++ if (pageblock_free(page)) { ++ int order; ++ /* be careful. we don't have locks, page_order can be changed.*/ ++ order = page_order(page); ++ if ((order < MAX_ORDER) && (order >= pageblock_order)) ++ return page + (1 << order); ++ } + +- return page + (pageblocks_stride * pageblock_nr_pages); ++ return page + pageblock_nr_pages; + } + + /* Checks if this range of memory is likely to be hot-removable. */ diff --git a/queue-2.6.35/mm-compaction-handle-active-and-inactive-fairly-in-too_many_isolated.patch b/queue-2.6.35/mm-compaction-handle-active-and-inactive-fairly-in-too_many_isolated.patch new file mode 100644 index 00000000000..e2730ca08ff --- /dev/null +++ b/queue-2.6.35/mm-compaction-handle-active-and-inactive-fairly-in-too_many_isolated.patch @@ -0,0 +1,62 @@ +From bc6930457460788e14b2c0808ed4632a1592bd61 Mon Sep 17 00:00:00 2001 +From: Minchan Kim +Date: Thu, 9 Sep 2010 16:38:00 -0700 +Subject: mm: compaction: handle active and inactive fairly in too_many_isolated + +From: Minchan Kim + +commit bc6930457460788e14b2c0808ed4632a1592bd61 upstream. + +Iram reported that compaction's too_many_isolated() loops forever. +(http://www.spinics.net/lists/linux-mm/msg08123.html) + +The meminfo when the situation happened was inactive anon is zero. That's +because the system has no memory pressure until then. While all anon +pages were in the active lru, compaction could select active lru as well +as inactive lru. That's a different thing from vmscan's isolated. So we +has been two too_many_isolated. + +While compaction can isolate pages in both active and inactive, current +implementation of too_many_isolated only considers inactive. It made +Iram's problem. + +This patch handles active and inactive fairly. That's because we can't +expect where from and how many compaction would isolated pages. + +This patch changes (nr_isolated > nr_inactive) with +nr_isolated > (nr_active + nr_inactive) / 2. + +Signed-off-by: Minchan Kim +Reported-by: Iram Shahzad +Acked-by: Mel Gorman +Acked-by: Wu Fengguang +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/compaction.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/mm/compaction.c ++++ b/mm/compaction.c +@@ -214,15 +214,16 @@ static void acct_isolated(struct zone *z + /* Similar to reclaim, but different enough that they don't share logic */ + static bool too_many_isolated(struct zone *zone) + { +- +- unsigned long inactive, isolated; ++ unsigned long active, inactive, isolated; + + inactive = zone_page_state(zone, NR_INACTIVE_FILE) + + zone_page_state(zone, NR_INACTIVE_ANON); ++ active = zone_page_state(zone, NR_ACTIVE_FILE) + ++ zone_page_state(zone, NR_ACTIVE_ANON); + isolated = zone_page_state(zone, NR_ISOLATED_FILE) + + zone_page_state(zone, NR_ISOLATED_ANON); + +- return isolated > inactive; ++ return isolated > (inactive + active) / 2; + } + + /* diff --git a/queue-2.6.35/p54-fix-tx-feedback-status-flag-check.patch b/queue-2.6.35/p54-fix-tx-feedback-status-flag-check.patch new file mode 100644 index 00000000000..bffa8e3c8cb --- /dev/null +++ b/queue-2.6.35/p54-fix-tx-feedback-status-flag-check.patch @@ -0,0 +1,41 @@ +From f880c2050f30b23c9b6f80028c09f76e693bf309 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Tue, 24 Aug 2010 22:54:05 +0200 +Subject: p54: fix tx feedback status flag check + +From: Christian Lamparter + +commit f880c2050f30b23c9b6f80028c09f76e693bf309 upstream. + +Michael reported that p54* never really entered power +save mode, even tough it was enabled. + +It turned out that upon a power save mode change the +firmware will set a special flag onto the last outgoing +frame tx status (which in this case is almost always the +designated PSM nullfunc frame). This flag confused the +driver; It erroneously reported transmission failures +to the stack, which then generated the next nullfunc. +and so on... + +Reported-by: Michael Buesch +Tested-by: Michael Buesch +Signed-off-by: Christian Lamparter +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/p54/txrx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/p54/txrx.c ++++ b/drivers/net/wireless/p54/txrx.c +@@ -444,7 +444,7 @@ static void p54_rx_frame_sent(struct p54 + } + + if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && +- (!payload->status)) ++ !(payload->status & P54_TX_FAILED)) + info->flags |= IEEE80211_TX_STAT_ACK; + if (payload->status & P54_TX_PSM_CANCELLED) + info->flags |= IEEE80211_TX_STAT_TX_FILTERED; diff --git a/queue-2.6.35/percpu-fix-a-memory-leak-in-pcpu_extend_area_map.patch b/queue-2.6.35/percpu-fix-a-memory-leak-in-pcpu_extend_area_map.patch new file mode 100644 index 00000000000..88f8b81413f --- /dev/null +++ b/queue-2.6.35/percpu-fix-a-memory-leak-in-pcpu_extend_area_map.patch @@ -0,0 +1,35 @@ +From a002d148426f40bc2b7dc066982eb177cdebeaaa Mon Sep 17 00:00:00 2001 +From: Huang Shijie +Date: Sun, 8 Aug 2010 14:39:07 +0200 +Subject: percpu: fix a memory leak in pcpu_extend_area_map() + +From: Huang Shijie + +commit a002d148426f40bc2b7dc066982eb177cdebeaaa upstream. + +The original code did not free the old map. This patch fixes it. + +tj: use @old as memcpy source instead of @chunk->map, and indentation + and description update + +Signed-off-by: Huang Shijie +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + mm/percpu.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/mm/percpu.c ++++ b/mm/percpu.c +@@ -390,7 +390,9 @@ static int pcpu_extend_area_map(struct p + goto out_unlock; + + old_size = chunk->map_alloc * sizeof(chunk->map[0]); +- memcpy(new, chunk->map, old_size); ++ old = chunk->map; ++ ++ memcpy(new, old, old_size); + + /* + * map_alloc < PCPU_DFL_MAP_ALLOC indicates that the chunk is diff --git a/queue-2.6.35/perf-initialize-callchains-roots-s-childen-hits.patch b/queue-2.6.35/perf-initialize-callchains-roots-s-childen-hits.patch new file mode 100644 index 00000000000..0fcb2a49d26 --- /dev/null +++ b/queue-2.6.35/perf-initialize-callchains-roots-s-childen-hits.patch @@ -0,0 +1,45 @@ +From 5225c45899e872383ca39f5533d28ec63c54b39e Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Sun, 22 Aug 2010 04:29:17 +0200 +Subject: perf: Initialize callchains roots's childen hits + +From: Frederic Weisbecker + +commit 5225c45899e872383ca39f5533d28ec63c54b39e upstream. + +Each histogram entry has a callchain root that stores the +callchain samples. However we forgot to initialize the +tracking of children hits of these roots, which then got +random values on their creation. + +The root children hits is multiplied by the minimum percentage +of hits provided by the user, and the result becomes the minimum +hits expected from children branches. If the random value due +to the uninitialization is big enough, then this minimum number +of hits can be huge and eventually filter every children branches. + +The end result was invisible callchains. All we need to +fix this is to initialize the children hits of the root. + +Reported-by: Christoph Hellwig +Signed-off-by: Frederic Weisbecker +Cc: Ingo Molnar +Cc: Peter Zijlstra +Cc: Arnaldo Carvalho de Melo +Cc: Paul Mackerras +Signed-off-by: Greg Kroah-Hartman + +--- + tools/perf/util/callchain.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/tools/perf/util/callchain.h ++++ b/tools/perf/util/callchain.h +@@ -50,6 +50,7 @@ static inline void callchain_init(struct + INIT_LIST_HEAD(&node->children); + INIT_LIST_HEAD(&node->val); + ++ node->children_hit = 0; + node->parent = NULL; + node->hit = 0; + } diff --git a/queue-2.6.35/powerpc-perf_event-reduce-latency-of-calling-perf_event_do_pending.patch b/queue-2.6.35/powerpc-perf_event-reduce-latency-of-calling-perf_event_do_pending.patch new file mode 100644 index 00000000000..b87da3d2d80 --- /dev/null +++ b/queue-2.6.35/powerpc-perf_event-reduce-latency-of-calling-perf_event_do_pending.patch @@ -0,0 +1,83 @@ +From b0d278b7d3ae9115939ddcea93f516308cc367e2 Mon Sep 17 00:00:00 2001 +From: Paul Mackerras +Date: Tue, 10 Aug 2010 20:38:23 +0000 +Subject: powerpc/perf_event: Reduce latency of calling perf_event_do_pending + +From: Paul Mackerras + +commit b0d278b7d3ae9115939ddcea93f516308cc367e2 upstream. + +Commit 0fe1ac48 ("powerpc/perf_event: Fix oops due to +perf_event_do_pending call") moved the call to perf_event_do_pending +in timer_interrupt() down so that it was after the irq_enter() call. +Unfortunately this moved it after the code that checks whether it +is time for the next decrementer clock event. The result is that +the call to perf_event_do_pending() won't happen until the next +decrementer clock event is due. This was pointed out by Milton +Miller. + +This fixes it by moving the check for whether it's time for the +next decrementer clock event down to the point where we're about +to call the event handler, after we've called perf_event_do_pending. + +This has the side effect that on old pre-Core99 Powermacs where we +use the ppc_n_lost_interrupts mechanism to replay interrupts, a +replayed interrupt will incur a little more latency since it will +now do the code from the irq_enter down to the irq_exit, that it +used to skip. However, these machines are now old and rare enough +that this doesn't matter. To make it clear that ppc_n_lost_interrupts +is only used on Powermacs, and to speed up the code slightly on +non-Powermac ppc32 machines, the code that tests ppc_n_lost_interrupts +is now conditional on CONFIG_PMAC as well as CONFIG_PPC32. + +Signed-off-by: Paul Mackerras +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kernel/time.c | 23 +++++++++++------------ + 1 file changed, 11 insertions(+), 12 deletions(-) + +--- a/arch/powerpc/kernel/time.c ++++ b/arch/powerpc/kernel/time.c +@@ -616,20 +616,11 @@ void timer_interrupt(struct pt_regs * re + * some CPUs will continuue to take decrementer exceptions */ + set_dec(DECREMENTER_MAX); + +-#ifdef CONFIG_PPC32 ++#if defined(CONFIG_PPC32) && defined(CONFIG_PMAC) + if (atomic_read(&ppc_n_lost_interrupts) != 0) + do_IRQ(regs); + #endif + +- now = get_tb_or_rtc(); +- if (now < decrementer->next_tb) { +- /* not time for this event yet */ +- now = decrementer->next_tb - now; +- if (now <= DECREMENTER_MAX) +- set_dec((int)now); +- trace_timer_interrupt_exit(regs); +- return; +- } + old_regs = set_irq_regs(regs); + irq_enter(); + +@@ -645,8 +636,16 @@ void timer_interrupt(struct pt_regs * re + get_lppaca()->int_dword.fields.decr_int = 0; + #endif + +- if (evt->event_handler) +- evt->event_handler(evt); ++ now = get_tb_or_rtc(); ++ if (now >= decrementer->next_tb) { ++ decrementer->next_tb = ~(u64)0; ++ if (evt->event_handler) ++ evt->event_handler(evt); ++ } else { ++ now = decrementer->next_tb - now; ++ if (now <= DECREMENTER_MAX) ++ set_dec((int)now); ++ } + + #ifdef CONFIG_PPC_ISERIES + if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) diff --git a/queue-2.6.35/rdma-cxgb3-don-t-exceed-the-max-hw-cq-depth.patch b/queue-2.6.35/rdma-cxgb3-don-t-exceed-the-max-hw-cq-depth.patch new file mode 100644 index 00000000000..652475cf141 --- /dev/null +++ b/queue-2.6.35/rdma-cxgb3-don-t-exceed-the-max-hw-cq-depth.patch @@ -0,0 +1,32 @@ +From dc4e96ce2dceb649224ee84f83592aac8c54c9b7 Mon Sep 17 00:00:00 2001 +From: Steve Wise +Date: Sat, 28 Aug 2010 13:35:05 +0000 +Subject: RDMA/cxgb3: Don't exceed the max HW CQ depth + +From: Steve Wise + +commit dc4e96ce2dceb649224ee84f83592aac8c54c9b7 upstream. + +The max depth supported by T3 is 64K entries. This fixes a bug +introduced in commit 9918b28d ("RDMA/cxgb3: Increase the max CQ +depth") that causes stalls and possibly crashes in large MPI clusters. + +Signed-off-by: Steve Wise +Signed-off-by: Roland Dreier +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/infiniband/hw/cxgb3/cxio_hal.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/infiniband/hw/cxgb3/cxio_hal.h ++++ b/drivers/infiniband/hw/cxgb3/cxio_hal.h +@@ -53,7 +53,7 @@ + #define T3_MAX_PBL_SIZE 256 + #define T3_MAX_RQ_SIZE 1024 + #define T3_MAX_QP_DEPTH (T3_MAX_RQ_SIZE-1) +-#define T3_MAX_CQ_DEPTH 262144 ++#define T3_MAX_CQ_DEPTH 65536 + #define T3_MAX_NUM_STAG (1<<15) + #define T3_MAX_MR_SIZE 0x100000000ULL + #define T3_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ diff --git a/queue-2.6.35/series b/queue-2.6.35/series index c5b452efbb4..5f9eff72217 100644 --- a/queue-2.6.35/series +++ b/queue-2.6.35/series @@ -83,3 +83,20 @@ mmc-fix-all-hangs-related-to-mmc-sd-card-insert-removal-during-suspend-resume.pa mmc-build-fix-mmc_pm_notify-is-only-available-with-config_pm-y.patch statfs-gives-estale-error.patch minix-fix-regression-in-minix_mkdir.patch +bounce-call-flush_dcache_page-after-bounce_copy_vec.patch +mm-compaction-handle-active-and-inactive-fairly-in-too_many_isolated.patch +kernel-groups.c-fix-integer-overflow-in-groups_search.patch +binfmt_misc-fix-binfmt_misc-priority.patch +input-i8042-fix-device-removal-on-unload.patch +input-i8042-reset-keyboard-controller-wehen-resuming-from-s2r.patch +memory-hotplug-fix-next-block-calculation-in-is_removable.patch +perf-initialize-callchains-roots-s-childen-hits.patch +powerpc-perf_event-reduce-latency-of-calling-perf_event_do_pending.patch +p54-fix-tx-feedback-status-flag-check.patch +ath5k-check-return-value-of-ieee80211_get_tx_rate.patch +percpu-fix-a-memory-leak-in-pcpu_extend_area_map.patch +wireless-extensions-fix-kernel-heap-content-leak.patch +rdma-cxgb3-don-t-exceed-the-max-hw-cq-depth.patch +x86-tsc-fix-a-preemption-leak-in-restore_sched_clock_state.patch +x86-64-compat-test-rax-for-the-syscall-number-not-eax.patch +compat-make-compat_alloc_user_space-incorporate-the-access_ok.patch diff --git a/queue-2.6.35/wireless-extensions-fix-kernel-heap-content-leak.patch b/queue-2.6.35/wireless-extensions-fix-kernel-heap-content-leak.patch new file mode 100644 index 00000000000..eebba6b257e --- /dev/null +++ b/queue-2.6.35/wireless-extensions-fix-kernel-heap-content-leak.patch @@ -0,0 +1,78 @@ +From 42da2f948d949efd0111309f5827bf0298bcc9a4 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Mon, 30 Aug 2010 12:24:54 +0200 +Subject: wireless extensions: fix kernel heap content leak + +From: Johannes Berg + +commit 42da2f948d949efd0111309f5827bf0298bcc9a4 upstream. + +Wireless extensions have an unfortunate, undocumented +requirement which requires drivers to always fill +iwp->length when returning a successful status. When +a driver doesn't do this, it leads to a kernel heap +content leak when userspace offers a larger buffer +than would have been necessary. + +Arguably, this is a driver bug, as it should, if it +returns 0, fill iwp->length, even if it separately +indicated that the buffer contents was not valid. + +However, we can also at least avoid the memory content +leak if the driver doesn't do this by setting the iwp +length to max_tokens, which then reflects how big the +buffer is that the driver may fill, regardless of how +big the userspace buffer is. + +To illustrate the point, this patch also fixes a +corresponding cfg80211 bug (since this requirement +isn't documented nor was ever pointed out by anyone +during code review, I don't trust all drivers nor +all cfg80211 handlers to implement it correctly). + +Signed-off-by: Johannes Berg +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + net/wireless/wext-compat.c | 3 +++ + net/wireless/wext-core.c | 16 ++++++++++++++++ + 2 files changed, 19 insertions(+) + +--- a/net/wireless/wext-compat.c ++++ b/net/wireless/wext-compat.c +@@ -1420,6 +1420,9 @@ int cfg80211_wext_giwessid(struct net_de + { + struct wireless_dev *wdev = dev->ieee80211_ptr; + ++ data->flags = 0; ++ data->length = 0; ++ + switch (wdev->iftype) { + case NL80211_IFTYPE_ADHOC: + return cfg80211_ibss_wext_giwessid(dev, info, data, ssid); +--- a/net/wireless/wext-core.c ++++ b/net/wireless/wext-core.c +@@ -782,6 +782,22 @@ static int ioctl_standard_iw_point(struc + } + } + ++ if (IW_IS_GET(cmd) && !(descr->flags & IW_DESCR_FLAG_NOMAX)) { ++ /* ++ * If this is a GET, but not NOMAX, it means that the extra ++ * data is not bounded by userspace, but by max_tokens. Thus ++ * set the length to max_tokens. This matches the extra data ++ * allocation. ++ * The driver should fill it with the number of tokens it ++ * provided, and it may check iwp->length rather than having ++ * knowledge of max_tokens. If the driver doesn't change the ++ * iwp->length, this ioctl just copies back max_token tokens ++ * filled with zeroes. Hopefully the driver isn't claiming ++ * them to be valid data. ++ */ ++ iwp->length = descr->max_tokens; ++ } ++ + err = handler(dev, info, (union iwreq_data *) iwp, extra); + + iwp->length += essid_compat; diff --git a/queue-2.6.35/x86-64-compat-test-rax-for-the-syscall-number-not-eax.patch b/queue-2.6.35/x86-64-compat-test-rax-for-the-syscall-number-not-eax.patch new file mode 100644 index 00000000000..8bf27c2078c --- /dev/null +++ b/queue-2.6.35/x86-64-compat-test-rax-for-the-syscall-number-not-eax.patch @@ -0,0 +1,97 @@ +From 36d001c70d8a0144ac1d038f6876c484849a74de Mon Sep 17 00:00:00 2001 +From: H. Peter Anvin +Date: Tue, 14 Sep 2010 12:42:41 -0700 +Subject: x86-64, compat: Test %rax for the syscall number, not %eax + +From: H. Peter Anvin + +commit 36d001c70d8a0144ac1d038f6876c484849a74de upstream. + +On 64 bits, we always, by necessity, jump through the system call +table via %rax. For 32-bit system calls, in theory the system call +number is stored in %eax, and the code was testing %eax for a valid +system call number. At one point we loaded the stored value back from +the stack to enforce zero-extension, but that was removed in checkin +d4d67150165df8bf1cc05e532f6efca96f907cab. An actual 32-bit process +will not be able to introduce a non-zero-extended number, but it can +happen via ptrace. + +Instead of re-introducing the zero-extension, test what we are +actually going to use, i.e. %rax. This only adds a handful of REX +prefixes to the code. + +Reported-by: Ben Hawkes +Signed-off-by: H. Peter Anvin +Cc: Roland McGrath +Cc: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/ia32/ia32entry.S | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/arch/x86/ia32/ia32entry.S ++++ b/arch/x86/ia32/ia32entry.S +@@ -153,7 +153,7 @@ ENTRY(ia32_sysenter_target) + testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) + CFI_REMEMBER_STATE + jnz sysenter_tracesys +- cmpl $(IA32_NR_syscalls-1),%eax ++ cmpq $(IA32_NR_syscalls-1),%rax + ja ia32_badsys + sysenter_do_call: + IA32_ARG_FIXUP +@@ -195,7 +195,7 @@ sysexit_from_sys_call: + movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */ + call audit_syscall_entry + movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */ +- cmpl $(IA32_NR_syscalls-1),%eax ++ cmpq $(IA32_NR_syscalls-1),%rax + ja ia32_badsys + movl %ebx,%edi /* reload 1st syscall arg */ + movl RCX-ARGOFFSET(%rsp),%esi /* reload 2nd syscall arg */ +@@ -248,7 +248,7 @@ sysenter_tracesys: + call syscall_trace_enter + LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ + RESTORE_REST +- cmpl $(IA32_NR_syscalls-1),%eax ++ cmpq $(IA32_NR_syscalls-1),%rax + ja int_ret_from_sys_call /* sysenter_tracesys has set RAX(%rsp) */ + jmp sysenter_do_call + CFI_ENDPROC +@@ -314,7 +314,7 @@ ENTRY(ia32_cstar_target) + testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) + CFI_REMEMBER_STATE + jnz cstar_tracesys +- cmpl $IA32_NR_syscalls-1,%eax ++ cmpq $IA32_NR_syscalls-1,%rax + ja ia32_badsys + cstar_do_call: + IA32_ARG_FIXUP 1 +@@ -367,7 +367,7 @@ cstar_tracesys: + LOAD_ARGS32 ARGOFFSET, 1 /* reload args from stack in case ptrace changed it */ + RESTORE_REST + xchgl %ebp,%r9d +- cmpl $(IA32_NR_syscalls-1),%eax ++ cmpq $(IA32_NR_syscalls-1),%rax + ja int_ret_from_sys_call /* cstar_tracesys has set RAX(%rsp) */ + jmp cstar_do_call + END(ia32_cstar_target) +@@ -425,7 +425,7 @@ ENTRY(ia32_syscall) + orl $TS_COMPAT,TI_status(%r10) + testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) + jnz ia32_tracesys +- cmpl $(IA32_NR_syscalls-1),%eax ++ cmpq $(IA32_NR_syscalls-1),%rax + ja ia32_badsys + ia32_do_call: + IA32_ARG_FIXUP +@@ -444,7 +444,7 @@ ia32_tracesys: + call syscall_trace_enter + LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ + RESTORE_REST +- cmpl $(IA32_NR_syscalls-1),%eax ++ cmpq $(IA32_NR_syscalls-1),%rax + ja int_ret_from_sys_call /* ia32_tracesys has set RAX(%rsp) */ + jmp ia32_do_call + END(ia32_syscall) diff --git a/queue-2.6.35/x86-tsc-fix-a-preemption-leak-in-restore_sched_clock_state.patch b/queue-2.6.35/x86-tsc-fix-a-preemption-leak-in-restore_sched_clock_state.patch new file mode 100644 index 00000000000..b92ce628f95 --- /dev/null +++ b/queue-2.6.35/x86-tsc-fix-a-preemption-leak-in-restore_sched_clock_state.patch @@ -0,0 +1,43 @@ +From 55496c896b8a695140045099d4e0175cf09d4eae Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Fri, 10 Sep 2010 22:32:53 +0200 +Subject: x86, tsc: Fix a preemption leak in restore_sched_clock_state() + +From: Peter Zijlstra + +commit 55496c896b8a695140045099d4e0175cf09d4eae upstream. + +Doh, a real life genuine preemption leak.. + +This caused a suspend failure. + +Reported-bisected-and-tested-by-the-invaluable: Jeff Chua +Acked-by: Suresh Siddha +Signed-off-by: Peter Zijlstra +Cc: Rafael J. Wysocki +Cc: Nico Schottelius +Cc: Jesse Barnes +Cc: Linus Torvalds +Cc: Florian Pritz +Cc: Suresh Siddha +Cc: Len Brown +sleep states +LKML-Reference: <1284150773.402.122.camel@laptop> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/tsc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/tsc.c ++++ b/arch/x86/kernel/tsc.c +@@ -655,7 +655,7 @@ void restore_sched_clock_state(void) + + local_irq_save(flags); + +- get_cpu_var(cyc2ns_offset) = 0; ++ __get_cpu_var(cyc2ns_offset) = 0; + offset = cyc2ns_suspend - sched_clock(); + + for_each_possible_cpu(cpu)