commit 2b1caf6ed7b888c95a1909d343799672731651a5 Merge: d551d81 bd924e8 Author: Linus Torvalds Date: Thu Jan 20 18:30:37 2011 -0800 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: smp: Allow on_each_cpu() to be called while early_boot_irqs_disabled status to init/main.c lockdep: Move early boot local IRQ enable/disable status to init/main.c commit d551d81d6a720542873f478def60baab6b5df403 Author: Rafael J. Wysocki Date: Wed Jan 19 22:27:55 2011 +0100 ACPI / PM: Call suspend_nvs_free() earlier during resume It turns out that some device drivers map pages from the ACPI NVS region during resume using ioremap(), which conflicts with ioremap_cache() used for mapping those pages by the NVS save/restore code in nvs.c. Make the NVS pages mapped by the code in nvs.c be unmapped before device drivers' resume routines run. Signed-off-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds commit 2d6d9fd3a54a28c6f67f26eb6c74803307a1b11e Author: Rafael J. Wysocki Date: Wed Jan 19 22:27:14 2011 +0100 ACPI: Introduce acpi_os_ioremap() Commit ca9b600be38c ("ACPI / PM: Make suspend_nvs_save() use acpi_os_map_memory()") attempted to prevent the code in osl.c and nvs.c from using different ioremap() variants by making the latter use acpi_os_map_memory() for mapping the NVS pages. However, that also requires acpi_os_unmap_memory() to be used for unmapping them, which causes synchronize_rcu() to be executed many times in a row unnecessarily and introduces substantial delays during resume on some systems. Instead of using acpi_os_map_memory() for mapping the NVS pages in nvs.c introduce acpi_os_ioremap() calling ioremap_cache() and make the code in both osl.c and nvs.c use it. Reported-by: Jeff Chua Signed-off-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds commit 8d99641f6c1af806cd5d9e6badce91910219a161 Merge: fc887b1 225c8e0 Author: Linus Torvalds Date: Thu Jan 20 17:02:14 2011 -0800 Merge branch 'akpm' * akpm: kernel/smp.c: consolidate writes in smp_call_function_interrupt() kernel/smp.c: fix smp_call_function_many() SMP race memcg: correctly order reading PCG_USED and pc->mem_cgroup backlight: fix 88pm860x_bl macro collision drivers/leds/ledtrig-gpio.c: make output match input, tighten input checking MAINTAINERS: update Atmel AT91 entry mm: fix truncate_setsize() comment memcg: fix rmdir, force_empty with THP memcg: fix LRU accounting with THP memcg: fix USED bit handling at uncharge in THP memcg: modify accounting function for supporting THP better fs/direct-io.c: don't try to allocate more than BIO_MAX_PAGES in a bio mm: compaction: prevent division-by-zero during user-requested compaction mm/vmscan.c: remove duplicate include of compaction.h memblock: fix memblock_is_region_memory() thp: keep highpte mapped until it is no longer needed kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT commit 225c8e010f2d17a62aef131e24c6e7c111f36f9b Author: Milton Miller Date: Thu Jan 20 14:44:34 2011 -0800 kernel/smp.c: consolidate writes in smp_call_function_interrupt() We have to test the cpu mask in the interrupt handler before checking the refs, otherwise we can start to follow an entry before its deleted and find it partially initailzed for the next trip. Presently we also clear the cpumask bit before executing the called function, which implies getting write access to the line. After the function is called we then decrement refs, and if they go to zero we then unlock the structure. However, this implies getting write access to the call function data before and after another the function is called. If we can assert that no smp_call_function execution function is allowed to enable interrupts, then we can move both writes to after the function is called, hopfully allowing both writes with one cache line bounce. On a 256 thread system with a kernel compiled for 1024 threads, the time to execute testcase in the "smp_call_function_many race" changelog was reduced by about 30-40ms out of about 545 ms. I decided to keep this as WARN because its now a buggy function, even though the stack trace is of no value -- a simple printk would give us the information needed. Raw data: Without patch: ipi_test startup took 1219366ns complete 539819014ns total 541038380ns ipi_test startup took 1695754ns complete 543439872ns total 545135626ns ipi_test startup took 7513568ns complete 539606362ns total 547119930ns ipi_test startup took 13304064ns complete 533898562ns total 547202626ns ipi_test startup took 8668192ns complete 544264074ns total 552932266ns ipi_test startup took 4977626ns complete 548862684ns total 553840310ns ipi_test startup took 2144486ns complete 541292318ns total 543436804ns ipi_test startup took 21245824ns complete 530280180ns total 551526004ns With patch: ipi_test startup took 5961748ns complete 500859628ns total 506821376ns ipi_test startup took 8975996ns complete 495098924ns total 504074920ns ipi_test startup took 19797750ns complete 492204740ns total 512002490ns ipi_test startup took 14824796ns complete 487495878ns total 502320674ns ipi_test startup took 11514882ns complete 494439372ns total 505954254ns ipi_test startup took 8288084ns complete 502570774ns total 510858858ns ipi_test startup took 6789954ns complete 493388112ns total 500178066ns #include #include #include /* sched clock */ #define ITERATIONS 100 static void do_nothing_ipi(void *dummy) { } static void do_ipis(struct work_struct *dummy) { int i; for (i = 0; i < ITERATIONS; i++) smp_call_function(do_nothing_ipi, NULL, 1); printk(KERN_DEBUG "cpu %d finished\n", smp_processor_id()); } static struct work_struct work[NR_CPUS]; static int __init testcase_init(void) { int cpu; u64 start, started, done; start = local_clock(); for_each_online_cpu(cpu) { INIT_WORK(&work[cpu], do_ipis); schedule_work_on(cpu, &work[cpu]); } started = local_clock(); for_each_online_cpu(cpu) flush_work(&work[cpu]); done = local_clock(); pr_info("ipi_test startup took %lldns complete %lldns total %lldns\n", started-start, done-started, done-start); return 0; } static void __exit testcase_exit(void) { } module_init(testcase_init) module_exit(testcase_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Anton Blanchard"); Signed-off-by: Milton Miller Cc: Anton Blanchard Cc: Ingo Molnar Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6dc19899958e420a931274b94019e267e2396d3e Author: Anton Blanchard Date: Thu Jan 20 14:44:33 2011 -0800 kernel/smp.c: fix smp_call_function_many() SMP race I noticed a failure where we hit the following WARN_ON in generic_smp_call_function_interrupt: if (!cpumask_test_and_clear_cpu(cpu, data->cpumask)) continue; data->csd.func(data->csd.info); refs = atomic_dec_return(&data->refs); WARN_ON(refs < 0); <------------------------- We atomically tested and cleared our bit in the cpumask, and yet the number of cpus left (ie refs) was 0. How can this be? It turns out commit 54fdade1c3332391948ec43530c02c4794a38172 ("generic-ipi: make struct call_function_data lockless") is at fault. It removes locking from smp_call_function_many and in doing so creates a rather complicated race. The problem comes about because: - The smp_call_function_many interrupt handler walks call_function.queue without any locking. - We reuse a percpu data structure in smp_call_function_many. - We do not wait for any RCU grace period before starting the next smp_call_function_many. Imagine a scenario where CPU A does two smp_call_functions back to back, and CPU B does an smp_call_function in between. We concentrate on how CPU C handles the calls: CPU A CPU B CPU C CPU D smp_call_function smp_call_function_interrupt walks call_function.queue sees data from CPU A on list smp_call_function smp_call_function_interrupt walks call_function.queue sees (stale) CPU A on list smp_call_function int clears last ref on A list_del_rcu, unlock smp_call_function reuses percpu *data A data->cpumask sees and clears bit in cpumask might be using old or new fn! decrements refs below 0 set data->refs (too late!) The important thing to note is since the interrupt handler walks a potentially stale call_function.queue without any locking, then another cpu can view the percpu *data structure at any time, even when the owner is in the process of initialising it. The following test case hits the WARN_ON 100% of the time on my PowerPC box (having 128 threads does help :) #include #include #define ITERATIONS 100 static void do_nothing_ipi(void *dummy) { } static void do_ipis(struct work_struct *dummy) { int i; for (i = 0; i < ITERATIONS; i++) smp_call_function(do_nothing_ipi, NULL, 1); printk(KERN_DEBUG "cpu %d finished\n", smp_processor_id()); } static struct work_struct work[NR_CPUS]; static int __init testcase_init(void) { int cpu; for_each_online_cpu(cpu) { INIT_WORK(&work[cpu], do_ipis); schedule_work_on(cpu, &work[cpu]); } return 0; } static void __exit testcase_exit(void) { } module_init(testcase_init) module_exit(testcase_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Anton Blanchard"); I tried to fix it by ordering the read and the write of ->cpumask and ->refs. In doing so I missed a critical case but Paul McKenney was able to spot my bug thankfully :) To ensure we arent viewing previous iterations the interrupt handler needs to read ->refs then ->cpumask then ->refs _again_. Thanks to Milton Miller and Paul McKenney for helping to debug this issue. [miltonm@bga.com: add WARN_ON and BUG_ON, remove extra read of refs before initial read of mask that doesn't help (also noted by Peter Zijlstra), adjust comments, hopefully clarify scenario ] [miltonm@bga.com: remove excess tests] Signed-off-by: Anton Blanchard Signed-off-by: Milton Miller Cc: Ingo Molnar Cc: "Paul E. McKenney" Cc: [2.6.32+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 713735b4233fad3ae35b5cad656baa41413887ca Author: Johannes Weiner Date: Thu Jan 20 14:44:31 2011 -0800 memcg: correctly order reading PCG_USED and pc->mem_cgroup The placement of the read-side barrier is confused: the writer first sets pc->mem_cgroup, then PCG_USED. The read-side barrier has to be between testing PCG_USED and reading pc->mem_cgroup. Signed-off-by: Johannes Weiner Acked-by: KAMEZAWA Hiroyuki Acked-by: Daisuke Nishimura Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2550326ac7a062fdfc204f9a3b98bdb9179638fc Author: Randy Dunlap Date: Thu Jan 20 14:44:31 2011 -0800 backlight: fix 88pm860x_bl macro collision Fix collision with kernel-supplied #define: drivers/video/backlight/88pm860x_bl.c:24:1: warning: "CURRENT_MASK" redefined arch/x86/include/asm/page_64_types.h:6:1: warning: this is the location of the previous definition Signed-off-by: Randy Dunlap Cc: Haojian Zhuang Cc: Richard Purdie Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cc587ece12791d001095488bf060fac52f657ea9 Author: Janusz Krzysztofik Date: Thu Jan 20 14:44:29 2011 -0800 drivers/leds/ledtrig-gpio.c: make output match input, tighten input checking Replicate changes made to drivers/leds/ledtrig-backlight.c. Cc: Paul Mundt Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1fc8675c9e3dede8e7cd91cebb2025e2e6db2dc Author: Nicolas Ferre Date: Thu Jan 20 14:44:27 2011 -0800 MAINTAINERS: update Atmel AT91 entry Add two co-maintainers and update the entry with new information. Signed-off-by: Nicolas Ferre Acked-by: Andrew Victor Acked-by: Jean-Christophe PLAGNIOL-VILLARD Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 382e27daa542ce97c500dc357841c6416c735cc2 Author: Jan Kara Date: Thu Jan 20 14:44:26 2011 -0800 mm: fix truncate_setsize() comment Contrary to what the comment says, truncate_setsize() should be called *before* filesystem truncated blocks. Signed-off-by: Jan Kara Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 987eba66e0e6aa654d60881a14731a353ee0acb4 Author: KAMEZAWA Hiroyuki Date: Thu Jan 20 14:44:25 2011 -0800 memcg: fix rmdir, force_empty with THP Now, when THP is enabled, memcg's rmdir() function is broken because move_account() for THP page is not supported. This will cause account leak or -EBUSY issue at rmdir(). This patch fixes the issue by supporting move_account() THP pages. Signed-off-by: KAMEZAWA Hiroyuki Cc: Daisuke Nishimura Cc: Balbir Singh Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ece35ca810326946ddc930c43356312ad5de44d4 Author: KAMEZAWA Hiroyuki Date: Thu Jan 20 14:44:24 2011 -0800 memcg: fix LRU accounting with THP memory cgroup's LRU stat should take care of size of pages because Transparent Hugepage inserts hugepage into LRU. If this value is the number wrong, memory reclaim will not work well. Note: only head page of THP's huge page is linked into LRU. Signed-off-by: KAMEZAWA Hiroyuki Cc: Daisuke Nishimura Cc: Balbir Singh Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca3e021417eed30ec2b64ce88eb0acf64aa9bc29 Author: KAMEZAWA Hiroyuki Date: Thu Jan 20 14:44:24 2011 -0800 memcg: fix USED bit handling at uncharge in THP Now, under THP: at charge: - PageCgroupUsed bit is set to all page_cgroup on a hugepage. ....set to 512 pages. at uncharge - PageCgroupUsed bit is unset on the head page. So, some pages will remain with "Used" bit. This patch fixes that Used bit is set only to the head page. Used bits for tail pages will be set at splitting if necessary. This patch adds this lock order: compound_lock() -> page_cgroup_move_lock(). [akpm@linux-foundation.org: fix warning] Signed-off-by: KAMEZAWA Hiroyuki Cc: Daisuke Nishimura Cc: Balbir Singh Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e401f1761c0b01966e36e41e2c385d455a7b44ee Author: KAMEZAWA Hiroyuki Date: Thu Jan 20 14:44:23 2011 -0800 memcg: modify accounting function for supporting THP better mem_cgroup_charge_statisics() was designed for charging a page but now, we have transparent hugepage. To fix problems (in following patch) it's required to change the function to get the number of pages as its arguments. The new function gets following as argument. - type of page rather than 'pc' - size of page which is accounted. Signed-off-by: KAMEZAWA Hiroyuki Cc: Daisuke Nishimura Cc: Balbir Singh Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 20d9600cb407b0b55fef6ee814b60345c6f58264 Author: David Dillow Date: Thu Jan 20 14:44:22 2011 -0800 fs/direct-io.c: don't try to allocate more than BIO_MAX_PAGES in a bio When using devices that support max_segments > BIO_MAX_PAGES (256), direct IO tries to allocate a bio with more pages than allowed, which leads to an oops in dio_bio_alloc(). Clamp the request to the supported maximum, and change dio_bio_alloc() to reflect that bio_alloc() will always return a bio when called with __GFP_WAIT and a valid number of vectors. [akpm@linux-foundation.org: remove redundant BUG_ON()] Signed-off-by: David Dillow Reviewed-by: Jeff Moyer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82478fb7bca28e3ca2f3c55c14e690f749dd4dbb Author: Johannes Weiner Date: Thu Jan 20 14:44:21 2011 -0800 mm: compaction: prevent division-by-zero during user-requested compaction Up until 3e7d344 ("mm: vmscan: reclaim order-0 and use compaction instead of lumpy reclaim"), compaction skipped calculating the fragmentation index of a zone when compaction was explicitely requested through the procfs knob. However, when compaction_suitable was introduced, it did not come with an extra check for order == -1, set on explicit compaction requests, and passed this order on to the fragmentation index calculation, where it overshifts the number of requested pages, leading to a division by zero. This patch makes sure that order == -1 is recognized as the flag it is rather than passing it along as valid order parameter. [akpm@linux-foundation.org: add comment, per Mel] Signed-off-by: Johannes Weiner Reviewed-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3305de51bf612603c9a4e4dc98ceb839ef933749 Author: Jesper Juhl Date: Thu Jan 20 14:44:20 2011 -0800 mm/vmscan.c: remove duplicate include of compaction.h Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abb65272a190660790096628859e752172d822fd Author: Tomi Valkeinen Date: Thu Jan 20 14:44:20 2011 -0800 memblock: fix memblock_is_region_memory() memblock_is_region_memory() uses reserved memblocks to search for the given region, while it should use the memory memblocks. I encountered the problem with OMAP's framebuffer ram allocation. Normally the ram is allocated dynamically, and this function is not called. However, if we want to pass the framebuffer from the bootloader to the kernel (to retain the boot image), this function is used to check the validity of the kernel parameters for the framebuffer ram area. Signed-off-by: Tomi Valkeinen Acked-by: Yinghai Lu Cc: Benjamin Herrenschmidt Cc: "H. Peter Anvin" Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 453c719261c0b4030b2676124adb6e81c5fb6833 Author: Johannes Weiner Date: Thu Jan 20 14:44:18 2011 -0800 thp: keep highpte mapped until it is no longer needed Two users reported THP-related crashes on 32-bit x86 machines. Their oops reports indicated an invalid pte, and subsequent code inspection showed that the highpte is actually used after unmap. The fix is to unmap the pte only after all operations against it are finished. Signed-off-by: Johannes Weiner Reported-by: Ilya Dryomov Reported-by: werner Cc: Andrea Arcangeli Tested-by: Ilya Dryomov Tested-by: Steven Rostedt Signed-off-by: Linus Torvalds commit 6a108a14fa356ef607be308b68337939e56ea94e Author: David Rientjes Date: Thu Jan 20 14:44:16 2011 -0800 kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option is used to configure any non-standard kernel with a much larger scope than only small devices. This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes references to the option throughout the kernel. A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Calling the option "EXPERT" more accurately represents its intention: only expert users who understand the impact of the configuration changes they are making should enable it. Reviewed-by: Ingo Molnar Acked-by: David Woodhouse Signed-off-by: David Rientjes Cc: Greg KH Cc: "David S. Miller" Cc: Jens Axboe Cc: Arnd Bergmann Cc: Robin Holt Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc887b15d935ead2a00aef5779a18034e7c69ee1 Merge: 466c190 df62125 Author: Linus Torvalds Date: Thu Jan 20 16:39:23 2011 -0800 Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: tty: update MAINTAINERS file due to driver movement tty: move drivers/serial/ to drivers/tty/serial/ tty: move hvc drivers to drivers/tty/hvc/ commit 466c19063b4b426d5c362572787cb249fbf4296b Merge: 67290f4 068c5cc Author: Linus Torvalds Date: Thu Jan 20 16:37:55 2011 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched, cgroup: Use exit hook to avoid use-after-free crash sched: Fix signed unsigned comparison in check_preempt_tick() sched: Replace rq->bkl_count with rq->rq_sched_info.bkl_count sched, autogroup: Fix CONFIG_RT_GROUP_SCHED sched_setscheduler() failure sched: Display autogroup names in /proc/sched_debug sched: Reinstate group names in /proc/sched_debug sched: Update effective_load() to use global share weights commit 67290f41b2715de0e0ae93c9285fcbe37ffc5b22 Merge: 5cdec1f 6a5b3be Author: Linus Torvalds Date: Thu Jan 20 16:37:28 2011 -0800 Merge branch 'xen/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen * 'xen/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: xenbus: Fix memory leak on release xenbus: avoid zero returns from read() xenbus: add missing wakeup in concurrent read/write xenbus: allow any xenbus command over /proc/xen/xenbus xenfs/xenbus: report partial reads/writes correctly commit 5cdec1fca2ff128ca0716dc1ef0fc0043e4ae8ab Merge: e55fdbd 76dcc26 Author: Linus Torvalds Date: Thu Jan 20 16:36:38 2011 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: mangle existing header for SMB_COM_NT_CANCEL cifs: remove code for setting timeouts on requests [CIFS] cifs: reconnect unresponsive servers cifs: set up recurring workqueue job to do SMB echo requests cifs: add ability to send an echo request cifs: add cifs_call_async cifs: allow for different handling of received response cifs: clean up sync_mid_result cifs: don't reconnect server when we don't get a response cifs: wait indefinitely for responses cifs: Use mask of ACEs for SID Everyone to calculate all three permissions user, group, and other cifs: Fix regression during share-level security mounts (Repost) [CIFS] Update cifs version number cifs: move mid result processing into common function cifs: move locked sections out of DeleteMidQEntry and AllocMidQEntry cifs: clean up accesses to midCount cifs: make wait_for_free_request take a TCP_Server_Info pointer cifs: no need to mark smb_ses_list as cifs_demultiplex_thread is exiting cifs: don't fail writepages on -EAGAIN errors CIFS: Fix oplock break handling (try #2) commit e55fdbd7414a3ee991d7081a256153f61ea98b9f Merge: c522682 8b3bb3e Author: Linus Torvalds Date: Thu Jan 20 16:31:20 2011 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio: remove virtio-pci root device LGUEST_GUEST: fix unmet direct dependencies (VIRTUALIZATION && VIRTIO) lguest: compile fixes lguest: Use this_cpu_ops lguest: document --rng in example Launcher lguest: example launcher to use guard pages, drop PROT_EXEC, fix limit logic lguest: --username and --chroot options commit c522682d7433d27461d631d03a2a1a3b741e9c91 Merge: 069b614 7c63ded Author: Linus Torvalds Date: Thu Jan 20 16:30:22 2011 -0800 Merge branch 'for-38-rc2' of git://codeaurora.org/quic/kernel/davidb/linux-msm * 'for-38-rc2' of git://codeaurora.org/quic/kernel/davidb/linux-msm: msm: qsd8x50: Platform data isn't init data commit 069b6143378a17d44854619c1062393b361ebfe1 Merge: b06ae1ea 154a96b Author: Linus Torvalds Date: Thu Jan 20 16:29:43 2011 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: trusted-keys: avoid scattring va_end() trusted-keys: check for NULL before using it trusted-keys: another free memory bugfix trusted-keys: free memory bugfix commit b06ae1ead2915860bb49331e0588aab326801f71 Merge: e589501 24d9765 Author: Linus Torvalds Date: Thu Jan 20 16:29:04 2011 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes: GFS2: Fix error path in gfs2_lookup_by_inum() GFS2: remove iopen glocks from cache on failed deletes commit e589501cb928b482c3c399444f788e1af35deee2 Merge: 28e58ee 8d5f0a6 Author: Linus Torvalds Date: Thu Jan 20 16:28:34 2011 -0800 Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPICA: Update version to 20110112 ACPICA: Update all ACPICA copyrights and signons to 2011 ACPICA: Fix issues/fault with automatic "serialized" method support ACPICA: Debugger: Lock namespace for duration of a namespace dump ACPICA: Fix namespace race condition ACPICA: Fix memory leak in acpi_ev_asynch_execute_gpe_method(). commit 28e58ee8ce1f0e69c207f747b7b9054b071e328d Author: Linus Torvalds Date: Thu Jan 20 16:21:59 2011 -0800 Fix broken "pipe: use event aware wakeups" optimization Commit e462c448fdc8 ("pipe: use event aware wakeups") optimized the pipe event wakeup calls to avoid wakeups if the events do not match the requested set. However, the optimization was buggy, in that it didn't actually use the correct sets for the events: when we make room for more data to be written, the pipe poll() routine will return both the POLLOUT _and_ POLLWRNORM bits. Similarly for read. And most critically, when a pipe is released, that will potentially result in POLLHUP|POLLERR (depending on whether it was the last reader or writer), not just the regular POLLIN|POLLOUT. This bug showed itself as a hung gnome-screensaver-dialog process, stuck forever (or at least until it was poked by a signal or by being traced) in a poll() system call. Cc: Davide Libenzi Cc: David S. Miller Cc: Eric Dumazet Cc: Jens Axboe Cc: Andrew Morton Signed-off-by: Linus Torvalds commit d7b9935a347ae954be907ea3d5eb4564ff124c53 Author: Linus Torvalds Date: Thu Jan 20 13:19:55 2011 -0800 i915: Fix i915 suspend delay During system suspend, the "wait for ring buffer to empty" loop would always time out after three seconds, because the faster cached ring buffer head read would always return zero. Force the slow-and-careful PIO read on all but the first iterations of the loop to fix it. This also removes the unused (and useless) 'actual_head' variable that tried to approximate doing this, but did it incorrectly. Cc: Chris Wilson Cc: Rafael J. Wysocki Cc: Jesse Barnes Cc: Dave Airlie Cc: DRI mailing list Signed-off-by: Linus Torvalds commit b23fffd778c312b8fb258d342051fcbdf6712128 Author: Linus Torvalds Date: Thu Jan 20 13:14:10 2011 -0800 ACPI / Battery: remove battery refresh on resume This partially reverts commit da8aeb92d4853f37e281f11fddf61f9c7d84c3cd ("ACPI / Battery: Update information on info notification and resume"), which causes a hang on resume on at least some machines. This bug was bisected on an ASUS EeePC 901, which hangs at resume time if we do that "acpi_battery_refresh(battery)" in the battery resume function. Rafael suspects we'll still need to refresh the sysfs files upon resume, but that that can be done from a PM notifier (that will run after thawing user space). Bisected-and-tested-by: Linus Torvalds Cc: Matthew Garrett Cc: Len Brown Acked-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds commit 76dcc26f1d7f1c98c3f595379dcd9562f01bf38d Author: Jeff Layton Date: Tue Jan 11 07:24:24 2011 -0500 cifs: mangle existing header for SMB_COM_NT_CANCEL The NT_CANCEL command looks just like the original command, except for a few small differences. The send_nt_cancel function however currently takes a tcon, which we don't have in SendReceive and SendReceive2. Instead of "respinning" the entire header for an NT_CANCEL, just mangle the existing header by replacing just the fields we need. This means we don't need a tcon and allows us to call it from other places. Reviewed-by: Pavel Shilovsky Reviewed-by: Suresh Jayaraman Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 7749981ec31aa40e28a1ef5687e46bc1aa278fae Author: Jeff Layton Date: Tue Jan 11 07:24:23 2011 -0500 cifs: remove code for setting timeouts on requests Since we don't time out individual requests anymore, remove the code that we used to use for setting timeouts on different requests. Reviewed-by: Pavel Shilovsky Reviewed-by: Suresh Jayaraman Signed-off-by: Jeff Layton Signed-off-by: Steve French commit fda3594362184383e73f0a2a5fa5b38ac0e04fd8 Author: Steve French Date: Thu Jan 20 18:06:34 2011 +0000 [CIFS] cifs: reconnect unresponsive servers If the server isn't responding to echoes, we don't want to leave tasks hung waiting for it to reply. At that point, we'll want to reconnect so that soft mounts can return an error to userspace quickly. If the client hasn't received a reply after a specified number of echo intervals, assume that the transport is down and attempt to reconnect the socket. The number of echo_intervals to wait before attempting to reconnect is tunable via a module parameter. Setting it to 0, means that the client will never attempt to reconnect. The default is 5. Signed-off-by: Jeff Layton commit c74093b694998d30105d9904686da5e3576497c4 Author: Jeff Layton Date: Tue Jan 11 07:24:23 2011 -0500 cifs: set up recurring workqueue job to do SMB echo requests Reviewed-by: Suresh Jayaraman Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 766fdbb57fdb1e53bc34c431103e95383d7f13ba Author: Jeff Layton Date: Tue Jan 11 07:24:21 2011 -0500 cifs: add ability to send an echo request Reviewed-by: Suresh Jayaraman Signed-off-by: Jeff Layton Signed-off-by: Steve French commit a6827c184ea9f5452e4aaa7c799dd3c7cc9ba05e Author: Jeff Layton Date: Tue Jan 11 07:24:21 2011 -0500 cifs: add cifs_call_async Add a function that will send a request, and set up the mid for an async reply. Reviewed-by: Suresh Jayaraman Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 2b84a36c5529da136d28b268e75268892d09869c Author: Jeff Layton Date: Tue Jan 11 07:24:21 2011 -0500 cifs: allow for different handling of received response In order to incorporate async requests, we need to allow for a more general way to do things on receive, rather than just waking up a process. Turn the task pointer in the mid_q_entry into a callback function and a generic data pointer. When a response comes in, or the socket is reconnected, cifsd can call the callback function in order to wake up the process. The default is to just wake up the current process which should mean no change in behavior for existing code. Also, clean up the locking in cifs_reconnect. There doesn't seem to be any need to hold both the srv_mutex and GlobalMid_Lock when walking the list of mids. Reviewed-by: Suresh Jayaraman Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 74dd92a881b62014ca3c754db6868e1f142f2fb9 Author: Jeff Layton Date: Tue Jan 11 07:24:02 2011 -0500 cifs: clean up sync_mid_result Make it use a switch statement based on the value of the midStatus. If the resp_buf is set, then MID_RESPONSE_RECEIVED is too. Signed-off-by: Jeff Layton Signed-off-by: Steve French commit dad255b182363db1d1124458cd3fb0a4deac0d0f Author: Jeff Layton Date: Tue Jan 11 07:24:02 2011 -0500 cifs: don't reconnect server when we don't get a response We only want to force a reconnect to the server under very limited and specific circumstances. Now that we have processes waiting indefinitely for responses, we shouldn't reach this point unless a reconnect is already in process. Thus, there's no reason to re-mark the server for reconnect here. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 0ade640e9cda805692dbf688f4bb69e94719275a Author: Jeff Layton Date: Tue Jan 11 07:24:02 2011 -0500 cifs: wait indefinitely for responses The client should not be timing out on individual SMB requests. Too much of the state between client and server is tied to the state of the socket. If we time out requests and issue spurious disconnects then that comprimises data integrity. Instead of doing this complicated dance where we try to decide how long to wait for a response for particular requests, have the client instead wait indefinitely for a response. Also, use a TASK_KILLABLE sleep here so that fatal signals will break out of this waiting. Later patches will add support for detecting dead peers and forcing reconnects based on that. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit bd924e8cbd4b73ffb7d707a774c04f7e2cae88ed Author: Tejun Heo Date: Thu Jan 20 12:07:13 2011 +0100 smp: Allow on_each_cpu() to be called while early_boot_irqs_disabled status to init/main.c percpu may end up calling vfree() during early boot which in turn may call on_each_cpu() for TLB flushes. The function of on_each_cpu() can be done safely while IRQ is disabled during early boot but it assumed that the function is always called with local IRQ enabled which ended up enabling local IRQ prematurely during boot and triggering a couple of warnings. This patch updates on_each_cpu() and smp_call_function_many() such on_each_cpu() can be used safely while early_boot_irqs_disabled is set. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra Acked-by: Pekka Enberg Cc: Linus Torvalds LKML-Reference: <20110120110713.GC6036@htj.dyndns.org> Signed-off-by: Ingo Molnar Reported-by: Ingo Molnar commit 2ce802f62ba32a7d95748ac92bf351f76affb6ff Author: Tejun Heo Date: Thu Jan 20 12:06:35 2011 +0100 lockdep: Move early boot local IRQ enable/disable status to init/main.c During early boot, local IRQ is disabled until IRQ subsystem is properly initialized. During this time, no one should enable local IRQ and some operations which usually are not allowed with IRQ disabled, e.g. operations which might sleep or require communications with other processors, are allowed. lockdep tracked this with early_boot_irqs_off/on() callbacks. As other subsystems need this information too, move it to init/main.c and make it generally available. While at it, toggle the boolean to early_boot_irqs_disabled instead of enabled so that it can be initialized with %false and %true indicates the exceptional condition. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra Acked-by: Pekka Enberg Cc: Linus Torvalds LKML-Reference: <20110120110635.GB6036@htj.dyndns.org> Signed-off-by: Ingo Molnar commit 8b3bb3ecf1934ac4a7005ad9017de1127e2fbd2f Author: Milton Miller Date: Fri Jan 7 02:55:06 2011 -0600 virtio: remove virtio-pci root device We sometimes need to map between the virtio device and the given pci device. One such use is OS installer that gets the boot pci device from BIOS and needs to find the relevant block device. Since it can't, installation fails. Instead of creating a top-level devices/virtio-pci directory, create each device under the corresponding pci device node. Symlinks to all virtio-pci devices can be found under the pci driver link in bus/pci/drivers/virtio-pci/devices, and all virtio devices under drivers/bus/virtio/devices. Signed-off-by: Milton Miller Signed-off-by: Rusty Russell Acked-by: Michael S. Tsirkin Tested-by: Michael S. Tsirkin Acked-by: Gleb Natapov Tested-by: "Daniel P. Berrange" Cc: stable@kernel.org commit 2b8216e6354e7666a2718d4b891c8e8d7fcded27 Author: Randy Dunlap Date: Sat Jan 1 11:08:46 2011 -0800 LGUEST_GUEST: fix unmet direct dependencies (VIRTUALIZATION && VIRTIO) Honor the kconfig menu hierarchy to remove kconfig dependency warnings: VIRTIO and VIRTIO_RING are subordinate to VIRTUALIZATION. warning: (LGUEST_GUEST) selects VIRTIO which has unmet direct dependencies (VIRTUALIZATION) warning: (LGUEST_GUEST && VIRTIO_PCI && VIRTIO_BALLOON) selects VIRTIO_RING which has unmet direct dependencies (VIRTUALIZATION && VIRTIO) Reported-by: Toralf F_rster Signed-off-by: Randy Dunlap Signed-off-by: Rusty Russell commit ced05dd741779986861fe7369fe002f542d6fa34 Author: Rusty Russell Date: Thu Jan 20 21:37:29 2011 -0600 lguest: compile fixes arch/x86/lguest/boot.c: In function ‘lguest_init_IRQ’: arch/x86/lguest/boot.c:824: error: macro "__this_cpu_write" requires 2 arguments, but only 1 given arch/x86/lguest/boot.c:824: error: ‘__this_cpu_write’ undeclared (first use in this function) arch/x86/lguest/boot.c:824: error: (Each undeclared identifier is reported only once arch/x86/lguest/boot.c:824: error: for each function it appears in.) drivers/lguest/x86/core.c: In function ‘copy_in_guest_info’: drivers/lguest/x86/core.c:94: error: lvalue required as left operand of assignment Signed-off-by: Rusty Russell commit c9f2954964df1490373065558f3156379c7a2454 Author: Christoph Lameter Date: Tue Nov 30 13:07:21 2010 -0600 lguest: Use this_cpu_ops Use this_cpu_ops in a couple of places in lguest. Signed-off-by: Christoph Lameter Signed-off-by: Rusty Russell commit 85c0647275b60380e19542d43420184e86418d86 Author: Philip Sanderson Date: Thu Jan 20 21:37:29 2011 -0600 lguest: document --rng in example Launcher Rusty Russell wrote: > Ah, it will appear as /dev/hwrng. It's a weirdness of Linux that our actual > hardware number generators are not wired up to /dev/random... Reflected this in the documentation, thanks :-) Signed-off-by: Rusty Russell commit 5230ff0cccb0611830bb02b097535868df02752a Author: Philip Sanderson Date: Thu Jan 20 21:37:28 2011 -0600 lguest: example launcher to use guard pages, drop PROT_EXEC, fix limit logic PROT_EXEC seems to be completely unnecessary (as the lguest binary never executes there), and will allow it to work with SELinux (and more importantly, PaX :-) as they can/do forbid writable and executable mappings. Also, map PROT_NONE guard pages at start and end of guest memory for extra paranoia. I changed the length check to addr + size > guest_limit because >= is wrong (addr of 0, size of getpagesize() with a guest_limit of getpagesize() would false positive). Signed-off-by: Rusty Russell commit 8aeb36e8f6d7eaa9cafc970b700414205743b258 Author: Philip Sanderson Date: Thu Jan 20 21:37:28 2011 -0600 lguest: --username and --chroot options I've attached a patch which implements dropping to privileges and chrooting to a directory. Signed-off-by: Rusty Russell commit 12fcdba1b7ae8b25696433f420b775aeb556d89b Merge: 1268afe 9032160 Author: Linus Torvalds Date: Wed Jan 19 20:27:25 2011 -0800 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Unify "numa=" command line option handling Revert "x86: Make relocatable kernel work with new binutils" commit 1268afe676ee9431a229fc68a2efb0dad4d5852f Merge: c56eb8f 4580ccc Author: Linus Torvalds Date: Wed Jan 19 20:25:45 2011 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits) sctp: user perfect name for Delayed SACK Timer option net: fix can_checksum_protocol() arguments swap Revert "netlink: test for all flags of the NLM_F_DUMP composite" gianfar: Fix misleading indentation in startup_gfar() net/irda/sh_irda: return to RX mode when TX error net offloading: Do not mask out NETIF_F_HW_VLAN_TX for vlan. USB CDC NCM: tx_fixup() race condition fix ns83820: Avoid bad pointer deref in ns83820_init_one(). ipv6: Silence privacy extensions initialization bnx2x: Update bnx2x version to 1.62.00-4 bnx2x: Fix AER setting for BCM57712 bnx2x: Fix BCM84823 LED behavior bnx2x: Mark full duplex on some external PHYs bnx2x: Fix BCM8073/BCM8727 microcode loading bnx2x: LED fix for BCM8727 over BCM57712 bnx2x: Common init will be executed only once after POR bnx2x: Swap BCM8073 PHY polarity if required iwlwifi: fix valid chain reading from EEPROM ath5k: fix locking in tx_complete_poll_work ath9k_hw: do PA offset calibration only on longcal interval ... commit 4580ccc04ddd8c17a470573a7fdb8def2e036dfa Author: Shan Wei Date: Tue Jan 18 22:39:00 2011 +0000 sctp: user perfect name for Delayed SACK Timer option The option name of Delayed SACK Timer should be SCTP_DELAYED_SACK, not SCTP_DELAYED_ACK. Left SCTP_DELAYED_ACK be concomitant with SCTP_DELAYED_SACK, for making compatibility with existing applications. Reference: 8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK) (http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-25) Signed-off-by: Shan Wei Acked-by: Wei Yongjun Acked-by: Vlad Yasevich Signed-off-by: David S. Miller commit d402786ea4f8433774a812d6b8635e737425cddd Author: Eric Dumazet Date: Wed Jan 19 00:51:36 2011 +0000 net: fix can_checksum_protocol() arguments swap commit 0363466866d901fbc (net offloading: Convert checksums to use centrally computed features.) mistakenly swapped can_checksum_protocol() arguments. This broke IPv6 on bnx2 for instance, on NIC without TCPv6 checksum offloads. Reported-by: Hans de Bruin Signed-off-by: Eric Dumazet Acked-by: Jesse Gross Signed-off-by: David S. Miller commit b8f3ab4290f1e720166e888ea2a1d1d44c4d15dd Author: David S. Miller Date: Tue Jan 18 12:40:38 2011 -0800 Revert "netlink: test for all flags of the NLM_F_DUMP composite" This reverts commit 0ab03c2b1478f2438d2c80204f7fef65b1bca9cf. It breaks several things including the avahi daemon. Signed-off-by: David S. Miller commit 2fbc2f1729e785a7b2faf9d8d60926bb1ff62af0 Author: Shirish Pargaonkar Date: Mon Dec 6 14:56:46 2010 -0600 cifs: Use mask of ACEs for SID Everyone to calculate all three permissions user, group, and other If a DACL has entries for ACEs for SID Everyone and Authenticated Users, factor in mask in respective entries during calculation of permissions for all three, user, group, and other. http://technet.microsoft.com/en-us/library/bb463216.aspx Signed-off-by: Shirish Pargaonkar Reviewed-by: Jeff Layton Signed-off-by: Steve French commit 540b2e377797d8715469d408b887baa9310c5f3e Author: Shirish Pargaonkar Date: Tue Jan 18 22:33:54 2011 -0600 cifs: Fix regression during share-level security mounts (Repost) NTLM response length was changed to 16 bytes instead of 24 bytes that are sent in Tree Connection Request during share-level security share mounts. Revert it back to 24 bytes. Reported-and-Tested-by: Grzegorz Ozanski Acked-by: Jeff Layton Signed-off-by: Shirish Pargaonkar Acked-by: Suresh Jayaraman Cc: stable@kernel.org Signed-off-by: Steve French commit 1cd3508d5eab6a88fa643119cedd34b04215cffe Author: Steve French Date: Wed Jan 19 17:53:44 2011 +0000 [CIFS] Update cifs version number Signed-off-by: Steve French commit 053d50344568e5a4054266b44040297531125281 Author: Jeff Layton Date: Tue Jan 11 07:24:02 2011 -0500 cifs: move mid result processing into common function Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit ddc8cf8fc718587a3788330bf4f32b379f08b250 Author: Jeff Layton Date: Tue Jan 11 07:24:02 2011 -0500 cifs: move locked sections out of DeleteMidQEntry and AllocMidQEntry In later patches, we're going to need to have finer-grained control over the addition and removal of these structs from the pending_mid_q and we'll need to be able to call the destructor while holding the spinlock. Move the locked sections out of both routines and into the callers. Fix up current callers of DeleteMidQEntry to call a new routine that dequeues the entry and then destroys it. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 8097531a5cb55c6472118da094dc88caf9be66ac Author: Jeff Layton Date: Tue Jan 11 07:24:02 2011 -0500 cifs: clean up accesses to midCount It's an atomic_t and the code accesses the "counter" field in it directly instead of using atomic_read(). It also is sometimes accessed under a spinlock and sometimes not. Move it out of the spinlock since we don't need belt-and-suspenders for something that's just informational. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit c5797a945cac4c470f0113fc839c521aab0d799d Author: Jeff Layton Date: Tue Jan 11 07:24:01 2011 -0500 cifs: make wait_for_free_request take a TCP_Server_Info pointer The cifsSesInfo pointer is only used to get at the server. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 9d78315b03fc91228306db42edc533efa69cb518 Author: Jeff Layton Date: Tue Jan 11 07:24:01 2011 -0500 cifs: no need to mark smb_ses_list as cifs_demultiplex_thread is exiting The TCP_Server_Info is refcounted and every SMB session holds a reference to it. Thus, smb_ses_list is always going to be empty when cifsd is coming down. This is dead code. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 941b853d779de3298e39f1eb4e252984464eaea8 Author: Jeff Layton Date: Tue Jan 11 07:24:01 2011 -0500 cifs: don't fail writepages on -EAGAIN errors If CIFSSMBWrite2 returns -EAGAIN, then the error should be considered temporary. CIFS should retry the write instead of setting an error on the mapping and returning. For WB_SYNC_ALL, just retry the write immediately. In the WB_SYNC_NONE case, call redirty_page_for_writeback on all of the pages that didn't get written out and then move on. Also, fix up the handling of a short write with a successful return code. MS-CIFS says that 0 bytes_written means ENOSPC or EFBIG. It doesn't mention what a short, but non-zero write means, so for now treat it as we would an -EAGAIN return. Reviewed-by: Suresh Jayaraman Reviewed-by: Pavel Shilovsky Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 12fed00de963433128b5366a21a55808fab2f756 Author: Pavel Shilovsky Date: Mon Jan 17 20:15:44 2011 +0300 CIFS: Fix oplock break handling (try #2) When we get oplock break notification we should set the appropriate value of OplockLevel field in oplock break acknowledge according to the oplock level held by the client in this time. As we only can have level II oplock or no oplock in the case of oplock break, we should be aware only about clientCanCacheRead field in cifsInodeInfo structure. Also fix bug connected with wrong interpretation of OplockLevel field during oplock break notification processing. Signed-off-by: Pavel Shilovsky Cc: Signed-off-by: Steve French commit 068c5cc5ac7414a8e9eb7856b4bf3cc4d4744267 Author: Peter Zijlstra Date: Wed Jan 19 12:26:11 2011 +0100 sched, cgroup: Use exit hook to avoid use-after-free crash By not notifying the controller of the on-exit move back to init_css_set, we fail to move the task out of the previous cgroup's cfs_rq. This leads to an opportunity for a cgroup-destroy to come in and free the cgroup (there are no active tasks left in it after all) to which the not-quite dead task is still enqueued. Reported-by: Miklos Vajna Fixed-by: Mike Galbraith Signed-off-by: Peter Zijlstra Cc: Cc: Mike Galbraith Signed-off-by: Ingo Molnar LKML-Reference: <1293206353.29444.205.camel@laptop> commit 9032160275ba018003ff390835ff8ed2b5b788b8 Author: Jan Beulich Date: Wed Jan 19 08:57:21 2011 +0000 x86: Unify "numa=" command line option handling In order to be able to suppress the use of SRAT tables that 32-bit Linux can't deal with (in one case known to lead to a non-bootable system, unless disabling ACPI altogether), move the "numa=" option handling to common code. Signed-off-by: Jan Beulich Reviewed-by: Thomas Renninger Cc: Tejun Heo Cc: Thomas Renninger LKML-Reference: <4D36B581020000780002D0FF@vpn.id2.novell.com> Signed-off-by: Ingo Molnar commit 6b35eb9ddcddde7b510726de03fae071178f1ec4 Author: Ingo Molnar Date: Wed Jan 19 10:09:42 2011 +0100 Revert "x86: Make relocatable kernel work with new binutils" This reverts commit 86b1e8dd83cb ("x86: Make relocatable kernel work with new binutils"). Markus Trippelsdorf reported a boot failure caused by this patch. The real solution to the original patch will likely involve an arch-generic solution to define an overlaid jiffies_64 and jiffies variables. Until that's done and tested on all architectures revert this commit to solve the regression. Reported-and-bisected-by: Markus Trippelsdorf Acked-by: "H. Peter Anvin" Cc: Shaohua Li Cc: "Lu, Hongjiu" Cc: Linus Torvalds , Cc: Sam Ravnborg LKML-Reference: <4D36A759.60704@intel.com> Signed-off-by: Ingo Molnar commit 8d5f0a647395c1323787df675d2805cad54fc89f Author: Bob Moore Date: Mon Jan 17 10:31:08 2011 +0800 ACPICA: Update version to 20110112 Version 20110112. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown commit b4e104eaeb8cd4329a23e0e4ebf166681b1d182d Author: Bob Moore Date: Mon Jan 17 11:05:40 2011 +0800 ACPICA: Update all ACPICA copyrights and signons to 2011 Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown commit 262948428878fb340127faca1791acb17146122e Author: Lin Ming Date: Wed Jan 12 09:19:43 2011 +0800 ACPICA: Fix issues/fault with automatic "serialized" method support History: This support changes a method to "serialized" on the fly if the method generates an AE_ALREADY_EXISTS error, indicating the possibility that it cannot handle reentrancy. This fix repairs a couple of issues seen in the field, especially on machines with many cores. 1) Delete method children only upon the exit of the last thread, so as to not delete objects out from under running threads. 2) Set the "serialized" bit for the method only upon the exit of the last thread, so as to not cause deadlock when running threads attempt to exit. 3) Cleanup the use of the AML "MethodFlags" and internal method flags so that there is no longer any confustion between the two. Reported-by: Dana Myers Signed-off-by: Lin Ming Signed-off-by: Bob Moore Signed-off-by: Len Brown commit 672af843abfc9a41c7ec792722e04b6c68a3cfea Author: Bob Moore Date: Wed Jan 12 09:13:31 2011 +0800 ACPICA: Debugger: Lock namespace for duration of a namespace dump Prevents issues if the namespace is changing underneath the debugger. Especially temporary nodes, since the debugger displays these also. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Reviewed-by: Rafael Wysocki Signed-off-by: Len Brown commit 5d3131f5b0ae6303d042fd91ed9147ad4ae4bf6d Author: Dana Myers Date: Wed Jan 12 09:09:31 2011 +0800 ACPICA: Fix namespace race condition Fixes a race condition between method execution and namespace walks that can possibly fault. Problem was apparently introduced in version 20100528 as a result of a performance optimization that reduces the number of namespace walks upon method exit by using the delete_namespace_subtree function instead of the delete_namespace_by_owner function used previously. Bug is in the delete_namespace_subtree function. Signed-off-by: Dana Myers Signed-off-by: Bob Moore Signed-off-by: Lin Ming Reviewed-by: Rafael Wysocki Signed-off-by: Len Brown commit be33b76a974cdb4ceadc1a12fb79cc97bcfeea37 Author: Jesper Juhl Date: Sun Jan 16 20:37:52 2011 +0100 ACPICA: Fix memory leak in acpi_ev_asynch_execute_gpe_method(). We will leak the memory allocated to 'local_gpe_event_info' if 'acpi_ut_acquire_mutex()' fails or if 'acpi_ev_valid_gpe_event()' fails in drivers/acpi/acpica/evgpe.c::acpi_ev_asynch_execute_gpe_method(). Signed-off-by: Jesper Juhl Reviewed-by: Rafael Wysocki Signed-off-by: Len Brown commit ff76015f3bdfbc482c723cb4f2559cef84d178ca Author: Anton Vorontsov Date: Tue Jan 18 02:36:02 2011 +0000 gianfar: Fix misleading indentation in startup_gfar() Just stumbled upon the issue while looking for another bug. The code looks correct, the indentation is not. Signed-off-by: Anton Vorontsov Signed-off-by: David S. Miller commit 5ae2f66fe4626340d4fd9d26b522ce377c780a56 Author: Kuninori Morimoto Date: Thu Jan 13 21:47:42 2011 +0000 net/irda/sh_irda: return to RX mode when TX error sh_irda can not use RX/TX in same time, but this driver didn't return to RX mode when TX error occurred. This patch care xmit error case to solve this issue. Signed-off-by: Kuninori Morimoto Signed-off-by: David S. Miller commit 6ee400aafb60289b78fcde5ebccd8c4973fc53f4 Author: Jesse Gross Date: Mon Jan 17 20:46:00 2011 +0000 net offloading: Do not mask out NETIF_F_HW_VLAN_TX for vlan. In netif_skb_features() we return only the features that are valid for vlans if we have a vlan packet. However, we should not mask out NETIF_F_HW_VLAN_TX since it enables transmission of vlan tags and is obviously valid. Reported-by: Eric Dumazet Signed-off-by: Jesse Gross Acked-by: Eric Dumazet Signed-off-by: David S. Miller commit f742aa8acb7e50a383f6d2b00b1c52e081970d38 Author: Alexey Orishko Date: Mon Jan 17 07:07:25 2011 +0000 USB CDC NCM: tx_fixup() race condition fix - tx_fixup() can be called from either timer callback or from xmit() in usbnet, so spinlock is added to avoid concurrency-related problem. - minor correction due to checkpatch warning for some line over 80 chars after previous patch was applied. Signed-off-by: Alexey Orishko Signed-off-by: David S. Miller commit 1956cc52e73984a39252994f0beee458fc0d8909 Author: Jesper Juhl Date: Mon Jan 17 10:24:57 2011 +0000 ns83820: Avoid bad pointer deref in ns83820_init_one(). In drivers/net/ns83820.c::ns83820_init_one() we dynamically allocate memory via alloc_etherdev(). We then call PRIV() on the returned storage which is 'return netdev_priv()'. netdev_priv() takes the pointer it is passed and adds 'ALIGN(sizeof(struct net_device), NETDEV_ALIGN)' to it and returns it. Then we test the resulting pointer for NULL, which it is unlikely to be at this point, and later dereference it. This will go bad if alloc_etherdev() actually returned NULL. This patch reworks the code slightly so that we test for a NULL pointer (and return -ENOMEM) directly after calling alloc_etherdev(). Signed-off-by: Jesper Juhl Signed-off-by: Benjamin LaHaise Signed-off-by: David S. Miller commit 2fdc1c8093255f9da877d7b9ce3f46c2098377dc Author: Romain Francoise Date: Mon Jan 17 07:59:18 2011 +0000 ipv6: Silence privacy extensions initialization When a network namespace is created (via CLONE_NEWNET), the loopback interface is automatically added to the new namespace, triggering a printk in ipv6_add_dev() if CONFIG_IPV6_PRIVACY is set. This is problematic for applications which use CLONE_NEWNET as part of a sandbox, like Chromium's suid sandbox or recent versions of vsftpd. On a busy machine, it can lead to thousands of useless "lo: Disabled Privacy Extensions" messages appearing in dmesg. It's easy enough to check the status of privacy extensions via the use_tempaddr sysctl, so just removing the printk seems like the most sensible solution. Signed-off-by: Romain Francoise Signed-off-by: David S. Miller commit 6aefc522a8680f7b5a794f14dc78d6eab1cfdc37 Author: Yaniv Rosner Date: Tue Jan 18 04:33:55 2011 +0000 bnx2x: Update bnx2x version to 1.62.00-4 Update bnx2x version to 1.62.00-4 Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 82a0d4757c03687894123b197ec9c40f7dd16800 Author: Yaniv Rosner Date: Tue Jan 18 04:33:52 2011 +0000 bnx2x: Fix AER setting for BCM57712 Fix AER settings for BCM57712 to allow accessing all device addresses range in CL45 MDC/MDIO Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit f25b3c8b5f696cf74adfb37c9d9982c72f4106c9 Author: Yaniv Rosner Date: Tue Jan 18 04:33:47 2011 +0000 bnx2x: Fix BCM84823 LED behavior Fix BCM84823 LED behavior which may show on some systems Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 791f18c0da3ad540806122e173d6b730d7d7f60b Author: Yaniv Rosner Date: Tue Jan 18 04:33:42 2011 +0000 bnx2x: Mark full duplex on some external PHYs Device may show incorrect duplex mode for devices with external PHY Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 5c99274b0177cd614455c277b1a4d4410d9cb702 Author: Yaniv Rosner Date: Tue Jan 18 04:33:36 2011 +0000 bnx2x: Fix BCM8073/BCM8727 microcode loading Improve microcode loading verification before proceeding to next stage Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 1f48353a3ce7297f5150b47e21df5ec212876e5d Author: Yaniv Rosner Date: Tue Jan 18 04:33:31 2011 +0000 bnx2x: LED fix for BCM8727 over BCM57712 LED on BCM57712+BCM8727 systems requires different settings Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit b21a3424877a4d5ca91a6d446ed581a2bd03160c Author: Yaniv Rosner Date: Tue Jan 18 04:33:24 2011 +0000 bnx2x: Common init will be executed only once after POR Common init used to be called by the driver when the first port comes up, mainly to reset and reload external PHY microcode. However, in case management driver is active on the other port, traffic would halted. So limit the common init to be done only once after POR. Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 74d7a11979e39adc1fc4d7a77afe83aa12a0f2b1 Author: Yaniv Rosner Date: Tue Jan 18 04:33:18 2011 +0000 bnx2x: Swap BCM8073 PHY polarity if required Enable controlling BCM8073 PN polarity swap through nvm configuration, which is required in certain systems Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 154a96bfcd53b8e5020718c64769e542c44788b9 Author: Tetsuo Handa Date: Mon Jan 17 09:27:27 2011 +0900 trusted-keys: avoid scattring va_end() We can avoid scattering va_end() within the va_start(); for (;;) { } va_end(); loop, assuming that crypto_shash_init()/crypto_shash_update() return 0 on success and negative value otherwise. Make TSS_authhmac()/TSS_checkhmac1()/TSS_checkhmac2() similar to TSS_rawhmac() by removing "va_end()/goto" from the loop. Signed-off-by: Tetsuo Handa Reviewed-by: Jesper Juhl Acked-by: Mimi Zohar Acked-by: David Howells Signed-off-by: James Morris commit 0e7491f685cbc962f2ef977f7b5f8ed0b3100e88 Author: Tetsuo Handa Date: Mon Jan 17 09:25:34 2011 +0900 trusted-keys: check for NULL before using it TSS_rawhmac() checks for data != NULL before using it. We should do the same thing for TSS_authhmac(). Signed-off-by: Tetsuo Handa Reviewed-by: Jesper Juhl Acked-by: Mimi Zohar Acked-by: David Howells Signed-off-by: James Morris commit 35576eab390df313095306e2a8216134910e7014 Author: Tetsuo Handa Date: Mon Jan 17 09:22:47 2011 +0900 trusted-keys: another free memory bugfix TSS_rawhmac() forgot to call va_end()/kfree() when data == NULL and forgot to call va_end() when crypto_shash_update() < 0. Fix these bugs by escaping from the loop using "break" (rather than "return"/"goto") in order to make sure that va_end()/kfree() are always called. Signed-off-by: Tetsuo Handa Reviewed-by: Jesper Juhl Acked-by: Mimi Zohar Acked-by: David Howells Signed-off-by: James Morris commit f966a13f92913ce8cbd35bc7f066553c9f3d41b0 Merge: 7e96fbf 38d5939 Author: David S. Miller Date: Tue Jan 18 12:50:19 2011 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 commit 38d59392b29437af3a702209b6a5196ef01f79a8 Author: Wey-Yi Guy Date: Tue Jan 18 07:59:13 2011 -0800 iwlwifi: fix valid chain reading from EEPROM When read valid tx/rx chains from EEPROM, there is a bug to use the tx chain value for both tx and rx, the result of this cause low receive throughput on 1x2 devices becuase rx will only utilize single chain instead of two chains Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville commit 599b13adc2bf236da8f86a34b0b51168e19d3524 Author: Bob Copeland Date: Tue Jan 18 08:06:43 2011 -0500 ath5k: fix locking in tx_complete_poll_work ath5k_reset must be called with sc->lock. Since the tx queue watchdog runs in a workqueue and accesses sc, it's appropriate to just take the lock over the whole function. Signed-off-by: Bob Copeland Signed-off-by: John W. Linville commit 24d9765fc18c7838ccdbb0d71fb706321d9b824c Author: Steven Whitehouse Date: Tue Jan 18 14:49:08 2011 +0000 GFS2: Fix error path in gfs2_lookup_by_inum() In the (impossible, except if there is fs corruption) error path in gfs2_lookup_by_inum() if the call to gfs2_inode_refresh() fails, it was leaving the function by calling iput() rather than iget_failed(). This would cause future lookups of the same inode to block forever. This patch fixes the problem by moving the call to gfs2_inode_refresh() into gfs2_inode_lookup() where iget_failed() is part of the error path already. Also this cleans up some unreachable code and makes gfs2_set_iop() static. Signed-off-by: Steven Whitehouse commit 23c3010808de86f21436eb822aacfa551bfc17e4 Author: Benjamin Marzinski Date: Fri Jan 14 22:39:16 2011 -0600 GFS2: remove iopen glocks from cache on failed deletes When a file gets deleted on GFS2, if a node can't get an exclusive lock on the file's iopen glock, it punts on actually freeing up the space, because another node is using the file. When it does this, it needs to drop the iopen glock from its cache so that the other node can get an exclusive lock on it. Now, gfs2_delete_inode() sets GL_NOCACHE before dropping the shared lock on the iopen glock in preparation for grabbing it in the exclusive state. Since the node needs the glock in the exclusive state, dropping the shared lock from the cache doesn't slow down the case where no other nodes are using the file. Signed-off-by: Benjamin Marzinski Signed-off-by: Steven Whitehouse commit d7d8294415f0ce4254827d4a2a5ee88b00be52a8 Author: Mike Galbraith Date: Wed Jan 5 05:41:17 2011 +0100 sched: Fix signed unsigned comparison in check_preempt_tick() Signed unsigned comparison may lead to superfluous resched if leftmost is right of the current task, wasting a few cycles, and inadvertently _lengthening_ the current task's slice. Reported-by: Venkatesh Pallipadi Signed-off-by: Mike Galbraith Signed-off-by: Peter Zijlstra LKML-Reference: <1294202477.9384.5.camel@marge.simson.net> Signed-off-by: Ingo Molnar commit fce2097983d914ea8c2338efc6f6e9bb737f6ae4 Author: Yong Zhang Date: Fri Jan 14 15:57:39 2011 +0800 sched: Replace rq->bkl_count with rq->rq_sched_info.bkl_count Now rq->rq_sched_info.bkl_count is not used for rq, scroll rq->bkl_count into it. Thus we can save some space for rq. Signed-off-by: Yong Zhang Signed-off-by: Peter Zijlstra LKML-Reference: <1294991859-13246-1-git-send-email-yong.zhang0@gmail.com> Signed-off-by: Ingo Molnar commit f44937718ce3b8360f72f6c68c9481712517a867 Author: Mike Galbraith Date: Thu Jan 13 04:54:50 2011 +0100 sched, autogroup: Fix CONFIG_RT_GROUP_SCHED sched_setscheduler() failure If CONFIG_RT_GROUP_SCHED is set, __sched_setscheduler() fails due to autogroup not allocating rt_runtime. Free unused/unusable rt_se and rt_rq, redirect RT tasks to the root task group, and tell __sched_setscheduler() that it's ok. Reported-and-tested-by: Bharata B Rao Signed-off-by: Mike Galbraith Signed-off-by: Peter Zijlstra LKML-Reference: <1294890890.8089.39.camel@marge.simson.net> Signed-off-by: Ingo Molnar commit 8ecedd7a06d27a31dbb36fab88e2ba6e6edd43ca Author: Bharata B Rao Date: Tue Jan 11 15:42:57 2011 +0530 sched: Display autogroup names in /proc/sched_debug Add autogroup name to cfs_rq and tasks information to /proc/sched_debug. Signed-off-by: Bharata B Rao Signed-off-by: Peter Zijlstra LKML-Reference: <20110111101257.GF4772@in.ibm.com> Signed-off-by: Ingo Molnar commit efe25c2c7b3a5d17b0c70987a758d8fe7af8e3d1 Author: Bharata B Rao Date: Tue Jan 11 15:41:54 2011 +0530 sched: Reinstate group names in /proc/sched_debug Displaying of group names in /proc/sched_debug was dropped in autogroup patches. Add group names while displaying cfs_rq and tasks information. Signed-off-by: Bharata B Rao Signed-off-by: Peter Zijlstra LKML-Reference: <20110111101153.GE4772@in.ibm.com> Signed-off-by: Ingo Molnar commit 977dda7c9b540f48b228174346d8b31542c1e99f Author: Paul Turner Date: Fri Jan 14 17:57:50 2011 -0800 sched: Update effective_load() to use global share weights Previously effective_load would approximate the global load weight present on a group taking advantage of: entity_weight = tg->shares ( lw / global_lw ), where entity_weight was provided by tg_shares_up. This worked (approximately) for an 'empty' (at tg level) cpu since we would place boost load representative of what a newly woken task would receive. However, now that load is instantaneously updated this assumption is no longer true and the load calculation is rather incorrect in this case. Fix this (and improve the general case) by re-writing effective_load to take advantage of the new shares distribution code. Signed-off-by: Paul Turner Signed-off-by: Peter Zijlstra LKML-Reference: <20110115015817.069769529@google.com> Signed-off-by: Ingo Molnar commit 811ea256b30b37091b5bbf41517404cf98ab56c1 Author: Rajkumar Manoharan Date: Mon Jan 17 15:21:40 2011 +0530 ath9k_hw: do PA offset calibration only on longcal interval The power detector adc offset calibration has to be done on 4 minutes interval (longcal * pa_skip_count). But the commit "ath9k_hw: fix a noise floor calibration related race condition" makes the PA calibration executed more frequently beased on nfcal_pending value. Running PAOffset calibration lesser than longcal interval doesn't help anything and the worse part is that it causes NF load timeouts and RX deaf conditions. In a very noisy environment, where the distance b/w AP & station is ~10 meter and running a downlink udp traffic with frequent background scan causes "Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x40d1a" and moves the chip into deaf state. This issue was originaly reported in Android platform where the network-manager application does bgscan more frequently on AR9271 chips. (AR9285 family usb device). Cc: stable@kernel.org Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit dc738cb6c5d5594de4bdf3b7839a250b032152e7 Author: Rajkumar Manoharan Date: Sun Jan 16 10:56:37 2011 +0530 ath9k_htc: Fix endian issue in tx header Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville commit 58c5296991d233f2e492aa7a884635bba478cf12 Author: Luis R. Rodriguez Date: Thu Jan 13 18:19:29 2011 -0800 ath9k_hw: ASPM interoperability fix for AR9380/AR9382 There is an interoperability with AR9382/AR9380 in L1 state with a few root complexes which can cause a hang. This is fixed by setting some work around bits on the PCIE PHY. We fix by using a new ini array to modify these bits when the radio is idle. Cc: stable@kernel.org Cc: Jack Lee Cc: Carl Huang Cc: David Quan Cc: Nael Atallah Cc: Sarvesh Shrivastava Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 7e96fbf2320782fb8f0970928026105cd34b41bd Author: Shreyas Bhatewara Date: Fri Jan 14 15:00:03 2011 +0000 vmxnet3: Dont allocate extra MSI-x vectors In case of single tx and rx queues, three MSI-x vectors are allocated instead of two. This patch fixes that. Signed-off-by: Shreyas N Bhatewara Signed-off-by: David S. Miller commit 83d0feffc5695d7dc24c6b8dac9ab265533beb78 Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:57 2011 +0000 vmxnet3: Add locking for access to command register Access to cmd register is racey, especially in smp environments. Protect it using a spinlock. Signed-off-by: Matthieu Bucchianeri Signed-off-by: Shreyas N Bhatewara Signed-off-by: David S. Miller commit 51956cd68b0c3039968485317b77a89dfec95eab Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:52 2011 +0000 vmxnet3: Disable napi in suspend, reenable in resume. There is a small possibility of a race where the suspend routine gets called, while a napi callback is still pending and when that comes up, it enables interrupts which just got disabled in the suspend routine. This change adds napi disable call in suspend and enable in resume to avoid race. Signed-off-by: Shreyas N Bhatewara Acked-by: Dmitry Torokhov Signed-off-by: David S. Miller commit 76d39dae0ad47f51291b4dd146b10d71e8ae02f7 Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:47 2011 +0000 vmxnet3: Make ethtool handlers multiqueue aware Show per-queue stats in ethtool -S output for vmxnet3 interface. Register dump of ethtool should dump registers for all tx and rx queues. Signed-off-by: Shreyas N Bhatewara Signed-off-by: David S. Miller commit 39d4a96fd7d2926e46151adbd18b810aeeea8ec0 Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:41 2011 +0000 vmxnet3: Provide required number of bytes in first SG buffer This is a performance enhancement fix. vmxnet3 device performs better when provided with at least 54 bytes (ethernet 14 + IP 20+ TCP 20) in the first SG buffer. For UDP packets driver provides lesser than that in first sg. This change fixes the same. Also avoid the redundant pskb_may_pull() call. Signed-off-by: Shreyas N Bhatewara Signed-off-by: David S. Miller commit 54da3d00f6e781f69cb8726757d190704b702a8e Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:36 2011 +0000 vmxnet3: Enable HW Rx VLAN stripping by default Make hw vlan tag stripping as enabled by default. Thereby remove the code to conditionally enable it later. Signed-off-by: Guolin Yang Signed-off-by: Shreyas N Bhatewara Signed-off-by: David S. Miller commit f9f2502626133e33599578a16ed54435733f062c Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:31 2011 +0000 vmxnet3: Preserve the MAC address configured by ifconfig While activating the device get it's MAC address from netdev. This will allow the MAC address configured using ifconfig to persist through the reset. Signed-off-by: Shreyas N Bhatewara Signed-off-by: David S. Miller commit a53255d38e6d08453373ac0b7256d40395b202ba Author: Shreyas Bhatewara Date: Fri Jan 14 14:59:25 2011 +0000 vmxnet3: fix ring size update Fix a bug while changing ring size when MTU is changed. Signed-off-by: Shreyas N Bhatewara Acked-by: Dmitry Torokhov Signed-off-by: David S. Miller commit 01a859014b35deb6cc63b1dc2808ca7a0e10a4de Author: Dan Carpenter Date: Sat Jan 15 03:06:39 2011 +0000 caif: checking the wrong variable In the original code we check if (servl == NULL) twice. The first time should print the message that cfmuxl_remove_uplayer() failed and set "ret" correctly, but instead it just returns success. The second check should be checking the value of "ret" instead of "servl". Signed-off-by: Dan Carpenter Acked-by: Sjur Braendeland Signed-off-by: David S. Miller commit 5e5073280379d38e86ade471daa7443b553fc839 Author: Kurt Van Dijck Date: Sat Jan 15 20:56:42 2011 -0800 can: test size of struct sockaddr in sendmsg This patch makes the CAN socket code conform to the manpage of sendmsg. Signed-off-by: Kurt Van Dijck Acked-by: Oliver Hartkopp Signed-off-by: David S. Miller commit d78c68efa84ff312f3663dbf921b1e3485232205 Merge: 16c0f93 aa0adb1 Author: David S. Miller Date: Sat Jan 15 20:48:28 2011 -0800 Merge branch 'for-david' of git://git.open-mesh.org/ecsv/linux-merge commit 16c0f9362433a76f01d174bb8b9c87b9a96198ee Author: Frank Blaschka Date: Wed Jan 12 20:42:25 2011 +0000 qeth: l3 hw tx csum circumvent hw bug Some OSA level have a bug in the hw tx csum logic. We can circumvent this bug by turning on IP hw csum also. Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller commit 394234406c7a8a6b947d230b115c918c0a1def68 Author: Ursula Braun Date: Wed Jan 12 20:42:24 2011 +0000 qeth: postpone open till recovery is finished The open function of qeth is not executed if the qeth device is in state DOWN or HARDSETUP. A recovery switches from state SOFTSETUP to HARDSETUP to DOWN to HARDSETUP and back to SOFTSETUP. If open and recover are running concurrently, open fails if it hits the states HARDSETUP or DOWN. This patch inserts waiting for recovery finish in the qeth open functions to enable successful qeth device opening in spite of a running recovery. Signed-off-by: Ursula Braun Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller commit aa0adb1a85e159cf57f0e11282bc6c9e3606a5f3 Author: Sven Eckelmann Date: Sat Jan 15 14:39:43 2011 +0000 batman-adv: Use "__attribute__" shortcut macros Linux 2.6.21 defines different macros for __attribute__ which are also used inside batman-adv. The next version of checkpatch.pl warns about the usage of __attribute__((packed))). Linux 2.6.33 defines an extra macro __always_unused which is used to assist source code analyzers and can be used to removed the last existing __attribute__ inside the source code. Signed-off-by: Sven Eckelmann commit 40c1001792de63e0f90e977eb05393fd71f78692 Author: Mimi Zohar Date: Mon Dec 20 12:37:18 2010 -0500 trusted-keys: free memory bugfix Add missing kfree(td) in tpm_seal() before the return, freeing td on error paths as well. Reported-by: Dan Carpenter Signed-off-by: Mimi Zohar Acked-by: David Safford Acked-by: David Howells Signed-off-by: Serge Hallyn Signed-off-by: James Morris commit df6212529c646710502657b18d8f42927f3dda81 Author: Greg Kroah-Hartman Date: Thu Jan 13 14:47:04 2011 -0800 tty: update MAINTAINERS file due to driver movement This fixes up the MAINTAINERS file due to moving the serial drivers to the drivers/tty/ directory. Signed-off-by: Greg Kroah-Hartman commit ed7809d9c41b514115ddffaa860694393c2016b3 Author: Jesper Juhl Date: Thu Jan 13 21:53:38 2011 +0100 batman-adv: Even Batman should not dereference NULL pointers There's a problem in net/batman-adv/unicast.c::frag_send_skb(). dev_alloc_skb() allocates memory and may fail, thus returning NULL. If this happens we'll pass a NULL pointer on to skb_split() which in turn hands it to skb_split_inside_header() from where it gets passed to skb_put() that lets skb_tail_pointer() play with it and that function dereferences it. And thus the bat dies. While I was at it I also moved the call to dev_alloc_skb() above the assignment to 'unicast_packet' since there's no reason to do that assignment if the memory allocation fails. Signed-off-by: Jesper Juhl Signed-off-by: Sven Eckelmann commit 82694f764dad783a123394e2220b92b9be721b43 Author: Luciano Coelho Date: Wed Jan 12 15:18:11 2011 +0200 mac80211: use maximum number of AMPDU frames as default in BA RX When the buffer size is set to zero in the block ack parameter set field, we should use the maximum supported number of subframes. The existing code was bogus and was doing some unnecessary calculations that lead to wrong values. Thanks Johannes for helping me figure this one out. Cc: stable@kernel.org Cc: Johannes Berg Signed-off-by: Luciano Coelho Reviewed-by: Johannes Berg Signed-off-by: John W. Linville commit 681c4d07dd5b2ce2ad9f6dbbf7841e479fbc7754 Author: Johannes Berg Date: Wed Jan 12 13:40:33 2011 +0100 mac80211: fix lockdep warning Since the introduction of the fixes for the reorder timer, mac80211 will cause lockdep warnings because lockdep confuses local->skb_queue and local->rx_skb_queue and treats their lock as the same. However, their locks are different, and are valid in different contexts (the former is used in IRQ context, the latter in BH only) and the only thing to be done is mark the former as a different lock class so that lockdep can tell the difference. Reported-by: Larry Finger Reported-by: Sujith Reported-by: Miles Lane Tested-by: Sujith Tested-by: Johannes Berg Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 8d661f1e462d50bd83de87ee628aaf820ce3c66c Author: Amitkumar Karwar Date: Tue Jan 11 16:14:24 2011 -0800 ieee80211: correct IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK macro It is defined in include/linux/ieee80211.h. As per IEEE spec. bit6 to bit15 in block ack parameter represents buffer size. So the bitmask should be 0xFFC0. Signed-off-by: Amitkumar Karwar Signed-off-by: Bing Zhao Cc: stable@kernel.org Reviewed-by: Johannes Berg Signed-off-by: John W. Linville commit ccbd4d412dde4b7e858159e5cc8ba7ee4a6cac07 Author: Jesper Juhl Date: Tue Jan 11 00:47:44 2011 +0100 rt2x00: Don't leak mem in error path of rt2x00lib_request_firmware() We need to release_firmware() in order not to leak memory. Signed-off-by: Jesper Juhl Acked-by: Ivo van Doorn Acked-by: Pekka Enberg Signed-off-by: John W. Linville commit 35b3ac470b982ded560e1b2ec9206a8d186c3459 Author: Axel Lin Date: Mon Jan 10 10:26:00 2011 +0800 iwmc3200wifi: Return proper error for iwm_if_alloc In the case of alloc_netdev_mq failure and kmalloc failure, current implementation returns ERR_PTR(0). As a result, the caller of iwm_if_alloc does not catch the error by IS_ERR macro. Fix it by setting proper error code for ret variable in the failure cases. Signed-off-by: Axel Lin Signed-off-by: John W. Linville commit ab4382d27412e7e3e7c936e8d50d8888dfac3df8 Author: Greg Kroah-Hartman Date: Thu Jan 13 12:10:18 2011 -0800 tty: move drivers/serial/ to drivers/tty/serial/ The serial drivers are really just tty drivers, so move them to drivers/tty/ to make things a bit neater overall. This is part of the tty/serial driver movement proceedure as proposed by Arnd Bergmann and approved by everyone involved a number of months ago. Cc: Arnd Bergmann Cc: Alan Cox Cc: Geert Uytterhoeven Cc: Rogier Wolff Cc: Michael H. Warfield Signed-off-by: Greg Kroah-Hartman commit 728674a7e466628df2aeec6d11a2ae1ef968fb67 Author: Greg Kroah-Hartman Date: Thu Jan 13 12:03:00 2011 -0800 tty: move hvc drivers to drivers/tty/hvc/ As requested by Arnd Bergmann, the hvc drivers are now moved to the drivers/tty/hvc/ directory. The virtio_console.c driver was also moved, as it required the hvc_console.h file to be able to be built, and it really is a hvc driver. Cc: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman commit 7c63dedcc52c8c1253b1deec387102ef788ed0b4 Author: Stephen Boyd Date: Mon Dec 20 15:00:17 2010 -0800 msm: qsd8x50: Platform data isn't init data Remove the SMC91x platform and resource data from initdata. These will continue to be accessed after init, and must remain available. Signed-off-by: Stephen Boyd Signed-off-by: David Brown commit 6a5b3beff916a19e7672f8c0330b4f82ed367be2 Author: Daniel De Graaf Date: Mon Dec 20 14:56:09 2010 -0800 xenbus: Fix memory leak on release Pending responses were leaked on close. Signed-off-by: Daniel De Graaf Signed-off-by: Jan Beulich Signed-off-by: Jeremy Fitzhardinge commit 7808121b9a1e44ef12fecd49fa6c268f27a150fc Author: Daniel De Graaf Date: Wed Sep 8 18:10:42 2010 -0400 xenbus: avoid zero returns from read() It is possible to get a zero return from read() in instances where the queue is not empty but has no elements with data to deliver to the user. Since a zero return from read is an error indicator, resume waiting or return -EAGAIN (for a nonblocking fd) in this case. Signed-off-by: Daniel De Graaf Signed-off-by: Jeremy Fitzhardinge commit 76ce7618f9a24f7b13958c67f7d5ccfcdab71475 Author: Daniel De Graaf Date: Tue Sep 7 11:42:18 2010 -0400 xenbus: add missing wakeup in concurrent read/write If an application has a dedicated read thread watching xenbus and another thread writes an XS_WATCH message that generates a synthetic "OK" reply, this reply will be enqueued in the buffer without waking up the reader. This can cause a deadlock in the application if it then waits for the read thread to receive the queued message. Signed-off-by: Daniel De Graaf commit e752969f502a511e83f841aa01d6cd332e6d85a0 Author: Daniel De Graaf Date: Tue Sep 7 11:21:52 2010 -0400 xenbus: fix deadlock in concurrent read/write If an application has a dedicated read thread watching xenbus and another thread writes an XS_WATCH message that generates a synthetic "OK" reply, this reply will be enqueued in the buffer without waking up the reader. Signed-off-by: Jeremy Fitzhardinge commit 6d6df2e412297b8047c407b3abcd045a67c96744 Author: Diego Ongaro Date: Wed Sep 1 09:18:54 2010 -0700 xenbus: allow any xenbus command over /proc/xen/xenbus When xenstored is in another domain, we need to be able to send any command over xenbus. This doesn't pose a security problem because its up to xenstored to determine whether a given client is allowed to use a particular command anyway. From linux-2.5.18-xen.hg 68d582b0ad05. Signed-off-by: Jeremy Fitzhardinge commit fb27cfbcbd2865b0e731c4aae47df71778da805e Author: Jeremy Fitzhardinge Date: Wed Aug 25 12:19:53 2010 -0700 xenfs/xenbus: report partial reads/writes correctly copy_(to|from)_user return the number of uncopied bytes, so a successful return is 0, and any non-zero result indicates some degree of failure. Reported-by: "Jun Zhu (Intern)" Signed-off-by: Jeremy Fitzhardinge