commit 45d28b097280a78893ce25a5d0db41e6a2717853 Merge: 4207a15 835d524 Author: Linus Torvalds Date: Sat Jan 2 11:17:05 2010 -0800 Merge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing * 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: reiserfs: Safely acquire i_mutex from xattr_rmdir reiserfs: Safely acquire i_mutex from reiserfs_for_each_xattr reiserfs: Fix journal mutex <-> inode mutex lock inversion reiserfs: Fix unwanted recursive reiserfs lock in reiserfs_unlink() reiserfs: Relax lock before open xattr dir in reiserfs_xattr_set_handle() reiserfs: Relax reiserfs lock while freeing the journal reiserfs: Fix reiserfs lock <-> i_mutex dependency inversion on xattr reiserfs: Warn on lock relax if taken recursively reiserfs: Fix reiserfs lock <-> i_xattr_sem dependency inversion reiserfs: Fix remaining in-reclaim-fs <-> reclaim-fs-on locking inversion reiserfs: Fix reiserfs lock <-> inode mutex dependency inversion reiserfs: Fix reiserfs lock and journal lock inversion dependency reiserfs: Fix possible recursive lock commit 4207a152bc242effd0b8231143aa5b9f7a1593a9 Author: Kusanagi Kouichi Date: Fri Jan 1 20:36:09 2010 -0800 Documentation: Rename Documentation/DMA-mapping.txt It seems that Documentation/DMA-mapping.txt was supposed to be renamed to Documentation/PCI/PCI-DMA-mapping.txt. Signed-off-by: Kusanagi Kouichi Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 8d9f99c335ef66e4c44afe8f61816b0edeafba91 Author: H Hartley Sweeten Date: Fri Jan 1 20:35:54 2010 -0800 DocBook: fix ioremap return type ioremap() returns a void __iomem * not an unsigned long. Update the Documentation file to reflect this. Signed-off-by: H Hartley Sweeten Signed-off-by: Randy Dunlap Cc: David Woodhouse Signed-off-by: Linus Torvalds commit 143724fd3d3c154009fe95846dcbf7afadca8ab1 Author: H Hartley Sweeten Date: Fri Jan 1 20:35:41 2010 -0800 Documentation: fix ioremap return type ioremap() returns a void __iomem * not a char *. Update the documentation file to reflect this. Signed-off-by: H Hartley Sweeten Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 4b6764fa9e25cf628e42bbd192eca1e0b8e59061 Author: Jaswinder Singh Rajput Date: Fri Jan 1 20:35:23 2010 -0800 writeback: add missing kernel-doc notation Fix the following htmldocs warning: Warning(fs/fs-writeback.c:255): No description found for parameter 'sb' Signed-off-by: Jaswinder Singh Rajput Signed-off-by: Randy Dunlap Acked-by: Wu Fengguang Cc: Peter Zijlstra Cc: Jan Kara Cc: Jens Axboe Signed-off-by: Linus Torvalds commit 835d5247d98f46e35d007dcfa6215e526ca33360 Author: Frederic Weisbecker Date: Wed Dec 30 07:40:39 2009 +0100 reiserfs: Safely acquire i_mutex from xattr_rmdir Relax the reiserfs lock before taking the inode mutex from xattr_rmdir() to avoid the usual reiserfs lock <-> inode mutex bad dependency. Signed-off-by: Frederic Weisbecker Tested-by: Christian Kujau Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit 8b513f56d4e117f11cf0760abcc030eedefc45c3 Author: Frederic Weisbecker Date: Wed Dec 30 07:28:58 2009 +0100 reiserfs: Safely acquire i_mutex from reiserfs_for_each_xattr Relax the reiserfs lock before taking the inode mutex from reiserfs_for_each_xattr() to avoid the usual bad dependencies: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-atom #179 ------------------------------------------------------- rm/3242 is trying to acquire lock: (&sb->s_type->i_mutex_key#4/3){+.+.+.}, at: [] reiserfs_for_each_xattr+0x23f/0x290 but task is already holding lock: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x29/0x40 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&REISERFS_SB(s)->lock){+.+.+.}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] reiserfs_write_lock_once+0x29/0x50 [] reiserfs_lookup+0x62/0x140 [] __lookup_hash+0xef/0x110 [] lookup_one_len+0x8d/0xc0 [] open_xa_dir+0xea/0x1b0 [] reiserfs_for_each_xattr+0x70/0x290 [] reiserfs_delete_xattrs+0x1a/0x60 [] reiserfs_delete_inode+0x9f/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] sys_unlinkat+0x23/0x40 [] sysenter_do_call+0x12/0x32 -> #0 (&sb->s_type->i_mutex_key#4/3){+.+.+.}: [] __lock_acquire+0x18f6/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] reiserfs_for_each_xattr+0x23f/0x290 [] reiserfs_delete_xattrs+0x1a/0x60 [] reiserfs_delete_inode+0x9f/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] sys_unlinkat+0x23/0x40 [] sysenter_do_call+0x12/0x32 other info that might help us debug this: 1 lock held by rm/3242: #0: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x29/0x40 stack backtrace: Pid: 3242, comm: rm Not tainted 2.6.32-atom #179 Call Trace: [] ? printk+0x18/0x1a [] print_circular_bug+0xca/0xd0 [] __lock_acquire+0x18f6/0x19e0 [] ? mark_held_locks+0x62/0x80 [] ? trace_hardirqs_on+0xb/0x10 [] ? mutex_unlock+0x8/0x10 [] lock_acquire+0x68/0x90 [] ? reiserfs_for_each_xattr+0x23f/0x290 [] ? reiserfs_for_each_xattr+0x23f/0x290 [] mutex_lock_nested+0x5b/0x340 [] ? reiserfs_for_each_xattr+0x23f/0x290 [] reiserfs_for_each_xattr+0x23f/0x290 [] ? delete_one_xattr+0x0/0x100 [] reiserfs_delete_xattrs+0x1a/0x60 [] ? reiserfs_write_lock_once+0x29/0x50 [] reiserfs_delete_inode+0x9f/0x150 [] ? _atomic_dec_and_lock+0x4f/0x70 [] ? reiserfs_delete_inode+0x0/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] ? mutex_unlock+0x8/0x10 [] ? vfs_readdir+0x7d/0xb0 [] ? filldir64+0x0/0xf0 [] ? sysenter_exit+0xf/0x16 [] ? trace_hardirqs_on_caller+0x124/0x170 [] sys_unlinkat+0x23/0x40 [] sysenter_do_call+0x12/0x32 Signed-off-by: Frederic Weisbecker Tested-by: Christian Kujau Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit 4dd859697f836cf62c8de08bd9a9f4b4f4beaa91 Author: Frederic Weisbecker Date: Wed Dec 30 07:26:28 2009 +0100 reiserfs: Fix journal mutex <-> inode mutex lock inversion We need to relax the reiserfs lock before locking the inode mutex from xattr_unlink(), otherwise we'll face the usual bad dependencies: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-atom #178 ------------------------------------------------------- rm/3202 is trying to acquire lock: (&journal->j_mutex){+.+...}, at: [] do_journal_begin_r+0x94/0x360 but task is already holding lock: (&sb->s_type->i_mutex_key#4/2){+.+...}, at: [] xattr_unlink+0x57/0xb0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sb->s_type->i_mutex_key#4/2){+.+...}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] xattr_unlink+0x57/0xb0 [] delete_one_xattr+0x29/0x100 [] reiserfs_for_each_xattr+0x10b/0x290 [] reiserfs_delete_xattrs+0x1a/0x60 [] reiserfs_delete_inode+0x9f/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] sys_unlinkat+0x23/0x40 [] sysenter_do_call+0x12/0x32 -> #1 (&REISERFS_SB(s)->lock){+.+.+.}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] reiserfs_write_lock+0x29/0x40 [] do_journal_begin_r+0x9c/0x360 [] journal_begin+0x80/0x130 [] reiserfs_remount+0x223/0x4e0 [] do_remount_sb+0xa6/0x140 [] do_mount+0x560/0x750 [] sys_mount+0x84/0xb0 [] sysenter_do_call+0x12/0x32 -> #0 (&journal->j_mutex){+.+...}: [] __lock_acquire+0x18f6/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] do_journal_begin_r+0x94/0x360 [] journal_begin+0x80/0x130 [] reiserfs_unlink+0x83/0x2e0 [] xattr_unlink+0x64/0xb0 [] delete_one_xattr+0x29/0x100 [] reiserfs_for_each_xattr+0x10b/0x290 [] reiserfs_delete_xattrs+0x1a/0x60 [] reiserfs_delete_inode+0x9f/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] sys_unlinkat+0x23/0x40 [] sysenter_do_call+0x12/0x32 other info that might help us debug this: 2 locks held by rm/3202: #0: (&sb->s_type->i_mutex_key#4/3){+.+.+.}, at: [] reiserfs_for_each_xattr+0x9b/0x290 #1: (&sb->s_type->i_mutex_key#4/2){+.+...}, at: [] xattr_unlink+0x57/0xb0 stack backtrace: Pid: 3202, comm: rm Not tainted 2.6.32-atom #178 Call Trace: [] ? printk+0x18/0x1a [] print_circular_bug+0xca/0xd0 [] __lock_acquire+0x18f6/0x19e0 [] ? xattr_unlink+0x57/0xb0 [] lock_acquire+0x68/0x90 [] ? do_journal_begin_r+0x94/0x360 [] ? do_journal_begin_r+0x94/0x360 [] mutex_lock_nested+0x5b/0x340 [] ? do_journal_begin_r+0x94/0x360 [] do_journal_begin_r+0x94/0x360 [] ? run_timer_softirq+0x1a6/0x220 [] ? __do_softirq+0x50/0x140 [] journal_begin+0x80/0x130 [] ? __do_softirq+0xf2/0x140 [] ? hrtimer_interrupt+0xdf/0x220 [] reiserfs_unlink+0x83/0x2e0 [] ? mark_held_locks+0x62/0x80 [] ? trace_hardirqs_on_thunk+0xc/0x10 [] ? restore_all_notrace+0x0/0x18 [] ? xattr_unlink+0x57/0xb0 [] xattr_unlink+0x64/0xb0 [] delete_one_xattr+0x29/0x100 [] reiserfs_for_each_xattr+0x10b/0x290 [] ? delete_one_xattr+0x0/0x100 [] ? mutex_lock_nested+0x299/0x340 [] reiserfs_delete_xattrs+0x1a/0x60 [] ? reiserfs_write_lock_once+0x29/0x50 [] reiserfs_delete_inode+0x9f/0x150 [] ? _atomic_dec_and_lock+0x4f/0x70 [] ? reiserfs_delete_inode+0x0/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] ? mutex_unlock+0x8/0x10 [] ? vfs_readdir+0x7d/0xb0 [] ? filldir64+0x0/0xf0 [] ? sysenter_exit+0xf/0x16 [] ? trace_hardirqs_on_caller+0x124/0x170 [] sys_unlinkat+0x23/0x40 [] sysenter_do_call+0x12/0x32 Signed-off-by: Frederic Weisbecker Tested-by: Christian Kujau Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit c674905ca74ad0ae5b048afb1ef68663a0d7e987 Author: Frederic Weisbecker Date: Wed Dec 30 07:12:03 2009 +0100 reiserfs: Fix unwanted recursive reiserfs lock in reiserfs_unlink() reiserfs_unlink() may or may not be called under the reiserfs lock. But it also takes the reiserfs lock and can then acquire it recursively which leads to do_journal_begin_r() that fails to relax the reiserfs lock before grabbing the journal mutex, creating an unexpected lock inversion. We need to ensure reiserfs_unlink() won't get the reiserfs lock recursively using reiserfs_write_lock_once(). This fixes the following warning that precedes a lock inversion report (reiserfs lock <-> journal mutex). ------------[ cut here ]------------ WARNING: at fs/reiserfs/lock.c:95 reiserfs_lock_check_recursive+0x3a/0x50() Hardware name: MS-7418 Unwanted recursive reiserfs lock! Pid: 3208, comm: dbench Not tainted 2.6.32-atom #177 Call Trace: [] ? reiserfs_lock_check_recursive+0x3a/0x50 [] ? reiserfs_lock_check_recursive+0x3a/0x50 [] warn_slowpath_common+0x67/0xc0 [] ? reiserfs_lock_check_recursive+0x3a/0x50 [] warn_slowpath_fmt+0x26/0x30 [] reiserfs_lock_check_recursive+0x3a/0x50 [] do_journal_begin_r+0x83/0x360 [] ? __lock_acquire+0x1296/0x19e0 [] ? xattr_unlink+0x57/0xb0 [] journal_begin+0x80/0x130 [] reiserfs_unlink+0x7d/0x2d0 [] ? xattr_unlink+0x57/0xb0 [] ? xattr_unlink+0x57/0xb0 [] ? xattr_unlink+0x57/0xb0 [] xattr_unlink+0x64/0xb0 [] delete_one_xattr+0x29/0x100 [] reiserfs_for_each_xattr+0x10b/0x290 [] ? delete_one_xattr+0x0/0x100 [] ? mutex_lock_nested+0x299/0x340 [] reiserfs_delete_xattrs+0x1a/0x60 [] ? reiserfs_write_lock_once+0x29/0x50 [] reiserfs_delete_inode+0x9f/0x150 [] ? _atomic_dec_and_lock+0x4f/0x70 [] ? reiserfs_delete_inode+0x0/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] ? up_read+0x16/0x30 [] ? do_page_fault+0x187/0x330 [] ? restore_all_notrace+0x0/0x18 [] ? do_page_fault+0x0/0x330 [] ? trace_hardirqs_on_caller+0x124/0x170 [] sys_unlink+0x10/0x20 [] sysenter_do_call+0x12/0x32 ---[ end trace 2e35d71a6cc69d0c ]--- Signed-off-by: Frederic Weisbecker Tested-by: Christian Kujau Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit 3f14fea6bbd3444dd46a2af3a2e219e792616645 Author: Frederic Weisbecker Date: Wed Dec 30 07:03:53 2009 +0100 reiserfs: Relax lock before open xattr dir in reiserfs_xattr_set_handle() We call xattr_lookup() from reiserfs_xattr_get(). We then hold the reiserfs lock when we grab the i_mutex. But later, we may relax the reiserfs lock, creating dependency inversion between both locks. The lookups and creation jobs ar already protected by the inode mutex, so we can safely relax the reiserfs lock, dropping the unwanted reiserfs lock -> i_mutex dependency, as shown in the following lockdep report: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-atom #173 ------------------------------------------------------- cp/3204 is trying to acquire lock: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock_once+0x29/0x50 but task is already holding lock: (&sb->s_type->i_mutex_key#4/3){+.+.+.}, at: [] open_xa_dir+0xd8/0x1b0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#4/3){+.+.+.}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] open_xa_dir+0x43/0x1b0 [] reiserfs_for_each_xattr+0x62/0x260 [] reiserfs_delete_xattrs+0x1a/0x60 [] reiserfs_delete_inode+0x9f/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] sys_unlink+0x10/0x20 [] sysenter_do_call+0x12/0x32 -> #0 (&REISERFS_SB(s)->lock){+.+.+.}: [] __lock_acquire+0x18f6/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] reiserfs_write_lock_once+0x29/0x50 [] reiserfs_lookup+0x62/0x140 [] __lookup_hash+0xef/0x110 [] lookup_one_len+0x8d/0xc0 [] open_xa_dir+0xea/0x1b0 [] xattr_lookup+0x15/0x160 [] reiserfs_xattr_get+0x56/0x2a0 [] reiserfs_get_acl+0xa2/0x360 [] reiserfs_cache_default_acl+0x3a/0x160 [] reiserfs_mkdir+0x6c/0x2c0 [] vfs_mkdir+0xd6/0x180 [] sys_mkdirat+0xc0/0xd0 [] sys_mkdir+0x20/0x30 [] sysenter_do_call+0x12/0x32 other info that might help us debug this: 2 locks held by cp/3204: #0: (&sb->s_type->i_mutex_key#4/1){+.+.+.}, at: [] lookup_create+0x26/0xa0 #1: (&sb->s_type->i_mutex_key#4/3){+.+.+.}, at: [] open_xa_dir+0xd8/0x1b0 stack backtrace: Pid: 3204, comm: cp Not tainted 2.6.32-atom #173 Call Trace: [] ? printk+0x18/0x1a [] print_circular_bug+0xca/0xd0 [] __lock_acquire+0x18f6/0x19e0 [] ? check_usage+0x6a/0x460 [] lock_acquire+0x68/0x90 [] ? reiserfs_write_lock_once+0x29/0x50 [] ? reiserfs_write_lock_once+0x29/0x50 [] mutex_lock_nested+0x5b/0x340 [] ? reiserfs_write_lock_once+0x29/0x50 [] reiserfs_write_lock_once+0x29/0x50 [] reiserfs_lookup+0x62/0x140 [] ? debug_check_no_locks_freed+0x8a/0x140 [] ? trace_hardirqs_on_caller+0x124/0x170 [] __lookup_hash+0xef/0x110 [] lookup_one_len+0x8d/0xc0 [] open_xa_dir+0xea/0x1b0 [] xattr_lookup+0x15/0x160 [] reiserfs_xattr_get+0x56/0x2a0 [] reiserfs_get_acl+0xa2/0x360 [] ? new_inode+0x27/0xa0 [] reiserfs_cache_default_acl+0x3a/0x160 [] ? _spin_unlock+0x27/0x40 [] reiserfs_mkdir+0x6c/0x2c0 [] ? __d_lookup+0x108/0x190 [] ? mark_held_locks+0x62/0x80 [] ? mutex_lock_nested+0x2bd/0x340 [] ? generic_permission+0x1a/0xa0 [] ? security_inode_permission+0x1e/0x20 [] vfs_mkdir+0xd6/0x180 [] sys_mkdirat+0xc0/0xd0 [] ? up_read+0x16/0x30 [] ? restore_all_notrace+0x0/0x18 [] sys_mkdir+0x20/0x30 [] sysenter_do_call+0x12/0x32 Signed-off-by: Frederic Weisbecker Tested-by: Christian Kujau Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit 0523676d3f3aa7edeea63cc3a1bc4dc612380a26 Author: Frederic Weisbecker Date: Wed Dec 30 05:56:08 2009 +0100 reiserfs: Relax reiserfs lock while freeing the journal Keeping the reiserfs lock while freeing the journal on umount path triggers a lock inversion between bdev->bd_mutex and the reiserfs lock. We don't need the reiserfs lock at this stage. The filesystem is not usable anymore, and there are no more pending commits, everything got flushed (even this operation was done in parallel and didn't required the reiserfs lock from the current process). This fixes the following lockdep report: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-atom #172 ------------------------------------------------------- umount/3904 is trying to acquire lock: (&bdev->bd_mutex){+.+.+.}, at: [] __blkdev_put+0x22/0x160 but task is already holding lock: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x29/0x40 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&REISERFS_SB(s)->lock){+.+.+.}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] reiserfs_write_lock_once+0x29/0x50 [] reiserfs_get_block+0x85/0x1620 [] do_mpage_readpage+0x1f0/0x6d0 [] mpage_readpages+0xc0/0x100 [] reiserfs_readpages+0x19/0x20 [] __do_page_cache_readahead+0x1bc/0x260 [] ra_submit+0x28/0x40 [] filemap_fault+0x40e/0x420 [] __do_fault+0x3d/0x430 [] handle_mm_fault+0x12e/0x790 [] do_page_fault+0x135/0x330 [] error_code+0x6b/0x70 [] load_elf_binary+0x82a/0x1a10 [] search_binary_handler+0x90/0x1d0 [] do_execve+0x1df/0x250 [] sys_execve+0x46/0x70 [] syscall_call+0x7/0xb -> #2 (&mm->mmap_sem){++++++}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] might_fault+0x8b/0xb0 [] copy_to_user+0x32/0x70 [] filldir64+0xa4/0xf0 [] sysfs_readdir+0x116/0x210 [] vfs_readdir+0x8d/0xb0 [] sys_getdents64+0x69/0xb0 [] sysenter_do_call+0x12/0x32 -> #1 (sysfs_mutex){+.+.+.}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] sysfs_addrm_start+0x2c/0xb0 [] create_dir+0x40/0x90 [] sysfs_create_dir+0x2b/0x50 [] kobject_add_internal+0xc2/0x1b0 [] kobject_add_varg+0x31/0x50 [] kobject_add+0x2c/0x60 [] device_add+0x94/0x560 [] add_partition+0x18a/0x2a0 [] rescan_partitions+0x33a/0x450 [] __blkdev_get+0x12f/0x2d0 [] blkdev_get+0xa/0x10 [] register_disk+0x108/0x130 [] add_disk+0xd9/0x130 [] sd_probe_async+0x105/0x1d0 [] async_thread+0xcf/0x230 [] kthread+0x74/0x80 [] kernel_thread_helper+0x7/0x3c -> #0 (&bdev->bd_mutex){+.+.+.}: [] __lock_acquire+0x18f6/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] __blkdev_put+0x22/0x160 [] blkdev_put+0xa/0x10 [] free_journal_ram+0xd2/0x130 [] do_journal_release+0x98/0x190 [] journal_release+0xa/0x10 [] reiserfs_put_super+0x36/0x130 [] generic_shutdown_super+0x4f/0xe0 [] kill_block_super+0x25/0x40 [] reiserfs_kill_sb+0x7f/0x90 [] deactivate_super+0x7a/0x90 [] mntput_no_expire+0x98/0xd0 [] sys_umount+0x4c/0x310 [] sys_oldumount+0x19/0x20 [] sysenter_do_call+0x12/0x32 other info that might help us debug this: 2 locks held by umount/3904: #0: (&type->s_umount_key#30){+++++.}, at: [] deactivate_super+0x75/0x90 #1: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x29/0x40 stack backtrace: Pid: 3904, comm: umount Not tainted 2.6.32-atom #172 Call Trace: [] ? printk+0x18/0x1a [] print_circular_bug+0xca/0xd0 [] __lock_acquire+0x18f6/0x19e0 [] ? free_pcppages_bulk+0x1f/0x250 [] lock_acquire+0x68/0x90 [] ? __blkdev_put+0x22/0x160 [] ? __blkdev_put+0x22/0x160 [] mutex_lock_nested+0x5b/0x340 [] ? __blkdev_put+0x22/0x160 [] ? mark_held_locks+0x62/0x80 [] ? kfree+0x92/0xd0 [] __blkdev_put+0x22/0x160 [] ? trace_hardirqs_on+0xb/0x10 [] blkdev_put+0xa/0x10 [] free_journal_ram+0xd2/0x130 [] do_journal_release+0x98/0x190 [] journal_release+0xa/0x10 [] reiserfs_put_super+0x36/0x130 [] ? up_write+0x16/0x30 [] generic_shutdown_super+0x4f/0xe0 [] kill_block_super+0x25/0x40 [] ? vfs_quota_off+0x0/0x20 [] reiserfs_kill_sb+0x7f/0x90 [] deactivate_super+0x7a/0x90 [] mntput_no_expire+0x98/0xd0 [] sys_umount+0x4c/0x310 [] sys_oldumount+0x19/0x20 [] sysenter_do_call+0x12/0x32 Signed-off-by: Frederic Weisbecker Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit 27026a05bb805866a3b9068dda8153b72cb942f4 Author: Frederic Weisbecker Date: Wed Dec 30 05:06:21 2009 +0100 reiserfs: Fix reiserfs lock <-> i_mutex dependency inversion on xattr While deleting the xattrs of an inode, we hold the reiserfs lock and grab the inode->i_mutex of the targeted inode and the root private xattr directory. Later on, we may relax the reiserfs lock for various reasons, this creates inverted dependencies. We can remove the reiserfs lock -> i_mutex dependency by relaxing the former before calling open_xa_dir(). This is fine because the lookup and creation of xattr private directories done in open_xa_dir() are covered by the targeted inode mutexes. And deeper operations in the tree are still done under the write lock. This fixes the following lockdep report: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.32-atom #173 ------------------------------------------------------- cp/3204 is trying to acquire lock: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock_once+0x29/0x50 but task is already holding lock: (&sb->s_type->i_mutex_key#4/3){+.+.+.}, at: [] open_xa_dir+0xd8/0x1b0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#4/3){+.+.+.}: [] __lock_acquire+0x11ff/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] open_xa_dir+0x43/0x1b0 [] reiserfs_for_each_xattr+0x62/0x260 [] reiserfs_delete_xattrs+0x1a/0x60 [] reiserfs_delete_inode+0x9f/0x150 [] generic_delete_inode+0xa2/0x170 [] generic_drop_inode+0x4f/0x70 [] iput+0x47/0x50 [] do_unlinkat+0xd5/0x160 [] sys_unlink+0x10/0x20 [] sysenter_do_call+0x12/0x32 -> #0 (&REISERFS_SB(s)->lock){+.+.+.}: [] __lock_acquire+0x18f6/0x19e0 [] lock_acquire+0x68/0x90 [] mutex_lock_nested+0x5b/0x340 [] reiserfs_write_lock_once+0x29/0x50 [] reiserfs_lookup+0x62/0x140 [] __lookup_hash+0xef/0x110 [] lookup_one_len+0x8d/0xc0 [] open_xa_dir+0xea/0x1b0 [] xattr_lookup+0x15/0x160 [] reiserfs_xattr_get+0x56/0x2a0 [] reiserfs_get_acl+0xa2/0x360 [] reiserfs_cache_default_acl+0x3a/0x160 [] reiserfs_mkdir+0x6c/0x2c0 [] vfs_mkdir+0xd6/0x180 [] sys_mkdirat+0xc0/0xd0 [] sys_mkdir+0x20/0x30 [] sysenter_do_call+0x12/0x32 other info that might help us debug this: 2 locks held by cp/3204: #0: (&sb->s_type->i_mutex_key#4/1){+.+.+.}, at: [] lookup_create+0x26/0xa0 #1: (&sb->s_type->i_mutex_key#4/3){+.+.+.}, at: [] open_xa_dir+0xd8/0x1b0 stack backtrace: Pid: 3204, comm: cp Not tainted 2.6.32-atom #173 Call Trace: [] ? printk+0x18/0x1a [] print_circular_bug+0xca/0xd0 [] __lock_acquire+0x18f6/0x19e0 [] ? check_usage+0x6a/0x460 [] lock_acquire+0x68/0x90 [] ? reiserfs_write_lock_once+0x29/0x50 [] ? reiserfs_write_lock_once+0x29/0x50 [] mutex_lock_nested+0x5b/0x340 [] ? reiserfs_write_lock_once+0x29/0x50 [] reiserfs_write_lock_once+0x29/0x50 [] reiserfs_lookup+0x62/0x140 [] ? debug_check_no_locks_freed+0x8a/0x140 [] ? trace_hardirqs_on_caller+0x124/0x170 [] __lookup_hash+0xef/0x110 [] lookup_one_len+0x8d/0xc0 [] open_xa_dir+0xea/0x1b0 [] xattr_lookup+0x15/0x160 [] reiserfs_xattr_get+0x56/0x2a0 [] reiserfs_get_acl+0xa2/0x360 [] ? new_inode+0x27/0xa0 [] reiserfs_cache_default_acl+0x3a/0x160 [] ? _spin_unlock+0x27/0x40 [] reiserfs_mkdir+0x6c/0x2c0 [] ? __d_lookup+0x108/0x190 [] ? mark_held_locks+0x62/0x80 [] ? mutex_lock_nested+0x2bd/0x340 [] ? generic_permission+0x1a/0xa0 [] ? security_inode_permission+0x1e/0x20 [] vfs_mkdir+0xd6/0x180 [] sys_mkdirat+0xc0/0xd0 [] ? up_read+0x16/0x30 [] ? restore_all_notrace+0x0/0x18 [] sys_mkdir+0x20/0x30 [] sysenter_do_call+0x12/0x32 v2: Don't drop reiserfs_mutex_lock_nested_safe() as we'll still need it later Signed-off-by: Frederic Weisbecker Tested-by: Christian Kujau Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit c4a62ca362258d98f42efb282cfbf9b61caffdbe Author: Frederic Weisbecker Date: Wed Dec 30 03:20:19 2009 +0100 reiserfs: Warn on lock relax if taken recursively When we relax the reiserfs lock to avoid creating unwanted dependencies against others locks while grabbing these, we want to ensure it has not been taken recursively, otherwise the lock won't be really relaxed. Only its depth will be decreased. The unwanted dependency would then actually happen. To prevent from that, add a reiserfs_lock_check_recursive() call in the places that need it. Signed-off-by: Frederic Weisbecker Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit 0719d3434747889b314a1e8add776418c4148bcf Author: Frederic Weisbecker Date: Wed Dec 30 00:39:22 2009 +0100 reiserfs: Fix reiserfs lock <-> i_xattr_sem dependency inversion i_xattr_sem depends on the reiserfs lock. But after we grab i_xattr_sem, we may relax/relock the reiserfs lock while waiting on a freezed filesystem, creating a dependency inversion between the two locks. In order to avoid the i_xattr_sem -> reiserfs lock dependency, let's create a reiserfs_down_read_safe() that acts like reiserfs_mutex_lock_safe(): relax the reiserfs lock while grabbing another lock to avoid undesired dependencies induced by the heivyweight reiserfs lock. This fixes the following warning: [ 990.005931] ======================================================= [ 990.012373] [ INFO: possible circular locking dependency detected ] [ 990.013233] 2.6.33-rc1 #1 [ 990.013233] ------------------------------------------------------- [ 990.013233] dbench/1891 is trying to acquire lock: [ 990.013233] (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x35/0x50 [ 990.013233] [ 990.013233] but task is already holding lock: [ 990.013233] (&REISERFS_I(inode)->i_xattr_sem){+.+.+.}, at: [] reiserfs_xattr_set_handle+0x8a/0x470 [ 990.013233] [ 990.013233] which lock already depends on the new lock. [ 990.013233] [ 990.013233] [ 990.013233] the existing dependency chain (in reverse order) is: [ 990.013233] [ 990.013233] -> #1 (&REISERFS_I(inode)->i_xattr_sem){+.+.+.}: [ 990.013233] [] __lock_acquire+0xf9c/0x1560 [ 990.013233] [] lock_acquire+0x8f/0xb0 [ 990.013233] [] down_write+0x44/0x80 [ 990.013233] [] reiserfs_xattr_set_handle+0x8a/0x470 [ 990.013233] [] reiserfs_xattr_set+0xb0/0x150 [ 990.013233] [] user_set+0x8a/0x90 [ 990.013233] [] reiserfs_setxattr+0xaa/0xb0 [ 990.013233] [] __vfs_setxattr_noperm+0x36/0xa0 [ 990.013233] [] vfs_setxattr+0xbc/0xc0 [ 990.013233] [] setxattr+0xc0/0x150 [ 990.013233] [] sys_fsetxattr+0x8d/0xa0 [ 990.013233] [] system_call_fastpath+0x16/0x1b [ 990.013233] [ 990.013233] -> #0 (&REISERFS_SB(s)->lock){+.+.+.}: [ 990.013233] [] __lock_acquire+0x12d0/0x1560 [ 990.013233] [] lock_acquire+0x8f/0xb0 [ 990.013233] [] __mutex_lock_common+0x47/0x3b0 [ 990.013233] [] mutex_lock_nested+0x3e/0x50 [ 990.013233] [] reiserfs_write_lock+0x35/0x50 [ 990.013233] [] reiserfs_prepare_write+0x45/0x180 [ 990.013233] [] reiserfs_xattr_set_handle+0x2a6/0x470 [ 990.013233] [] reiserfs_xattr_set+0xb0/0x150 [ 990.013233] [] user_set+0x8a/0x90 [ 990.013233] [] reiserfs_setxattr+0xaa/0xb0 [ 990.013233] [] __vfs_setxattr_noperm+0x36/0xa0 [ 990.013233] [] vfs_setxattr+0xbc/0xc0 [ 990.013233] [] setxattr+0xc0/0x150 [ 990.013233] [] sys_fsetxattr+0x8d/0xa0 [ 990.013233] [] system_call_fastpath+0x16/0x1b [ 990.013233] [ 990.013233] other info that might help us debug this: [ 990.013233] [ 990.013233] 2 locks held by dbench/1891: [ 990.013233] #0: (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [] vfs_setxattr+0x78/0xc0 [ 990.013233] #1: (&REISERFS_I(inode)->i_xattr_sem){+.+.+.}, at: [] reiserfs_xattr_set_handle+0x8a/0x470 [ 990.013233] [ 990.013233] stack backtrace: [ 990.013233] Pid: 1891, comm: dbench Not tainted 2.6.33-rc1 #1 [ 990.013233] Call Trace: [ 990.013233] [] print_circular_bug+0xe9/0xf0 [ 990.013233] [] __lock_acquire+0x12d0/0x1560 [ 990.013233] [] ? reiserfs_xattr_set_handle+0x8a/0x470 [ 990.013233] [] lock_acquire+0x8f/0xb0 [ 990.013233] [] ? reiserfs_write_lock+0x35/0x50 [ 990.013233] [] ? reiserfs_xattr_set_handle+0x8a/0x470 [ 990.013233] [] __mutex_lock_common+0x47/0x3b0 [ 990.013233] [] ? reiserfs_write_lock+0x35/0x50 [ 990.013233] [] ? reiserfs_write_lock+0x35/0x50 [ 990.013233] [] ? mark_held_locks+0x72/0xa0 [ 990.013233] [] ? __mutex_unlock_slowpath+0xbd/0x140 [ 990.013233] [] ? trace_hardirqs_on_caller+0x14d/0x1a0 [ 990.013233] [] mutex_lock_nested+0x3e/0x50 [ 990.013233] [] reiserfs_write_lock+0x35/0x50 [ 990.013233] [] reiserfs_prepare_write+0x45/0x180 [ 990.013233] [] reiserfs_xattr_set_handle+0x2a6/0x470 [ 990.013233] [] reiserfs_xattr_set+0xb0/0x150 [ 990.013233] [] ? __mutex_lock_common+0x284/0x3b0 [ 990.013233] [] user_set+0x8a/0x90 [ 990.013233] [] reiserfs_setxattr+0xaa/0xb0 [ 990.013233] [] __vfs_setxattr_noperm+0x36/0xa0 [ 990.013233] [] vfs_setxattr+0xbc/0xc0 [ 990.013233] [] setxattr+0xc0/0x150 [ 990.013233] [] ? sched_clock_cpu+0xb8/0x100 [ 990.013233] [] ? trace_hardirqs_off+0xd/0x10 [ 990.013233] [] ? cpu_clock+0x43/0x50 [ 990.013233] [] ? fget+0xb0/0x110 [ 990.013233] [] ? fget+0x0/0x110 [ 990.013233] [] ? sysret_check+0x27/0x62 [ 990.013233] [] sys_fsetxattr+0x8d/0xa0 [ 990.013233] [] system_call_fastpath+0x16/0x1b Reported-and-tested-by: Christian Kujau Signed-off-by: Frederic Weisbecker Cc: Alexander Beregalov Cc: Chris Mason Cc: Ingo Molnar commit cd6e125c58ae1561bedb6ea6f70b00d6c2599d62 Author: Linus Torvalds Date: Thu Dec 31 17:26:05 2009 -0800 twl4030-irq.c: fix compiler warning due to raw-spinlock conversion Commit 239007b844 ("genirq: Convert irq_desc.lock to raw_spinlock") seems to have missed this driver, leaving it to use the normal spin-lock functions for the irq descriptor lock, which is now a raw lock. Reported-and-compile-tested-by: Stephen Rothwell Signed-off-by: Linus Torvalds commit df9d1e8a4379119cbc47c474f168b5103e404e17 Author: Linus Torvalds Date: Thu Dec 31 16:44:43 2009 -0800 pci: avoid compiler warning in quirks.c Introduced by commit 5b889bf23 ("PCI: Fix build if quirks are not enabled"), which made the pci_dev_reset_methods[] array static and 'const', but didn't then change the code to match, and use a const pointer when moving it to quirks.c. Trivially fixed by just adding the required 'const' to the iterator variable. Reported-by: Stephen Rothwell Cc: Rafael J. Wysocki Signed-off-by: Linus Torvalds commit c03f6bfc9f4fbeee14abef81ece67e39150a1ab1 Merge: b7bfb2a a994b8f Author: Linus Torvalds Date: Thu Dec 31 15:17:26 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] Enable mmap on forcedirectio mounts cifs: NULL out tcon, pSesInfo, and srvTcp pointers when chasing DFS referrals commit b7bfb2a7a9296871a5e45c35a2cdc6a174995aa7 Merge: 5b889bf 5d7db04 Author: Linus Torvalds Date: Thu Dec 31 12:01:24 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire, ieee1394: update Kconfig help firewire, ieee1394: update MAINTAINERS entries firewire: ohci: always use packet-per-buffer mode for isochronous reception firewire: cdev: fix another memory leak in an error path firewire: fix use of multiple AV/C devices, allow multiple FCP listeners Comments from Stefan: Distributors who still ship the old stack (ieee1394, ohci1394, raw1394, sbp2, eth1394 and more) should now switch to the new one (firewire-core, firewire-ohci, firewire-sbp2, firewire-net). In the first iteration, those distributors might want to ship the old stack also (but blacklisted) as a fallback for their users if unforeseen problems with the newer replacement drivers are encountered. The older FireWire stack contains several known problems which are not going to be fixed; instead, those issues are addressed by the new stack. An incomplete list of these issues is kept in bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=10046 We have a guide on migration from the older to the newer stack: http://ieee1394.wiki.kernel.org/index.php/Juju_Migration commit 5b889bf237fca383b5807ad69fde3ad1e2287e42 Author: Rafael J. Wysocki Date: Thu Dec 31 19:06:35 2009 +0100 PCI: Fix build if quirks are not enabled After commit b9c3b266411d27f1a6466c19d146d08db576bfea ("PCI: support device-specific reset methods") the kernel build is broken if CONFIG_PCI_QUIRKS is unset. Fix this by moving pci_dev_specific_reset() to drivers/pci/quirks.c and providing an empty replacement for !CONFIG_PCI_QUIRKS builds. Signed-off-by: Rafael J. Wysocki Reported-by: Ingo Molnar Signed-off-by: Linus Torvalds commit 9de54606d3d55095e4426a81a79a41d8e5e5b6be Merge: 952363c a8fe9ea Author: Linus Torvalds Date: Thu Dec 31 11:57:35 2009 -0800 Merge branch 'x86-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: dma-debug: Fix bug causing build warning commit 952363c90c93e967c8e1819131b68cbb6f9c962f Merge: 2d959e9 05cbaa2 Author: Linus Torvalds Date: Thu Dec 31 11:56:24 2009 -0800 Merge branch 'perf-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix NULL deref in inheritance code perf: Pass appropriate frame pointer to dump_trace() commit 2d959e95658a0224b0dd0d787926d5ffc95f9574 Merge: 9d6e323 f405d2c Author: Linus Torvalds Date: Thu Dec 31 11:54:13 2009 -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/agp: Fix agp_amd64_init() initialization with CONFIG_GART_IOMMU enabled x86: SGI UV: Fix writes to led registers on remote uv hubs x86, kmemcheck: Use KERN_WARNING for error reporting x86: Use KERN_DEFAULT log-level in __show_regs() x86, compress: Force i386 instructions for the decompressor x86/amd-iommu: Fix initialization failure panic dma-debug: Do not add notifier when dma debugging is disabled. x86: Fix objdump version check in chkobjdump.awk for different formats. Trivial conflicts in arch/x86/include/asm/uv/uv_hub.h due to me having applied an earlier version of an SGI UV fix. commit 9d6e323c687c7b94c703c9b0900a74e5d262d462 Merge: b21c070 4efb529 Author: Linus Torvalds Date: Thu Dec 31 11:52:24 2009 -0800 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf kmem: Fix statistics typo kprobes: Fix distinct type warning perf: Rename perf_event_hw_event in design document perf tools: Add missing header files to LIB_H Makefile variable perf record: We should fork only if a program was specified to run perf diff: Fix usage array, it must end with a NULL entry commit b21c07040304b8716e38a4a0e4ab60f386357e61 Merge: 4e58fb7 fb7ae98 Author: Linus Torvalds Date: Thu Dec 31 11:52:01 2009 -0800 Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: tracing: Fix sign fields in ftrace_define_fields_##call() tracing/syscalls: Fix typo in SYSCALL_DEFINE0 tracing/kprobe: Show sign of fields in trace_kprobe format files ksym_tracer: Remove trace_stat ksym_tracer: Fix race when incrementing count ksym_tracer: Fix to allow writing newline to ksym_trace_filter ksym_tracer: Fix to make the tracer work tracing: Kconfig spelling fixes and cleanups tracing: Fix setting tracer specific options Documentation: Update ftrace-design.txt Documentation: Update tracepoint-analysis.txt Documentation: Update mmiotrace.txt commit 4e58fb7305449cf8c5a86dd97dfc1812221be77c Merge: 08d869a c2b27ef Author: Linus Torvalds Date: Thu Dec 31 11:12:35 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: iforce - wait for command completion when closing the device Input: twl4030-pwrbutton - switch to using threaded IRQ Input: twl4030_keypad - switch to using threaded IRQ Input: lifebook - add CONFIG_DMI dependency Input: wistron - fix test for CONFIG_PM Input: psmouse - fix compile warning in hgpk module Input: matrix-keypad - handle cases when GPIOs can't be wakeup sources Input: iforce - fix oops on device disconnect Input: ff-memless - add notion of direction to for rumble effects Input: ff-memless - another fix for signed to unsigned overflow Input: ff-memless - start playing FF effects immediately Input: serio - do not mark kseriod freezable anymore Input: speed up suspend/shutdown for PS/2 mice and keyboards commit a8fe9ea200ea21421ea750423d1d4d4f7ce037cf Author: Ingo Molnar Date: Thu Dec 31 15:16:23 2009 +0100 dma-debug: Fix bug causing build warning Stephen Rothwell reported the following build warning: lib/dma-debug.c: In function 'dma_debug_device_change': lib/dma-debug.c:680: warning: 'return' with no value, in function returning non-void Introduced by commit f797d9881b62c2ddb1d2e7bd80d87141949c84aa ("dma-debug: Do not add notifier when dma debugging is disabled"). Return 0 [notify-done] when disabled. (this is standard bus notifier behavior.) Signed-off-by: Shaun Ruffell Signed-off-by: Joerg Roedel Cc: Linus Torvalds Cc: LKML-Reference: <20091231125624.GA14666@liondog.tnic> Signed-off-by: Ingo Molnar commit 05cbaa2853cdfc255fdd04e65a82bfe9208c4e52 Author: Peter Zijlstra Date: Wed Dec 30 16:00:35 2009 +0100 perf: Fix NULL deref in inheritance code Liming found a NULL deref when a task has a perf context but no counters when it forks. This can occur in two cases, a race during construction where the fork hits after installing the context but before the first counter gets inserted, or more reproducably, a fork after the last counter is closed (which leaves the context around). Reported-by: Wang Liming Signed-off-by: Peter Zijlstra Cc: Frederic Weisbecker Cc: Paul Mackerras CC: LKML-Reference: <1262185684.7135.222.camel@laptop> Signed-off-by: Ingo Molnar commit 48b5ba9cc98d676712da29d9931f1c88e5185ff2 Author: Frederic Weisbecker Date: Thu Dec 31 05:53:02 2009 +0100 perf: Pass appropriate frame pointer to dump_trace() Pass the frame pointer from the regs of the interrupted path to dump_trace() while processing the stack trace. Currently, dump_trace() takes the current bp and starts the callchain from dump_trace() itself. This is wasteful because we need to walk through the entire NMI/DEBUG stack before retrieving the interrupted point. We can fix that by just using the frame pointer from the captured regs. It points exactly where we want to start. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras LKML-Reference: <1262235183-5320-1-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Cc: Paul Mackerras commit 08d869aa8683703c4a60fdc574dd0809f9b073cd Merge: 05a6254 1201b2a Author: Linus Torvalds Date: Wed Dec 30 16:00:24 2009 -0800 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: introduce kernel parameter acpi_sleep=sci_force_enable ACPI: WMI: Survive BIOS with duplicate GUIDs dell-wmi - fix condition to abort driver loading wmi: check find_guid() return value to prevent oops dell-wmi, hp-wmi, msi-wmi: check wmi_get_event_data() return value ACPI: hp-wmi, msi-wmi: clarify that wmi_install_notify_handler() returns an acpi_status dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should ACPI video: correct error-handling code ACPI video: no warning message if "acpi_backlight=vendor" is used ACPI: fix ACPI=n allmodconfig build thinkpad-acpi: improve Kconfig help text thinkpad-acpi: update volume subdriver documentation thinkpad-acpi: make volume subdriver optional thinkpad-acpi: don't fail to load the entire module due to ALSA problems thinkpad-acpi: don't take the first ALSA slot by default commit 1201b2a9bec0413188ada1443ece1a52da6dbff4 Merge: cccc67a d7f0eea Author: Len Brown Date: Wed Dec 30 18:32:32 2009 -0500 Merge branch 'resume-sci-force-bootparam' into release commit d7f0eea9e431e1b8b0742a74db1a9490730b2a25 Author: Zhang Rui Date: Wed Dec 30 15:36:42 2009 +0800 ACPI: introduce kernel parameter acpi_sleep=sci_force_enable Introduce kernel parameter acpi_sleep=sci_force_enable some laptop requires SCI_EN being set directly on resume, or else they hung somewhere in the resume code path. We already have a blacklist for these laptops but we still need this option, especially when debugging some suspend/resume problems, in case there are systems that need this workaround and are not yet in the blacklist. Signed-off-by: Zhang Rui Acked-by: Rafael J. Wysocki Signed-off-by: Len Brown commit 05a625486efc3209ae4d98e253dafa6ce0124385 Merge: 1f11abc f80ca16 Author: Linus Torvalds Date: Wed Dec 30 13:46:29 2009 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: drivers/dma: Correct use after free drivers/dma: drop unnecesary memset ioat2,3: put channel hardware in known state at init async_tx: expand async raid6 test to cover ioatdma corner case ioat3: fix p-disabled q-continuation sh: fix DMA driver's descriptor chaining and cookie assignment dma: at_hdmac: correct incompatible type for argument 1 of 'spin_lock_bh' commit 1f11abc966b82b9fd0c834707486ef301b2f398d Merge: f8e9766 0637c6f Author: Linus Torvalds Date: Wed Dec 30 13:25:56 2009 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: Patch up how we claim metadata blocks for quota purposes ext4: Ensure zeroout blocks have no dirty metadata ext4: return correct wbc.nr_to_write in ext4_da_writepages ext4: Update documentation to correct the inode_readahead_blks option name jbd2: don't use __GFP_NOFAIL in journal_init_common() ext4: flush delalloc blocks when space is low fs-writeback: Add helper function to start writeback if idle ext4: Eliminate potential double free on error path ext4: fix unsigned long long printk warning in super.c ext4, jbd2: Add barriers for file systems with exernal journals ext4: replace BUG() with return -EIO in ext4_ext_get_blocks ext4: add module aliases for ext2 and ext3 ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured ext4: remove unused #include commit f8e9766dd1bacd5f32f9ac4322b55fbfd46b778e Merge: d661d76 00afa75 Author: Linus Torvalds Date: Wed Dec 30 13:14:25 2009 -0800 Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: SLAB: Fix lockdep annotation breakage commit d661d76b0262f3ed649a1dea24c0119757592b09 Merge: b07d41b 2d1c861 Author: Linus Torvalds Date: Wed Dec 30 13:13:24 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI/cardbus: Add a fixup hook and fix powerpc PCI: change PCI nomenclature in drivers/pci/ (non-comment changes) PCI: change PCI nomenclature in drivers/pci/ (comment changes) PCI: fix section mismatch on update_res() PCI: add Intel 82599 Virtual Function specific reset method PCI: add Intel USB specific reset method PCI: support device-specific reset methods PCI: Handle case when no pci device can provide cache line size hint PCI/PM: Propagate wake-up enable for PCIe devices too vgaarbiter: fix a typo in the vgaarbiter Documentation commit b07d41b77e58baa2df2326cec68dde03cb2348c5 Merge: 8fa4d87 b4329db Author: Linus Torvalds Date: Wed Dec 30 12:56:17 2009 -0800 Merge branch 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: get rid of kvm_create_vm() unused label warning on s390 KVM: powerpc: Fix mtsrin in book3s_64 mmu KVM: ia64: fix build breakage due to host spinlock change KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates KVM: LAPIC: make sure IRR bitmap is scanned after vm load KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device() KVM: MMU: remove prefault from invlpg handler commit 8fa4d8702de3b32854344635667290776d1a754b Merge: ed656d8 cc0db22 Author: Linus Torvalds Date: Wed Dec 30 12:55:10 2009 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix Oops at reloading beep devices ALSA: hda - Don't cache beep controls ALSA: Fix a typo in Procfile.txt ALSA: sound/arm: Fix build failure caused by missing struct aaci definition ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c ALSA: hda - Disable tigger at pin-sensing on AD codecs ALSA: hda - HDMI sticky stream tag support ALSA: Fix indentation in pcm_native.c commit ed656d8deccc5669afa33387568e7ec6f14e3e94 Author: Rolf Eike Beer Date: Sat Dec 26 17:58:11 2009 +0100 kfifo: Fix typo in comment It's DECLARE_KFIFO, not DECLARED_KFIFO. Signed-off-by: Rolf Eike Beer Signed-off-by: Linus Torvalds commit e48b7b66a6531f02f1264c7196f7069a9ce9251a Merge: 5ccf73b 9bd3f98 Author: Linus Torvalds Date: Wed Dec 30 12:43:21 2009 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block * 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: blk_rq_err_sectors cleanup block: Honor the gfp_mask for alloc_page() in blkdev_issue_discard() block: Fix incorrect alignment offset reporting and update documentation cfq-iosched: don't regard requests with long distance as close aoe: switch to the new bio_flush_dcache_pages() interface drivers/block/mg_disk.c: use resource_size() drivers/block/DAC960.c: use DAC960_V2_Controller block: Fix topology stacking for data and discard alignment drbd: remove unused #include drbd: remove duplicated #include drbd: Fix test of unsigned in _drbd_fault_random() drbd: Constify struct file_operations cfq-iosched: Remove prio_change logic for workload selection cfq-iosched: Get rid of nr_groups cfq-iosched: Remove the check for same cfq group from allow_merge drbd: fix test of unsigned in _drbd_fault_random() block: remove Documentation/block/as-iosched.txt commit 5ccf73bb4dc7cc9e1f761202a34de5714164724f Author: Len Brown Date: Wed Dec 30 01:21:42 2009 -0500 dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should follow 0/-E convention wmi_install_notify_handler() returns an acpi_error, but dell_wmi_init() needs return a -errno style error. Signed-off-by: Len Brown Tested-by: Paul Rolland Signed-off-by: Linus Torvalds commit b58454ec25e80fdb84e294758aeb22dd6d5ee6f9 Author: Paul Rolland Date: Wed Dec 30 01:19:12 2009 -0500 wmi: check find_guid() return value to prevent oops Signed-off-by: rol@as2917.net Signed-off-by: Len Brown Signed-off-by: Linus Torvalds commit b73d45dac75fe956ecf6a81c524127f2e44507ef Merge: c3bf490 404e4b4 Author: Linus Torvalds Date: Wed Dec 30 12:39:19 2009 -0800 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: md: allow a resync that is waiting for other resync to complete, to be aborted. md: remove unnecessary code from do_md_run md: make recovery started by do_md_run() visible via sync_action md: fix small irregularity with start_ro module parameter md: Fix unfortunate interaction with evms commit c3bf4906fba0d8871572b3f50fc036aade093e4d Merge: f39edad 7f9d357 Author: Linus Torvalds Date: Wed Dec 30 12:37:35 2009 -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: (74 commits) Revert "b43: Enforce DMA descriptor memory constraints" iwmc3200wifi: fix array out-of-boundary access wl1251: timeout one too soon in wl1251_boot_run_firmware() mac80211: fix propagation of failed hardware reconfigurations mac80211: fix race with suspend and dynamic_ps_disable_work ath9k: fix missed error codes in the tx status check ath9k: wake hardware during AMPDU TX actions ath9k: wake hardware for interface IBSS/AP/Mesh removal ath9k: fix suspend by waking device prior to stop cfg80211: fix error path in cfg80211_wext_siwscan wl1271_cmd.c: cleanup char => u8 iwlwifi: Storage class should be before const qualifier ath9k: Storage class should be before const qualifier cfg80211: fix race between deauth and assoc response wireless: remove remaining qual code rt2x00: Add USB ID for Linksys WUSB 600N rev 2. ath5k: fix SWI calibration interrupt storm mac80211: fix ibss join with fixed-bssid libertas: Remove carrier signaling from the scan code orinoco: fix GFP_KERNEL in orinoco_set_key with interrupts disabled ... commit f39edadd1533713a5ed8ba31887ea6c93d137083 Merge: 7ea6600 f590826 Author: Linus Torvalds Date: Wed Dec 30 12:36:58 2009 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: hwrng: core - Fix double unlock in rng_dev_read commit 7ea6600148c265b1fd53e521022b1d7aec81d974 Author: Serge E. Hallyn Date: Tue Dec 29 14:50:19 2009 -0600 generic_permission: MAY_OPEN is not write access generic_permission was refusing CAP_DAC_READ_SEARCH-enabled processes from opening DAC-protected files read-only, because do_filp_open adds MAY_OPEN to the open mask. Ignore MAY_OPEN. After this patch, CAP_DAC_READ_SEARCH is again sufficient to open(fname, O_RDONLY) on a file to which DAC otherwise refuses us read permission. Reported-by: Mike Kazantsev Signed-off-by: Serge E. Hallyn Tested-by: Mike Kazantsev Signed-off-by: Linus Torvalds commit 9a7262a0563da6b91019156abf487bcdf1a41526 Author: Mike Travis Date: Mon Dec 28 13:28:25 2009 -0800 x86_64 SGI UV: Fix writes to led registers on remote uv hubs. The wrong address was being used to write the SCIR led regs on remote hubs. Also, there was an inconsistency between how BIOS and the kernel indexed these regs. Standardize on using the lower 6 bits of the APIC ID as the index. This patch fixes the problem of writing to an errant address to a cpu # >= 64. Signed-off-by: Mike Travis Reviewed-by: Jack Steiner Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit 66f0dc481e5b802ab363b979fc1753410c7d82b5 Author: Hugh Dickins Date: Wed Dec 30 20:17:34 2009 +0000 mm: move sys_mmap_pgoff from util.c Move sys_mmap_pgoff() from mm/util.c to mm/mmap.c and mm/nommu.c, where we'd expect to find such code: especially now that it contains the MAP_HUGETLB handling. Revert mm/util.c to how it was in 2.6.32. This patch just ignores MAP_HUGETLB in the nommu case, as in 2.6.32, whereas 2.6.33-rc2 reported -ENOSYS. Perhaps validate_mmap_request() should reject it with -EINVAL? Add that later if necessary. Signed-off-by: Hugh Dickins Signed-off-by: Linus Torvalds commit 75c85a0bc13367aabb36e8208d4e373b022b43b3 Author: James Bottomley Date: Wed Dec 30 13:21:06 2009 -0600 libsrp: fix compile failure commit 45465487897a1c6d508b14b904dc5777f7ec7e04 ("kfifo: move struct kfifo in place") caused a compile failure in ibmvscsitgt.c because it changed a pointer to kfifo in the libsrp.h structure to a direct inclusion without including . The fix is simple, just add the include, but how did this happen? This change, introduced at -rc2, hardly looks like a bug fix, and it clearly didn't go through linux-next, which would have picked up this compile failure (it only occurs on ppc because of the ibm virtual scsi target). [ Apparently all of -mm wasn't in linux-next.. ] Signed-off-by: James Bottomley Signed-off-by: Linus Torvalds commit c2b27ef672992a206e5b221b8676972dd840ffa5 Author: Dmitry Torokhov Date: Wed Dec 30 12:18:24 2009 -0800 Input: iforce - wait for command completion when closing the device We need to wait for the command to disable FF effects to complete before continuing with closing the device. Tested-by: Johannes Ebke Signed-off-by: Dmitry Torokhov commit 0637c6f4135f592f094207c7c21e7c0fc5557834 Author: Theodore Ts'o Date: Wed Dec 30 14:20:45 2009 -0500 ext4: Patch up how we claim metadata blocks for quota purposes As reported in Kernel Bugzilla #14936, commit d21cd8f triggered a BUG in the function ext4_da_update_reserve_space() found in fs/ext4/inode.c. The root cause of this BUG() was caused by the fact that ext4_calc_metadata_amount() can severely over-estimate how many metadata blocks will be needed, especially when using direct block-mapped files. In addition, it can also badly *under* estimate how much space is needed, since ext4_calc_metadata_amount() assumes that the blocks are contiguous, and this is not always true. If the application is writing blocks to a sparse file, the number of metadata blocks necessary can be severly underestimated by the functions ext4_da_reserve_space(), ext4_da_update_reserve_space() and ext4_da_release_space(). This was the cause of the dq_claim_space reports found on kerneloops.org. Unfortunately, doing this right means that we need to massively over-estimate the amount of free space needed. So in some cases we may need to force the inode to be written to disk asynchronously in to avoid spurious quota failures. http://bugzilla.kernel.org/show_bug.cgi?id=14936 Signed-off-by: "Theodore Ts'o" commit fb7ae981cb9fe8665b9da97e8734745e030c151d Author: Lai Jiangshan Date: Tue Dec 15 15:39:38 2009 +0800 tracing: Fix sign fields in ftrace_define_fields_##call() Add is_signed_type() call to trace_define_field() in ftrace macros. The code previously just passed in 0 (false), disregarding whether or not the field was actually a signed type. Signed-off-by: Lai Jiangshan LKML-Reference: <4B273D3A.6020007@cn.fujitsu.com> Signed-off-by: Steven Rostedt commit e96dc9674cb597de4fee757ed005c8465072d13f Author: Lai Jiangshan Date: Tue Dec 15 15:39:26 2009 +0800 tracing/syscalls: Fix typo in SYSCALL_DEFINE0 The struct syscall_metadata variable name in SYSCALL_DEFINE0 should be __syscall_meta__##sname instead of __syscall_meta_##sname to match the name that is in SYSCALL_DEFINE1/2/3/4/5/6. This error causes event_enter_##sname->data to point to the wrong location, which causes syscalls which are defined by SYSCALL_DEFINE0() not to be traced. Signed-off-by: Lai Jiangshan LKML-Reference: <4B273D2E.1010807@cn.fujitsu.com> Acked-by: Frederic Weisbecker Signed-off-by: Steven Rostedt commit 79b408210885b9f7f0b067b07a09d68f4da3a700 Author: Lai Jiangshan Date: Tue Dec 15 15:39:19 2009 +0800 tracing/kprobe: Show sign of fields in trace_kprobe format files The format files of trace_kprobe do not show the sign of the fields. The other format files show the field signed type of the fields and this patch makes the trace_kprobe formats consistent with the others. Signed-off-by: Lai Jiangshan LKML-Reference: <4B273D27.5040009@cn.fujitsu.com> Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt commit f405d2c02395a74d3883bd03ded36457aa3697ad Author: FUJITA Tomonori Date: Mon Dec 28 18:11:56 2009 +0900 x86/agp: Fix agp_amd64_init() initialization with CONFIG_GART_IOMMU enabled with CONFIG_GART_IOMMU enabled drivers/char/agp/amd64-agp.c has: #ifndef CONFIG_GART_IOMMU module_init(agp_amd64_init); module_exit(agp_amd64_cleanup); #endif agp_amd64_init() was called via gart_iommu_init with CONFIG_GART_IOMMU=y agp_amd64_init() was called via module_init with CONFIG_GART_IOMMU=n The commit 75f1cdf1dda92cae037ec848ae63690d91913eac changes the x86 dma initialization routine: gart_iommu_init() is called only when GART IOMMU is detected. So when GART IOMMU isn't detected, agp_amd64_init isn't called. Marin Mitov reported this issue: http://marc.info/?l=linux-kernel&m=126192729110083&w=2 With this patch, agp_amd64_init() is always called via module_init (the above ifndef is removed). If agp_amd64_init() is called via gart_iommu_init() earlier, agp_amd64_init() finishes without doing anything (when it is called via module_init). Reported-by: Marin Mitov Tested-by: Marin Mitov Signed-off-by: FUJITA Tomonori Cc: davej@redhat.com LKML-Reference: <20091228181118C.fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar commit cccc67a4cf52a952e6371ac75510994e0bddec96 Merge: b943aa8 e01ce79 Author: Len Brown Date: Wed Dec 30 02:51:38 2009 -0500 Merge branch 'video-error-case' into release commit b943aa83f8038959999a6b12e469a875ab245a36 Merge: ea840aa 28c32e9 Author: Len Brown Date: Wed Dec 30 02:51:31 2009 -0500 Merge branch 'bugzilla-13671' into release commit ea840aa2d01cf107b331d04ddea46efaee583a83 Merge: 1ae22af 6e5b08e Author: Len Brown Date: Wed Dec 30 02:51:05 2009 -0500 Merge branch 'thinkpad' into release commit 1ae22af7d750fbf665b7651fcbd3c15cc2d3793b Merge: 27d0567 d1f9e49 Author: Len Brown Date: Wed Dec 30 02:51:01 2009 -0500 Merge branch 'wmi' into release commit d1f9e4970742bb1e22d07b01bd44f9c357d25c42 Author: Carlos Corbacho Date: Sat Dec 26 19:14:59 2009 +0000 ACPI: WMI: Survive BIOS with duplicate GUIDs It would appear that in BIOS's with nVidia hooks, the GUID 05901221-D566-11D1-B2F0-00A0C9062910 is duplicated. For now, the simplest solution is to just ignore any duplicate GUIDs. These particular hooks are not currently supported/ used in the kernel, so whoever does that can figure out what the 'right' solution should be (if there's a better one). http://bugzilla.kernel.org/show_bug.cgi?id=14846 Signed-off-by: Carlos Corbacho Reported-by: Larry Finger Reported-by: Oldřich Jedlička Signed-off-by: Len Brown commit 7a9568f536754623738110a314ff33286cdbb17d Author: Dmitry Torokhov Date: Fri Dec 25 11:49:35 2009 -0800 dell-wmi - fix condition to abort driver loading From: Dmitry Torokhov The commit 1fdd407f4e3f2ecb453954cbebb6c22491c61853 incorrectly made driver abort loading when known GUID is present when it should have done exactly the opposite. Signed-off-by: Dmitry Torokhov Signed-off-by: Len Brown commit c03b26a5a5597a59b2e247d005d5901430109a8a Author: Paul Rolland Date: Wed Dec 30 01:07:40 2009 -0500 wmi: check find_guid() return value to prevent oops Signed-off-by: Paul Rolland Signed-off-by: Len Brown commit fda11e61ff8a4e3a8ebbd434e46560b67cc0ca9d Author: Len Brown Date: Sat Dec 26 23:02:24 2009 -0500 dell-wmi, hp-wmi, msi-wmi: check wmi_get_event_data() return value When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. The callers of wmi_get_event_data() pass ACPI_ALLOCATE_BUFFER, and thus must check its return value before accessing or kfree() on the buffer. Signed-off-by: Len Brown commit f27725756be8a2c2dc65eaf70d0b52807aa2f113 Author: Len Brown Date: Sat Dec 26 22:04:03 2009 -0500 ACPI: hp-wmi, msi-wmi: clarify that wmi_install_notify_handler() returns an acpi_status Emphasize that that wmi_install_notify_handler() returns an acpi_status rather than -errno by by testing ACPI_SUCCESS(), ACPI_FAILURE(). No functional change in this patch, but this confusion caused a bug in dell-wmi. Signed-off-by: Len Brown commit abb631bfe271a9102fb5b05419272b7aec37a974 Author: Len Brown Date: Sat Dec 26 21:51:38 2009 -0500 dell-wmi: sys_init_module: 'dell_wmi'->init suspiciously returned 21, it should follow 0/-E convention wmi_install_notify_handler() returns an acpi_error, but dell_wmi_init() needs return a -errno style error. Tested-by: Paul Rolland Signed-off-by: Len Brown commit 9bd3f98821a83041e77ee25158b80b535d02d7b4 Author: Gui Jianfeng Date: Wed Dec 30 08:41:07 2009 +0100 block: blk_rq_err_sectors cleanup blk_rq_err_sectors() seems useless, get rid of it. Signed-off-by: Gui Jianfeng Signed-off-by: Jens Axboe commit 70f944139084c4f297ac90b3af4cb67a8a68b2cf Author: Felipe Balbi Date: Tue Dec 29 23:16:28 2009 -0800 Input: twl4030-pwrbutton - switch to using threaded IRQ Signed-off-by: Felipe Balbi Signed-off-by: Dmitry Torokhov commit 3f58061d0160424d244e3a72258a1366ab4a8547 Author: Felipe Balbi Date: Tue Dec 29 23:15:51 2009 -0800 Input: twl4030_keypad - switch to using threaded IRQ Signed-off-by: Felipe Balbi Signed-off-by: Dmitry Torokhov commit 614af4eeb9e89806c001dab50c59e11f40753601 Author: Dmitry Torokhov Date: Tue Dec 29 23:19:31 2009 -0800 Input: lifebook - add CONFIG_DMI dependency Lifebook protocol can only be activated if we find known DMI signature. It is useles without DMI. Reported-by: Rakib Mullick Signed-off-by: Dmitry Torokhov commit e97006ae1c87f9630b6f5c4d4384921059d881a8 Author: Rakib Mullick Date: Tue Dec 29 23:19:31 2009 -0800 Input: wistron - fix test for CONFIG_PM This should fix the following compile warning: drivers/input/misc/wistron_btns.c:1331:5: warning: "CONFIG_PM" is not defined Signed-off-by: Rakib Mullick Signed-off-by: Dmitry Torokhov commit c6bde2d9cb75a41cd2b331953784843b4caa89df Author: René Bolldorf Date: Tue Dec 29 23:06:52 2009 -0800 Input: psmouse - fix compile warning in hgpk module The variable 'dev' is unused in function 'hgpk_register'. Signed-off-by: Dmitry Torokhov commit e01ce79b7f6ebc5b57128ee058811aa8f9059319 Author: Zhang Rui Date: Wed Jul 29 08:53:29 2009 +0800 ACPI video: correct error-handling code backlight_device_register may return an ERR_PTR value rather than a valid pointer. Problem found by Julia Lawall, properly fixed by Zhang Rui. Signed-off-by: Zhang Rui Acked-by: Julia Lawall Signed-off-by: Len Brown commit 53ab668064edaeef99c0ee22799483d45f4c81f6 Author: Li Zefan Date: Wed Dec 30 14:24:03 2009 +0800 ksym_tracer: Remove trace_stat trace_stat is problematic. Don't use it, use seqfile instead. This fixes a race that reading the stat file is not protected by any lock, which can lead to use after free. Signed-off-by: Li Zefan Cc: Steven Rostedt Cc: K.Prasad Cc: Frederic Weisbecker LKML-Reference: <4B3AF203.40200@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit e6d9491bf8ba6728cc86aeabbc688d20ec0563b5 Author: Li Zefan Date: Wed Dec 30 14:23:40 2009 +0800 ksym_tracer: Fix race when incrementing count We are under rcu read section but not holding the write lock, so count++ is not atomic. Use atomic64_t instead. Signed-off-by: Li Zefan Cc: Steven Rostedt Cc: K.Prasad Cc: Frederic Weisbecker LKML-Reference: <4B3AF1EC.9010608@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 3d13ec2efdb5843ad91e57b60d50b44d922cf063 Author: Li Zefan Date: Wed Dec 30 14:23:19 2009 +0800 ksym_tracer: Fix to allow writing newline to ksym_trace_filter It used to work, but now doesn't: # echo > ksym_filter bash: echo: write error: Invalid argument It's caused by d954fbf0ff6b5fdfb32350e85a2f15d3db976506 ("tracing: Fix wrong usage of strstrip in trace_ksyms"). Signed-off-by: Li Zefan Cc: Steven Rostedt Cc: K.Prasad Cc: Frederic Weisbecker LKML-Reference: <4B3AF1D7.5040400@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 88f7a890d74137ab0d126a5d65679cd620f1a289 Author: Li Zefan Date: Wed Dec 30 14:22:22 2009 +0800 ksym_tracer: Fix to make the tracer work ksym tracer doesn't work: # echo tasklist_lock:rw- > ksym_trace_filter -bash: echo: write error: No such device It's because we pass to perf_event_create_kernel_counter() a cpu number which is not present. Signed-off-by: Li Zefan Cc: Steven Rostedt Cc: K.Prasad Cc: Frederic Weisbecker LKML-Reference: <4B3AF19E.1010201@cn.fujitsu.com> Signed-off-by: Ingo Molnar commit 28c32e99bdf5ab838e7179c1aaca5a35a07f2a2b Author: Zhang Rui Date: Mon Jul 13 10:33:24 2009 +0800 ACPI video: no warning message if "acpi_backlight=vendor" is used AML code always sends notifications to ACPI video device, even if we disable the ACPI backlight control by using boot option "acpi_backlight=vendor". In this case we should not print any warning message. http://bugzilla.kernel.org/show_bug.cgi?id=13671#c14 Sigend-off-by: Zhang Rui Signed-off-by: Len Brown commit 27d0567ab635bc2af11be48f91c8d5a7a2dca2e4 Author: Ingo Molnar Date: Thu Dec 17 08:50:25 2009 +0100 ACPI: fix ACPI=n allmodconfig build Today's -tip failed to build because commit 9e368fa011d4e0aa050db348d69514900520e40b ("ipmi: add PNP discovery (ACPI namespace via PNPACPI)") from today's upstream kernel causes the following build failure on x86, for CONFIG_ACPI=n && CONFIG_IPMI_SI=y: drivers/char/ipmi/ipmi_si_intf.c:3208: error: 'ipmi_pnp_driver' undeclared (first use in this function) drivers/char/ipmi/ipmi_si_intf.c:3208: error: (Each undeclared identifier is reported only once drivers/char/ipmi/ipmi_si_intf.c:3208: error: for each function it appears in.) drivers/char/ipmi/ipmi_si_intf.c:3334: error: 'ipmi_pnp_driver' undeclared (first use in this function) The reason is that the ipmi_pnp_driver depends on ACPI facilities and is only made available under ACPI - while the registration and unregistration is made dependent on CONFIG_PNP: #ifdef CONFIG_PNP pnp_register_driver(&ipmi_pnp_driver); #endif The solution is to only register this driver under ACPI. (Also, the CONFIG_PNP dependency is not needed because pnp_register_driver() is stubbed out in the !CONFIG_PNP case.) Signed-off-by: Ingo Molnar Acked-by: Myron Stowe Signed-off-by: Len Brown commit 515f41c33a9d44a964264c9511ad2c869af1fac3 Author: Aneesh Kumar K.V Date: Tue Dec 29 23:39:06 2009 -0500 ext4: Ensure zeroout blocks have no dirty metadata This fixes a bug (found by Curt Wohlgemuth) in which new blocks returned from an extent created with ext4_ext_zeroout() can have dirty metadata still associated with them. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Curt Wohlgemuth Signed-off-by: "Theodore Ts'o" commit 404e4b43fdd6daa7b4a9f81bc7e4358281d763fa Author: NeilBrown Date: Wed Dec 30 15:25:23 2009 +1100 md: allow a resync that is waiting for other resync to complete, to be aborted. If two arrays share a device, then they will not both resync at the same time. One will wait for the other to complete. While waiting, the MD_RECOVERY_INTR flag is not checked so a device failure, which would make the resync pointless, does not cause the resync to abort, so the failed device cannot be removed (as it cannot be remove while a resync is happening). So add a test for MD_RECOVERY_INTR. Reported-by: Brett Russ Signed-off-by: NeilBrown commit 7fb9dadc91948ddd16d1d32e414b5e71ec63b97b Author: NeilBrown Date: Wed Dec 30 15:19:08 2009 +1100 md: remove unnecessary code from do_md_run Since commit dfc7064500061677720fa26352963c772d3ebe6b, ->hot_remove_disks has not removed non-failed devices from an array until recovery is no longer possible. So the code in do_md_run to get around the fact that md_check_recovery (which calls ->hot_remove_disks) would remove partially-in-sync devices is no longer needed. So remove it. Signed-off-by: NeilBrown commit a2d79c324ac0c26ae9995a312a7731067a7f01fc Author: Dan Williams Date: Mon Dec 21 18:18:36 2009 -0700 md: make recovery started by do_md_run() visible via sync_action By default md_do_sync() will perform recovery if no other actions are specified. However, action_show() relies on MD_RECOVERY_RECOVER to be set otherwise it returns 'idle'. So, add a missing set MD_RECOVERY_RECOVER when starting recovery. Signed-off-by: Dan Williams Signed-off-by: NeilBrown commit 0f9552b5dc4fe10da37fa3f4a4ca185d90fa41c9 Author: NeilBrown Date: Wed Dec 30 12:08:50 2009 +1100 md: fix small irregularity with start_ro module parameter The start_ro modules parameter can be used to force arrays to be started in 'auto-readonly' in which they are read-only until the first write. This ensures that no resync/recovery happens until something else writes to the device. This is important for resume-from-disk off an md array. However if an array is started 'readonly' (by writing 'readonly' to the 'array_state' sysfs attribute) we want it to be really 'readonly', not 'auto-readonly'. So strengthen the condition to only set auto-readonly if the array is not already read-only. Signed-off-by: NeilBrown commit 7f9d3577e2603ca279c3176b696eba392f21cbe2 Merge: 96c5340 55afc80 Author: David S. Miller Date: Tue Dec 29 19:44:25 2009 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 commit cbd1998377504df005302ac90d49db72a48552a6 Author: NeilBrown Date: Wed Dec 30 12:08:49 2009 +1100 md: Fix unfortunate interaction with evms evms configures md arrays by: open device send ioctl close device for each different ioctl needed. Since 2.6.29, the device can disappear after the 'close' unless a significant configuration has happened to the device. The change made by "SET_ARRAY_INFO" can too minor to stop the device from disappearing, but important enough that losing the change is bad. So: make sure SET_ARRAY_INFO sets mddev->ctime, and keep the device active as long as ctime is non-zero (it gets zeroed with lots of other things when the array is stopped). This is suitable for -stable kernels since 2.6.29. Signed-off-by: NeilBrown Cc: stable@kernel.org commit 98ea3f50bcc97689cc0e1fa3b6733f03aeb8fef4 Author: Frederic Weisbecker Date: Tue Dec 29 21:51:15 2009 +0100 reiserfs: Fix remaining in-reclaim-fs <-> reclaim-fs-on locking inversion Commit 500f5a0bf5f0624dae34307010e240ec090e4cde (reiserfs: Fix possible recursive lock) fixed a vmalloc under reiserfs lock that triggered a lockdep warning because of a IN-FS-RECLAIM <-> RECLAIM-FS-ON locking dependency inversion. But this patch has ommitted another vmalloc call in the same path that allocates the journal. Relax the lock for this one too. Reported-by: Alexander Beregalov Signed-off-by: Frederic Weisbecker Cc: Chris Mason Cc: Ingo Molnar commit 55afc80b2ab100618c17af77915f75307b6bd5d1 Author: John W. Linville Date: Tue Dec 29 14:07:42 2009 -0500 Revert "b43: Enforce DMA descriptor memory constraints" This reverts commit 9bd568a50c446433038dec2a5186c5c57c3dbd23. That commit is shown to cause allocation failures during initialization on some machines. http://bugzilla.kernel.org/show_bug.cgi?id=14844 Signed-off-by: John W. Linville commit 5d7db0499e5bb13381a7fbfdd0d913b966545e75 Author: Stefan Richter Date: Sat Dec 26 01:36:53 2009 +0100 firewire, ieee1394: update Kconfig help Update the Kconfig help texts of both stacks to encourage a general move from the older to the newer drivers. However, do not label ieee1394 as "Obsolete" yet, as the newer drivers have not been deployed as default stack in the majority of Linux distributions yet, and those who start doing so now may still want to install the old drivers as fallback for unforeseen issues. Since Linux 2.6.32, FireWire audio devices can be driven by the newer firewire driver stack too, hence remove an outdated comment about audio devices. Also remove comments about library versions since the 2nd generation of libraw1394 and libdc1394 is now in common use; details on library versions can be read at the wiki link from the help texts. Signed-off-by: Stefan Richter commit 958a29cb1c9161d61dcd4ced51f260578e19823c Author: Stefan Richter Date: Sat Dec 26 01:36:12 2009 +0100 firewire, ieee1394: update MAINTAINERS entries Ben and Kristian have not been involved in maintenance of the IEEE 1394 drivers for quite some time; submitters are not required to Cc them on patches. The linux1394.org domain has been dead for a while and is no longer under control of a Linux developer. The current web site of the Linux 1394 project is http://ieee1394.wiki.kernel.org/. The classic drivers/ieee1394/ stack is now obsolete from the development point of view, though still a useful alternative in productive use. But nobody should attempt to submit style cleanup patches for it or to develop new drivers on top of this stack, hence mark its MAINTAINERS entry as Obsolete. drivers/ieee1394/raw1394*, like the rest of the old stack, does not receive bigger code changes anymore, hence shrink the MAINTAINERS database a bit by dropping raw1394's special entry. If something important and urgent is going to come up for raw1394, I will make sure that Dan will be notified of it besides via linux1394-devel. Signed-off-by: Stefan Richter Signed-off-by: Dan Dennedy Cc: Ben Collins Cc: Kristian Hoegsberg commit 090699c0530ae5380a9b8511d76f656cc437bb6e Author: Stefan Richter Date: Sat Dec 26 01:35:14 2009 +0100 firewire: ohci: always use packet-per-buffer mode for isochronous reception This is a minimal change meant for the short term: Never set the ohci->use_dualbuffer flag to true. There are two reasons to do so: - Packet-per-buffer mode and dual-buffer mode do not behave the same under certain circumstances, notably if several packets are covered by a single fw_cdev_iso_packet descriptor. http://marc.info/?l=linux1394-devel&m=124965653718313 Therefore the driver stack should not silently choose one or the other mode but should leave the choice to the high-level driver (regardless if kernel driver or userspace driver). Or simply always only offer packet-per-buffer mode, since a considerable number of controllers, even current ones, does not offer dual-buffer support. - Even under circumstances where packet-per-buffer mode and dual-buffer mode behave exactly the same --- notably when used through libraw1394, libdc1394, as well as the current two kernel drivers which use isochronous reception (firewire-net and firedtv) --- we are still faced with the problem that several OHCI 1.1 controllers have bugs in dual-buffer mode. Although it looks like we have identified most of those buggy controllers by now, we cannot be quite sure about that. So, use packet-per-buffer by default from now on. This change should be followed up by a more complete solution: Either extend the in-kernel API and the userspace ABI by a choice between the two IR modes or remove all dual-buffer related code from firewire-ohci. Signed-off-by: Stefan Richter commit cf0e575dcc4cab9fd955e9bec49df7e8ee30a7cf Author: Stefan Richter Date: Sat Dec 26 01:34:29 2009 +0100 firewire: cdev: fix another memory leak in an error path If copy_from_user in an FW_CDEV_IOC_SEND_RESPONSE ioctl failed, the fw_request pointed to by the inbound_transaction_resource is no longer referenced and needs to be freed. Signed-off-by: Stefan Richter commit db5d247ae811f49185a71e703b65acad845e4b18 Author: Clemens Ladisch Date: Thu Dec 24 12:05:58 2009 +0100 firewire: fix use of multiple AV/C devices, allow multiple FCP listeners Control of more than one AV/C device at once --- e.g. camcorders, tape decks, audio devices, TV tuners --- failed or worked only unreliably, depending on driver implementation. This affected kernelspace and userspace drivers alike and was caused by firewire-core's inability to accept multiple registrations of FCP listeners. The fix allows multiple address handlers to be registered for the FCP command and response registers. When a request for these registers is received, all handlers are invoked, and the Firewire response is generated by the core and not by any handler. The cdev API does not change, i.e., userspace is still expected to send a response for FCP requests; this response is silently ignored. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter (changelog, rebased, whitespace) commit e79e95db5cffb2e01170d510686489c40937faa1 Author: OGAWA Hirofumi Date: Tue Dec 29 08:53:54 2009 +0100 block: Honor the gfp_mask for alloc_page() in blkdev_issue_discard() Signed-off-by: OGAWA Hirofumi Signed-off-by: Jens Axboe commit 81744ee44ab2845c16ffd7d6f762f7b4a49a4750 Author: Martin K. Petersen Date: Tue Dec 29 08:35:35 2009 +0100 block: Fix incorrect alignment offset reporting and update documentation queue_sector_alignment_offset returned the wrong value which caused partitions to report an incorrect alignment_offset. Since offset alignment calculation is needed several places it has been split into a separate helper function. The topology stacking function has been updated accordingly. Furthermore, comments have been added to clarify how the stacking function works. Signed-off-by: Martin K. Petersen Tested-by: Mike Snitzer Signed-off-by: Jens Axboe commit 39d30770992895d55789de64bad2349510af68d0 Author: Mike Travis Date: Mon Dec 28 13:28:25 2009 -0800 x86: SGI UV: Fix writes to led registers on remote uv hubs The wrong address was being used to write the SCIR led regs on remote hubs. Also, there was an inconsistency between how BIOS and the kernel indexed these regs. Standardize on using the lower 6 bits of the APIC ID as the index. This patch fixes the problem of writing to an errant address to a cpu # >= 64. Signed-off-by: Mike Travis Reviewed-by: Jack Steiner Cc: Robin Holt Cc: Linus Torvalds Cc: stable@kernel.org LKML-Reference: <4B3922F9.3060905@sgi.com> [ v2: fix a number of annoying checkpatch artifacts and whitespace noise ] Signed-off-by: Ingo Molnar commit 6c853da3f30c93eae847ecbcd9fdf10ba0da04c2 Author: Zhu Yi Date: Mon Dec 28 14:23:11 2009 +0800 iwmc3200wifi: fix array out-of-boundary access Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH(). Cc: stable@kernel.org Signed-off-by: Zhu Yi Signed-off-by: John W. Linville commit e8a4a6df7397eb3b43ad3139d3fe9b41df70d6b0 Author: Roel Kluin Date: Sat Dec 26 20:31:59 2009 +0100 wl1251: timeout one too soon in wl1251_boot_run_firmware() `loop' reaches INIT_LOOP + 1 after the loop. so if ACX_INTR_INIT_COMPLETE occurs in the last iteration the write occurs but also the error out as if a timeout occurred. This is probably very unlikely to ever occur. Signed-off-by: Roel Kluin Acked-by: Kalle Valo Signed-off-by: John W. Linville commit 24feda0084722189468a65e20019cdd8ef99702b Author: Luis R. Rodriguez Date: Thu Dec 24 15:38:22 2009 -0500 mac80211: fix propagation of failed hardware reconfigurations mac80211 does not propagate failed hardware reconfiguration requests. For suspend and resume this is important due to all the possible issues that can come out of the suspend <-> resume cycle. Not propagating the error means cfg80211 will assume the resume for the device went through fine and mac80211 will continue on trying to poke at the hardware, enable timers, queue work, and so on for a device which is completley unfunctional. The least we can do is to propagate device start issues and warn when this occurs upon resume. A side effect of this patch is we also now propagate the start errors upon harware reconfigurations (non-suspend), but this should also be desirable anyway, there is not point in continuing to reconfigure a device if mac80211 was unable to start the device. For further details refer to the thread: http://marc.info/?t=126151038700001&r=1&w=2 Cc: stable@kernel.org Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit b98c06b6debfe84c90200143bb1102f312f50a33 Author: Luis R. Rodriguez Date: Thu Dec 24 15:26:09 2009 -0500 mac80211: fix race with suspend and dynamic_ps_disable_work When mac80211 suspends it calls a driver's suspend callback as a last step and after that the driver assumes no calls will be made to it until we resume and its start callback is kicked. If such calls are made, however, suspend can end up throwing hardware in an unexpected state and making the device unusable upon resume. Fix this by preventing mac80211 to schedule dynamic_ps_disable_work by checking for when mac80211 starts to suspend and starts quiescing. Frames should be allowed to go through though as that is part of the quiescing steps and we do not flush the mac80211 workqueue since it was already done towards the beginning of suspend cycle. The other mac80211 issue will be hanled in the next patch. For further details see refer to the thread: http://marc.info/?t=126144866100001&r=1&w=2 Cc: stable@kernel.org Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 5b479a076de091590423a9e6dfc2584126b28761 Author: Felix Fietkau Date: Thu Dec 24 14:04:32 2009 +0100 ath9k: fix missed error codes in the tx status check My previous change added in: commit 815833e7ecf0b9a017315cae6aef4d7cd9517681 ath9k: fix tx status reporting was not checking all possible tx error conditions. This could possibly lead to throughput issues due to slow rate control adaption or missed retransmissions of failed A-MPDU frames. This patch adds a mask for all possible error conditions and uses it in the xmit ok check. Cc: stable@kernel.org Reported-by: Björn Smedman Signed-off-by: Felix Fietkau Signed-off-by: John W. Linville commit 8b685ba9de803f210936400612a32a2003f47cd3 Author: Luis R. Rodriguez Date: Wed Dec 23 20:03:29 2009 -0500 ath9k: wake hardware during AMPDU TX actions AMDPDU actions poke hardware for TX operation, as such we want to turn hardware on for these actions. AMDPU RX operations do not require hardware on as nothing is done in hardware for those actions. Without this we cannot guarantee hardware has been programmed correctly for each AMPDU TX action. Cc: stable@kernel.org Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 5f70a88f631c3480107853cae12925185eb4c598 Author: Luis R. Rodriguez Date: Wed Dec 23 20:03:28 2009 -0500 ath9k: wake hardware for interface IBSS/AP/Mesh removal When we remove a IBSS/AP/Mesh interface we stop DMA but to do this we should ensure hardware is on. Awaken the device prior to these calls. This should ensure DMA is stopped upon suspend and plain device removal. Cc: stable@kernel.org Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville commit 3867cf6a8c699846e928e8f5a9f31013708df192 Author: Sujith Date: Wed Dec 23 20:03:27 2009 -0500 ath9k: fix suspend by waking device prior to stop Ensure the device is awake prior to trying to tell hardware to stop it. Impact of not doing this is we can likely leave the device in an undefined state likely causing issues with suspend and resume. This patch ensures harware is where it should be prior to suspend. Cc: stable@kernel.org Signed-off-by: Sujith Signed-off-by: John W. Linville commit 65486c8b30498dd274eea2c542696f22b63fe5b8 Author: Johannes Berg Date: Wed Dec 23 15:33:35 2009 +0100 cfg80211: fix error path in cfg80211_wext_siwscan If there's an invalid channel or SSID, the code leaks the scan request. Always free the scan request, unless it was successfully given to the driver. Reported-by: Dan Carpenter Signed-off-by: Johannes Berg Acked-by: Dan Carpenter Signed-off-by: John W. Linville commit befabac2d8e4925b97c5eebc78ecc4b2079fd9dd Author: Dan Carpenter Date: Wed Dec 23 15:23:19 2009 +0200 wl1271_cmd.c: cleanup char => u8 This is just a clean up and doesn't make a functional difference. It keeps the lint checkers happy. Signed-off-by: Dan Carpenter Reviewed-by: Kalle Valo Signed-off-by: John W. Linville commit 79496738eb896d1658d9f3cca98e474c5f31eea3 Author: Tobias Klauser Date: Wed Dec 23 14:18:11 2009 +0100 iwlwifi: Storage class should be before const qualifier The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser Acked-by: Zhu Yi Signed-off-by: John W. Linville commit 83bd11a06da8bd119cc517de84b3214df3a7a6d4 Author: Tobias Klauser Date: Wed Dec 23 14:04:43 2009 +0100 ath9k: Storage class should be before const qualifier The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser Signed-off-by: John W. Linville commit 3bdb2d48c5f58c781a4099c99044384a23620884 Author: Johannes Berg Date: Wed Dec 23 13:12:05 2009 +0100 cfg80211: fix race between deauth and assoc response Joseph Nahmias reported, in http://bugs.debian.org/562016, that he was getting the following warning (with some log around the issue): ath0: direct probe to AP 00:11:95:77:e0:b0 (try 1) ath0: direct probe responded ath0: authenticate with AP 00:11:95:77:e0:b0 (try 1) ath0: authenticated ath0: associate with AP 00:11:95:77:e0:b0 (try 1) ath0: deauthenticating from 00:11:95:77:e0:b0 by local choice (reason=3) ath0: direct probe to AP 00:11:95:77:e0:b0 (try 1) ath0: RX AssocResp from 00:11:95:77:e0:b0 (capab=0x421 status=0 aid=2) ath0: associated ------------[ cut here ]------------ WARNING: at net/wireless/mlme.c:97 cfg80211_send_rx_assoc+0x14d/0x152 [cfg80211]() Hardware name: 7658CTO ... Pid: 761, comm: phy0 Not tainted 2.6.32-trunk-686 #1 Call Trace: [] ? warn_slowpath_common+0x5e/0x8a [] ? warn_slowpath_null+0xa/0xc [] ? cfg80211_send_rx_assoc+0x14d/0x152 ... ath0: link becomes ready ath0: deauthenticating from 00:11:95:77:e0:b0 by local choice (reason=3) ath0: no IPv6 routers present ath0: link is not ready ath0: direct probe to AP 00:11:95:77:e0:b0 (try 1) ath0: direct probe responded ath0: authenticate with AP 00:11:95:77:e0:b0 (try 1) ath0: authenticated ath0: associate with AP 00:11:95:77:e0:b0 (try 1) ath0: RX ReassocResp from 00:11:95:77:e0:b0 (capab=0x421 status=0 aid=2) ath0: associated It is not clear to me how the first "direct probe" here happens, but this seems to be a race condition, if the user requests to deauth after requesting assoc, but before the assoc response is received. In that case, it may happen that mac80211 tries to report the assoc success to cfg80211, but gets blocked on the wdev lock that is held because the user is requesting the deauth. The result is that we run into a warning. This is mostly harmless, but maybe cause an unexpected event to be sent to userspace; we'd send an assoc success event although userspace was no longer expecting that. To fix this, remove the warning and check whether the race happened and in that case abort processing. Reported-by: Joseph Nahmias Cc: stable@kernel.org Cc: 562016-quiet@bugs.debian.org Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 671adc93b6472eaa0142a88d096c945f7b07893a Author: Johannes Berg Date: Wed Dec 23 13:12:04 2009 +0100 wireless: remove remaining qual code This removes the remaining users of the rx status 'qual' field and the field itself. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 5e31258945f60dff65952575625cac214a75893e Author: Gertjan van Wingerde Date: Wed Dec 23 00:03:21 2009 +0100 rt2x00: Add USB ID for Linksys WUSB 600N rev 2. This is a rt2870 based device. Signed-off-by: Gertjan van Wingerde Acked-by: Ivo van Doorn Signed-off-by: John W. Linville commit 242ab7ad689accafd5e87ffd22b85cf1bf7fbbef Author: Bob Copeland Date: Mon Dec 21 22:26:48 2009 -0500 ath5k: fix SWI calibration interrupt storm The calibration period is now invoked by triggering a software interrupt from within the ISR by ath5k_hw_calibration_poll() instead of via a timer. However, the calibration interval isn't initialized before interrupts are enabled, so we can have a situation where an interrupt occurs before the interval is assigned, so the interval is actually negative. As a result, the ISR will arm a software interrupt to schedule the tasklet, and then rearm it when the SWI is processed, and so on, leading to a softlockup at modprobe time. Move the initialization order around so the calibration interval is set before interrupts are active. Another possible fix is to schedule the tasklet directly from the poll routine, but I think there are additional plans for the SWI. Signed-off-by: Bob Copeland Cc: stable@kernel.org Signed-off-by: John W. Linville commit 2e10d330f8d5f039fa1e00baf59435ab0f11c722 Author: Felix Fietkau Date: Sun Dec 20 19:07:09 2009 +0100 mac80211: fix ibss join with fixed-bssid When fixed bssid is requested when joining an ibss network, incoming beacons that match the configured bssid cause mac80211 to create new sta entries, even before the ibss interface is in joined state. When that happens, it fails to bring up the interface entirely, because it checks for existing sta entries before joining. This patch fixes this bug by refusing to create sta info entries before the interface is fully operational. Signed-off-by: Felix Fietkau Signed-off-by: John W. Linville commit 659c8e5243caf14564155ad8421404f044dd8031 Author: Samuel Ortiz Date: Fri Dec 18 11:36:49 2009 +0100 libertas: Remove carrier signaling from the scan code There is no reason to signal a carrier off when doing a 802.11 scan. Cc: Holger Schurig Signed-off-by: Samuel Ortiz Acked-by: Dan Williams Signed-off-by: John W. Linville commit 5b0691508aa99d309101a49b4b084dc16b3d7019 Author: Andrey Borzenkov Date: Tue Dec 22 21:38:44 2009 +0300 orinoco: fix GFP_KERNEL in orinoco_set_key with interrupts disabled orinoco_set_key is called from two places both with interrupts disabled (under orinoco_lock). Use GFP_ATOMIC instead of GFP_KERNEL. Fixes following warning: [ 77.254109] WARNING: at /home/bor/src/linux-git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x9a/0xa0() [ 77.254109] Hardware name: PORTEGE 4000 [ 77.254109] Modules linked in: af_packet irnet ppp_generic slhc ircomm_tty ircomm binfmt_misc dm_mirror dm_region_hash dm_log dm_round_robin dm_multipath dm_mod loop nvram toshiba cryptomgr aead pcompress crypto_blkcipher michael_mic crypto_hash crypto_algapi orinoco_cs orinoco cfg80211 smsc_ircc2 pcmcia irda toshiba_acpi yenta_socket video i2c_ali1535 backlight rsrc_nonstatic ali_agp pcmcia_core psmouse output crc_ccitt i2c_core alim1535_wdt rfkill sg evdev ohci_hcd agpgart usbcore pata_ali libata reiserfs [last unloaded: scsi_wait_scan] [ 77.254109] Pid: 2296, comm: wpa_supplicant Not tainted 2.6.32-1avb #1 [ 77.254109] Call Trace: [ 77.254109] [] warn_slowpath_common+0x6d/0xa0 [ 77.254109] [] ? lockdep_trace_alloc+0x9a/0xa0 [ 77.254109] [] ? lockdep_trace_alloc+0x9a/0xa0 [ 77.254109] [] warn_slowpath_null+0x15/0x20 [ 77.254109] [] lockdep_trace_alloc+0x9a/0xa0 [ 77.254109] [] __kmalloc+0x36/0x130 [ 77.254109] [] ? orinoco_set_key+0x48/0x1c0 [orinoco] [ 77.254109] [] orinoco_set_key+0x48/0x1c0 [orinoco] [ 77.254109] [] orinoco_ioctl_set_encodeext+0x1dc/0x2d0 [orinoco] [ 77.254109] [] ioctl_standard_call+0x207/0x3b0 [ 77.254109] [] ? orinoco_ioctl_set_encodeext+0x0/0x2d0 [orinoco] [ 77.254109] [] ? rtnl_lock+0xf/0x20 [ 77.254109] [] ? rtnl_lock+0xf/0x20 [ 77.254109] [] ? __dev_get_by_name+0x85/0xb0 [ 77.254109] [] wext_handle_ioctl+0x176/0x200 [ 77.254109] [] ? orinoco_ioctl_set_encodeext+0x0/0x2d0 [orinoco] [ 77.254109] [] dev_ioctl+0x6af/0x730 [ 77.254109] [] ? move_addr_to_kernel+0x55/0x60 [ 77.254109] [] ? sys_sendto+0xe9/0x130 [ 77.254109] [] sock_ioctl+0x7e/0x250 [ 77.254109] [] ? sock_ioctl+0x0/0x250 [ 77.254109] [] vfs_ioctl+0x1c/0x70 [ 77.254109] [] do_vfs_ioctl+0x6a/0x590 [ 77.254109] [] ? might_fault+0x90/0xa0 [ 77.254109] [] ? might_fault+0x4a/0xa0 [ 77.254109] [] ? sys_socketcall+0x17e/0x280 [ 77.254109] [] sys_ioctl+0x39/0x60 [ 77.254109] [] sysenter_do_call+0x12/0x32 [ 77.254109] ---[ end trace 95ef563548d21efd ]--- Signed-off-by: Andrey Borzenkov Signed-off-by: John W. Linville commit 00afa758067ac1c947149ef766adcdfe30c44d7d Author: Pekka Enberg Date: Sun Dec 27 14:33:14 2009 +0200 SLAB: Fix lockdep annotation breakage Commit ce79ddc8e2376a9a93c7d42daf89bfcbb9187e62 ("SLAB: Fix lockdep annotations for CPU hotplug") broke init_node_lock_keys() off-slab logic which causes lockdep false positives. Fix that up by reverting the logic back to original while keeping CPU hotplug fixes intact. Reported-and-tested-by: Heiko Carstens Reported-and-tested-by: Andi Kleen Signed-off-by: Pekka Enberg commit 2f7a2d89a8b5915d89ad9ebeb0065db7d5831cea Author: Shaohua Li Date: Mon Dec 28 13:18:44 2009 +0100 cfq-iosched: don't regard requests with long distance as close seek_mean could be very big sometimes, using it as close criteria is meaningless as this doen't improve any performance. So if it's big, let's fallback to default value. Reviewed-by: Corrado Zoccolo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe commit 40892367bc893f3abf6f5ca8ac2ed1c98ba26a77 Author: Randy Dunlap Date: Mon Dec 21 12:01:17 2009 -0800 tracing: Kconfig spelling fixes and cleanups Fix filename reference (ftrace-implementation.txt -> ftrace-design.txt). Fix spelling, punctuation, grammar. Fix help text indentation and line lengths to reduce need for horizontal scrolling or larger window sizes. Signed-off-by: Randy Dunlap Cc: Steven Rostedt Cc: Frederic Weisbecker LKML-Reference: <20091221120117.3fb49cdc.randy.dunlap@oracle.com> Signed-off-by: Ingo Molnar commit 4efb5290ae187514bd31af8c2d7755e175245e19 Author: Wenji Huang Date: Mon Dec 21 17:52:55 2009 +0800 perf kmem: Fix statistics typo Replace bytes_req with bytes_alloc. Signed-off-by: Wenji Huang Reviewed-by: Li Zefan Cc: acme@redhat.com LKML-Reference: <1261389175-2227-1-git-send-email-wenji.huang@oracle.com> Signed-off-by: Ingo Molnar commit c0ca9da442df82b67095f230f24762042f9f3b7d Author: Pekka Enberg Date: Mon Dec 28 11:02:15 2009 +0200 x86, kmemcheck: Use KERN_WARNING for error reporting As suggested by Vegard Nossum, use KERN_WARNING for error reporting to make sure kmemcheck reports end up in syslog. Suggested-by: Vegard Nossum Signed-off-by: Pekka Enberg Cc: Andrew Morton LKML-Reference: <1261990935.4641.7.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit c2ef6661ce62e26a8c0978e521fab646128a144b Author: Heiko Carstens Date: Mon Dec 21 13:02:24 2009 +0100 kprobes: Fix distinct type warning Every time I see this: kernel/kprobes.c: In function 'register_kretprobe': kernel/kprobes.c:1038: warning: comparison of distinct pointer types lacks a cast I'm wondering if something changed in common code and we need to do something for s390. Apparently that's not the case. Let's get rid of this annoying warning. Signed-off-by: Heiko Carstens Acked-by: Ananth N Mavinakayanahalli Cc: Masami Hiramatsu LKML-Reference: <20091221120224.GA4471@osiris.boeblingen.de.ibm.com> Signed-off-by: Ingo Molnar commit d015a092989d673df44a5ad6866dc5d5006b7a2a Author: Pekka Enberg Date: Mon Dec 28 10:26:59 2009 +0200 x86: Use KERN_DEFAULT log-level in __show_regs() Andrew Morton reported a strange looking kmemcheck warning: WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (ffff88004fba6c20) 0000000000000000310000000000000000000000000000002413000000c9ffff u u u u u u u u u u u u u u u u i i i i i i i i u u u u u u u u [] kmemleak_scan+0x25a/0x540 [] kmemleak_scan_thread+0x5b/0xe0 [] kthread+0x9e/0xb0 [] kernel_thread_helper+0x4/0x10 [] 0xffffffffffffffff The above printout is missing register dump completely. The problem here is that the output comes from syslog which doesn't show KERN_INFO log-level messages. We didn't see this before because both of us were testing on 32-bit kernels which use the _default_ log-level. Fix that up by explicitly using KERN_DEFAULT log-level for __show_regs() printks. Signed-off-by: Pekka Enberg Cc: Vegard Nossum Cc: Andrew Morton Cc: Arjan van de Ven Cc: Linus Torvalds LKML-Reference: <1261988819.4641.2.camel@penberg-laptop> Signed-off-by: Ingo Molnar commit 605c1a187f3ce82fbc243e2163c5ca8d1926df8e Merge: 17a2a9b ce9277f Author: Ingo Molnar Date: Mon Dec 28 09:23:13 2009 +0100 Merge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into x86/urgent commit 0b413e44d64aeac36a096505a40fc2ff470872fa Author: Tim Blechmann Date: Sun Dec 27 14:43:06 2009 +0100 perf: Rename perf_event_hw_event in design document perf_event_hw_event has been renamed to perf_event_attr. The design document was still using the old name, though. Signed-off-by: Tim Blechmann Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <4B37646A.90108@klingt.org> Signed-off-by: Ingo Molnar commit 049ae80b8790bd3c150d78e3351dcc491e9f2416 Author: Arnaldo Carvalho de Melo Date: Sun Dec 27 21:36:58 2009 -0200 perf tools: Add missing header files to LIB_H Makefile variable So that changes in them trigger rebuilds, like when we're doing bisects. Signed-off-by: Arnaldo Carvalho de Melo Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1261957026-15580-2-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar commit d4db3f164529013b11a171bb1bd38e8681ddaec8 Author: Arnaldo Carvalho de Melo Date: Sun Dec 27 21:36:57 2009 -0200 perf record: We should fork only if a program was specified to run IOW: Now 'perf record -a' works, this was a bug introduced in: 856e96608a72412d319e498a3a7c557571f811bd "perf record: Properly synchronize child creation" Also fix the -C usage, i.e. allow for profiling all the tasks in one CPU. Reported-by: Pekka Enberg Signed-off-by: Arnaldo Carvalho de Melo Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1261957026-15580-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar commit b4329db0d7fd5a233866e799ad3bae8639e90c71 Author: Heiko Carstens Date: Fri Dec 18 09:41:43 2009 +0100 KVM: get rid of kvm_create_vm() unused label warning on s390 arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_create_vm': arch/s390/kvm/../../../virt/kvm/kvm_main.c:409: warning: label 'out_err' defined but not used Signed-off-by: Heiko Carstens Signed-off-by: Avi Kivity commit 5279aeb4b96cbdac22a0c2f8137dd0bbc35f02b8 Author: Alexander Graf Date: Sat Dec 19 18:07:39 2009 +0100 KVM: powerpc: Fix mtsrin in book3s_64 mmu We were shifting the Ks/Kp/N bits one bit too far on mtsrin. It took me some time to figure that out, so I also put in some debugging and a comment explaining the conversion. This fixes current OpenBIOS boot on PPC64 KVM. Signed-off-by: Alexander Graf Signed-off-by: Avi Kivity commit a662b8135a1f9fee7d3f9129498cb03f3d6ce772 Author: Luck, Tony Date: Thu Dec 17 17:05:03 2009 -0800 KVM: ia64: fix build breakage due to host spinlock change Len Brown pointed out that allmodconfig is broken for ia64 because of: arch/ia64/kvm/vmm.c: In function 'vmm_spin_unlock': arch/ia64/kvm/vmm.c:70: error: 'spinlock_t' has no member named 'raw_lock' KVM has it's own spinlock routines. It should not depend on the base kernel spinlock_t type (which changed when ia64 switched to ticket locks). Define its own vmm_spinlock_t type. Signed-off-by: Tony Luck Signed-off-by: Avi Kivity commit dab4b911a5327859bb8f969249c6978c26cd4853 Author: Jan Kiszka Date: Sun Dec 6 18:24:15 2009 +0100 KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates User space may not want to overwrite asynchronously changing VCPU event states on write-back. So allow to skip nmi.pending and sipi_vector by setting corresponding bits in the flags field of kvm_vcpu_events. [avi: advertise the bits in KVM_GET_VCPU_EVENTS] Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity commit 6e24a6eff4571002cd48b99a2b92dc829ce39cb9 Author: Marcelo Tosatti Date: Mon Dec 14 17:37:35 2009 -0200 KVM: LAPIC: make sure IRR bitmap is scanned after vm load The vcpus are initialized with irr_pending set to false, but loading the LAPIC registers with pending IRR fails to reset the irr_pending variable. Cc: stable@kernel.org Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit fae3a3536a6fecedebd49fa847f810e599bfb132 Author: Sheng Yang Date: Tue Dec 15 10:28:07 2009 +0800 KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device() One possible order is: KVM_CREATE_IRQCHIP ioctl(took kvm->lock) -> kvm_iobus_register_dev() -> down_write(kvm->slots_lock). The other one is in kvm_vm_ioctl_assign_device(), which take kvm->slots_lock first, then kvm->lock. Update the comment of lock order as well. Observe it due to kernel locking debug warnings. Cc: stable@kernel.org Signed-off-by: Sheng Yang Signed-off-by: Avi Kivity commit fb341f572d26e0786167cd96b90cc4febed830cf Author: Marcelo Tosatti Date: Sat Dec 5 12:34:11 2009 -0200 KVM: MMU: remove prefault from invlpg handler The invlpg prefault optimization breaks Windows 2008 R2 occasionally. The visible effect is that the invlpg handler instantiates a pte which is, microseconds later, written with a different gfn by another vcpu. The OS could have other mechanisms to prevent a present translation from being used, which the hypervisor is unaware of. While the documentation states that the cpu is at liberty to prefetch tlb entries, it looks like this is not heeded, so remove tlb prefetch from invlpg. Cc: stable@kernel.org Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity commit cc0db22afd9b963a4a78b634d360033bdda37650 Merge: fdfa682 54f7190 Author: Takashi Iwai Date: Sun Dec 27 13:36:25 2009 +0100 Merge branch 'fix/hda' into for-linus commit 54f7190b23080c7ac32078ed6a346bdc591ebef1 Author: Takashi Iwai Date: Sun Dec 27 13:27:39 2009 +0100 ALSA: hda - Fix Oops at reloading beep devices The recent change for supporting dynamic beep device allocation caused a problem resulting in Oops at reloading the driver. Also, it ignores the error from input device registration. This patch fixes the wrong check in snd_hda_detach_beep_device(), and returns an error when the input device registration fails properly. Signed-off-by: Takashi Iwai commit 411fe85c7653f51403c2a6fd9026b0db2ab19478 Author: Takashi Iwai Date: Sun Dec 27 10:25:58 2009 +0100 ALSA: hda - Don't cache beep controls The beep control verbs don't need to be cached for resume. Signed-off-by: Takashi Iwai commit 96c5340147584481ef0c0afbb5423f7563c1d24a Author: Ralf Baechle Date: Fri Dec 25 23:30:02 2009 +0000 NET: XFRM: Fix spelling of neighbour. Signed-off-by: Ralf Baechle net/xfrm/xfrm_policy.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: David S. Miller commit c99a3d2e04c63a795e13c26d6f2982731e1f1ae0 Author: Dan Carpenter Date: Wed Dec 23 03:27:10 2009 +0000 bond_3ad.c avoid possible null deref A few lines earlier we assume that best->slave could be either null or non-null so we should check it here as well. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 1f04493123763f5b8bc6d5de9aed0222345c052c Author: Daniel Drake Date: Thu Dec 24 08:11:24 2009 +0000 Fix MAC address access in 3c507, ibmlana, pcnet32 and libertas Commit f001fde5eadd915f4858d22ed70d7040f48767cf changed net_device.dev_addr from a 32-byte array to a pointer. I found 4 ethernet drivers which rely on sizeof(dev_addr), which are now only copying 4 bytes of the address information on 32bit systems. Fix them to use ETH_ALEN. Signed-off-by: Daniel Drake Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit f74dac0859bd9678b289ad9dc215026fd7ce033e Author: Sandeep Gopalpet Date: Thu Dec 24 03:13:06 2009 +0000 gianfar: Fix gianfar select_queue bogosity The gfar_select_queue() function was used to set queue mapping only for forwarding/bridging applications and the condition for locally generated packets was completely ignored. The solution is to remove the gfar_select_queue() function and use skb_record_rx_queue to set queue mapping for forwarding/bridging applications. This will ensure that in case of forwarding/bridging applications txq = rxq will be selected and skb_tx_hash will be used to pick up a txq for locally generated packets. Signed-off-by: Sandeep Gopalpet Signed-off-by: David S. Miller commit 80924e5f7dbe00d964b7249160c7ca25fa3cd889 Author: Vitaliy Gusev Date: Fri Dec 25 07:17:43 2009 +0000 tun: use tun_sk instead container_of Using macro tun_sk is more clear and shorter. However tun.c has tun_sk, but doesn't use it. Signed-off-by: Vitaliy Gusev Signed-off-by: David S. Miller commit 08fafd8461c0ca8d1b389b7dc11d17e7b2331282 Author: Anton Vorontsov Date: Thu Dec 24 05:31:20 2009 +0000 ucc_geth: Don't needlessly change MAC settings in adjust_link() If PHY doesn't have an IRQ, phylib would poll for link changes, and would call adjust_link() every second. In that case we disable and enable the controller every second. Let's better check if there is actually anything changed, and, if so, change the MAC settings. Signed-off-by: Anton Vorontsov Signed-off-by: David S. Miller commit 08b5e1c91ce95793c59a59529a362a1bcc81faae Author: Anton Vorontsov Date: Thu Dec 24 05:31:05 2009 +0000 ucc_geth: Fix netdev watchdog triggering on link changes Since commit 864fdf884e82bacbe8ca5e93bd43393a61d2e2b4 ("ucc_geth: Fix hangs after switching from full to half duplex") ucc_geth driver disables the controller during MAC configuration changes. Though, disabling the controller might take quite awhile, and so the netdev watchdog might get upset: NETDEV WATCHDOG: eth2 (ucc_geth): transmit queue 0 timed out ------------[ cut here ]------------ Badness at c02729a8 [verbose debug info unavailable] NIP: c02729a8 LR: c02729a8 CTR: c01b6088 REGS: c0451c40 TRAP: 0700 Not tainted (2.6.32-trunk-8360e) [...] NIP [c02729a8] dev_watchdog+0x280/0x290 LR [c02729a8] dev_watchdog+0x280/0x290 Call Trace: [c0451cf0] [c02729a8] dev_watchdog+0x280/0x290 (unreliable) [c0451d50] [c00377c4] run_timer_softirq+0x164/0x224 [c0451da0] [c0032a38] __do_softirq+0xb8/0x13c [c0451df0] [c00065cc] do_softirq+0xa0/0xac [c0451e00] [c003280c] irq_exit+0x7c/0x9c [c0451e10] [c00640c4] __ipipe_sync_stage+0x248/0x24c [...] This patch fixes the issue by detaching the netdev during the time we change the configuration. Reported-by: Lennart Sorensen Signed-off-by: Anton Vorontsov Tested-by: Lennart Sorensen Cc: Stable [2.6.32] Signed-off-by: David S. Miller commit 7583605b6d29f1f7f6fc505b883328089f3485ad Author: Anton Vorontsov Date: Thu Dec 24 05:31:03 2009 +0000 ucc_geth: Fix empty TX queue processing Following oops was seen with the ucc_geth driver: Unable to handle kernel paging request for data at address 0x00000058 Faulting instruction address: 0xc024f2fc Oops: Kernel access of bad area, sig: 11 [#1] [...] NIP [c024f2fc] skb_recycle_check+0x14/0x100 LR [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver] Call Trace: [df857d50] [c000b03c] __ipipe_grab_irq+0x3c/0xa4 (unreliable) [df857d60] [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver] [df857dd0] [c0258cf8] net_rx_action+0xf8/0x1b8 [df857e10] [c0032a38] __do_softirq+0xb8/0x13c [df857e60] [c00065cc] do_softirq+0xa0/0xac [...] This is because ucc_geth_tx() tries to process an empty queue when queues are logically stopped. Stopping the queues doesn't disable polling, and since nowadays ucc_geth_tx() is actually called from the polling routine, the oops above might pop up. Fix this by removing 'netif_queue_stopped() == 0' check. Reported-by: Lennart Sorensen Signed-off-by: Anton Vorontsov Tested-by: Lennart Sorensen Cc: Stable [2.6.32] Signed-off-by: David S. Miller commit 6e5b08ee941af38cfc6456158e7e04c1bc49306f Author: Henrique de Moraes Holschuh Date: Sat Dec 26 22:52:17 2009 -0200 thinkpad-acpi: improve Kconfig help text Document that rfkill and ALSA functionality exists, but requires the subsystems to be available, and not modular if thinkpad-acpi is not modular. Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit 169220f88f0f26f4450ac0bc8ff0f807b453ec58 Author: Henrique de Moraes Holschuh Date: Sat Dec 26 22:52:16 2009 -0200 thinkpad-acpi: update volume subdriver documentation Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit ff850c339a1a6a7724537160c73cdc09a483fc5d Author: Henrique de Moraes Holschuh Date: Sat Dec 26 22:52:15 2009 -0200 thinkpad-acpi: make volume subdriver optional Allow the user to choose through Kconfig if the Console Audio Control interface (aka "volume subdriver") should be available or not. This not only saves some memory, but also allows the thinkpad-acpi driver to be built-in even if ALSA is modular when the console audio control interface is not wanted. This change fixes a build problem that is causing some annoyances, in a way that doesn't disable the entire driver on kernels without ALSA support. Signed-off-by: Henrique de Moraes Holschuh Cc: Ingo Molnar Cc: Amerigo Wang Cc: Helight Xu Cc: Takashi Iwai Signed-off-by: Len Brown commit 74c75c1848b618f6717c1be887ad539ffac2e96d Author: Henrique de Moraes Holschuh Date: Sat Dec 26 22:52:14 2009 -0200 thinkpad-acpi: don't fail to load the entire module due to ALSA problems If we cannot create the ALSA mixer, it is a good reason to fail to load the volume subdriver, and not to fail to load the entire module. While at it, add more debugging messages, as the error paths are being used a lot more than I'd expect, and it is failing to set up the ALSA mixer on a number of ThinkPads. Reported-by: Peter Jordan Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit ead510cebcdf41c92fce2a909f342255b028a33d Author: Henrique de Moraes Holschuh Date: Sat Dec 26 22:52:13 2009 -0200 thinkpad-acpi: don't take the first ALSA slot by default We don't want to be the first soundcard. We don't want to shift other soundcards out of the way either, even if they load much later. Ask ALSA to (by default) load us in one of the last three slots. This can be overriden at will using the "index" parameter. Reported-by: Whoopie Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown commit fdfa68298816192d47fc7443d1e2f00fa1420985 Author: Masanari Iida Date: Sun Dec 27 00:09:45 2009 +0900 ALSA: Fix a typo in Procfile.txt Fix a typo in Documentation/sound/alsa/Procfile.txt Signed-off-by Masanari Iida Signed-off-by: Takashi Iwai commit 903b0eb39e3284cbf4d5a3773858e9586d16cbda Author: Peter Huewe Date: Sat Dec 26 03:27:45 2009 +0100 ALSA: sound/arm: Fix build failure caused by missing struct aaci definition This patch fixes a build failure introduced by the patch ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params [1] by adding/moving the aaci struct to the right position. The patch mentioned above merged common source parts into one function, but unfortunately left out the aaci struct and consequently caused a build failure e.g. for arm versatile_config [2] References: [1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d3aee7996c30f928bbbbfd0994148e35d2e83084 [2] http://kisskb.ellerman.id.au/kisskb/buildresult/1893605/ Patch against Linus' tree. Signed-off-by: Peter Huewe Signed-off-by: Takashi Iwai commit b3837ceca005890f1a328eb1a4204a9dc92b1b9f Author: Denis Kirjanov Date: Fri Dec 25 18:48:33 2009 -0800 vxge: use DMA_BIT_MASK instead of plain values. Use DMA_BIT_MASK instead of plain values. Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller commit 28f6aeea3f12d37bd258b2c0d5ba891bff4ec479 Author: Jamal Hadi Salim Date: Fri Dec 25 17:30:22 2009 -0800 net: restore ip source validation when using policy routing and the skb mark: there are cases where a back path validation requires us to use a different routing table for src ip validation than the one used for mapping ingress dst ip. One such a case is transparent proxying where we pretend to be the destination system and therefore the local table is used for incoming packets but possibly a main table would be used on outbound. Make the default behavior to allow the above and if users need to turn on the symmetry via sysctl src_valid_mark Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 4a6e47a460ce55e283063fc3f7391c8ea46bea27 Author: Michael Chan Date: Fri Dec 25 17:13:07 2009 -0800 bnx2x: Initialize cnic status block during chip reset When the device is reset during MTU change, ring size change, or self test, etc, the cnic status block needs to be properly initialized if cnic is registered. Signed-off-by: Michael Chan Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller commit 17a2a9b57a9a7d2fd8f97df951b5e63e0bd56ef5 Author: H. Peter Anvin Date: Fri Dec 25 15:40:38 2009 -0800 x86, compress: Force i386 instructions for the decompressor Recently, some distros have started shipping versions of gcc which default to -march=i686. This breaks building kernels for pre-i686 machines, even if they have been selected in Kconfig, due to the generation of CMOV instructions. There isn't enough benefit to try to preserve the generation of these instructions even when selected, so simply force -march=i386 for the decompressor when building a 32-bit kernel. Reported-and-tested-by: Chris Rankin Signed-off-by: H. Peter Anvin LKML-Reference: <219280.97558.qm@web52907.mail.re2.yahoo.com> commit a252c81a69c4f9a5a8782f33b91bd837e9dcd406 Author: Takashi Iwai Date: Fri Dec 25 22:56:20 2009 +0100 ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c Use snd_hda_jack_detect() again for jack-sensing. The triggering problem can be worked around with codec->no_trigger_sense flag now. Signed-off-by: Takashi Iwai commit 729d55ba972348234759f8e40abf8de020f0d505 Author: Takashi Iwai Date: Fri Dec 25 22:49:01 2009 +0100 ALSA: hda - Disable tigger at pin-sensing on AD codecs Analog Device codecs seem to have problems with the triggering of pin-sensing although their pincaps give the trigger requirements. Some reported that constant CPU load on HP laptops with AD codecs. For avoiding this regression, add a flag to codec struct to notify explicitly that the codec doesn't suppot the trigger at pin-sensing. Tested-by: Maciej Rutecki Signed-off-by: Takashi Iwai commit 2faf2e19dd0e060eeb32442858ef495ac3083277 Author: Richard Kennedy Date: Fri Dec 25 15:46:07 2009 -0500 ext4: return correct wbc.nr_to_write in ext4_da_writepages When ext4_da_writepages increases the nr_to_write in writeback_control then it must always re-base the return value. Originally there was a (misguided) attempt prevent wbc.nr_to_write from going negative. In fact, it's necessary to allow nr_to_write to be negative so that wb_writeback() can correctly calculate how many pages were actually written. Signed-off-by: Richard Kennedy Signed-off-by: "Theodore Ts'o" commit ef18beded8ddbaafdf4914bab209f77e60ae3a18 Author: Wu Fengguang Date: Fri Dec 25 13:14:27 2009 +0800 ALSA: hda - HDMI sticky stream tag support When we run the following commands in turn (with CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0), speaker-test -Dhw:0,3 -c2 -twav # HDMI speaker-test -Dhw:0,0 -c2 -twav # Analog The second command will produce sound in the analog lineout _as well as_ HDMI sink. The root cause is, device 0 "reuses" the same stream tag that was used by device 3, and the "intelhdmi - sticky stream id" patch leaves the HDMI codec in a functional state. So the HDMI codec happily accepts the audio samples which reuse its stream tag. The proposed solution is to remember the last device each azx_dev was assigned to, and prefer to 1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used 2) or assign a never-used azx_dev for HDMI With this patch and the above two speaker-test commands, HDMI codec will use stream tag 8 and Analog codec will use 5. The stream tag used by HDMI codec won't be reused by others, as long as we don't run out of the 4 playback azx_dev's. The legacy Analog codec will continue to use stream tag 5 because its device id is 0 (this is a bit tricky). Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit 8b90ca08821fee79e181bfcbc3bbd41ef5637136 Author: Guennadi Liakhovetski Date: Thu Dec 24 01:17:46 2009 +0100 ALSA: Fix indentation in pcm_native.c Signed-off-by: Guennadi Liakhovetski Signed-off-by: Takashi Iwai commit dd219234d201431d0fc56a74e3a4a97ca3eb4589 Author: Dmitry Torokhov Date: Thu Dec 24 22:50:23 2009 -0800 Input: matrix-keypad - handle cases when GPIOs can't be wakeup sources On certain boards not all GPIOs may be used as wakeup sources, in which case some of enable_irq_wake() calls will fail. On resume calling disable_irq_wake() will warn about unbalanced IRQ wake disable. Solve this by checking whether enable_irq_wake() succeeded or not and no not call disable_irq_wake() for these GPIOs/IRQs that have not been enabled. Reported-by: Pavel Machek Signed-off-by: Dmitry Torokhov commit 98b7fb0472f828536a7786df6bd517322c0c17dc Author: Dmitry Torokhov Date: Thu Dec 24 22:37:49 2009 -0800 Input: iforce - fix oops on device disconnect Do not try to free iforce device when we closing input device; disconnect is the only place where it should be deleted. Reported-by: Johannes Ebke Signed-off-by: Dmitry Torokhov commit 94ec26c855bc675259e4f1658673f458040affd7 Author: Jari Vanhala Date: Thu Dec 24 21:52:20 2009 -0800 Input: ff-memless - add notion of direction to for rumble effects This adds simple direction calculation when combining effects. It's useful to decide motor direction for rumble (vibrator). Signed-off-by: Jari Vanhala Acked-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 1b11c88d3e8f55dc9d193d19de11e3f7abc1b7d7 Author: Dmitry Torokhov Date: Thu Dec 24 21:44:19 2009 -0800 Input: ff-memless - another fix for signed to unsigned overflow The commit 9e68177ef93b2f34eee5a1e1707bceef4b9ba69c changed 'gain' from signed to unsigned to fix an issue with rumble effect calculation, however it introduced problems when calculating constant effects. Having 'gain' being unsigned int was an unfortunate choice since it dominates all implicit type conversions causing everything to be treated as unsigned int. Let's change it back to signed int and simply add proper casts to rumble effect calculations. Reported-by: Gary Stein Acked-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit 25ae08317647c68ed9276f7bdc07d0d5fd042628 Author: Jari Vanhala Date: Thu Dec 24 21:52:19 2009 -0800 Input: ff-memless - start playing FF effects immediately Instead of waiting for the next timer tick to start playing an effect do it immediately. This mostly helps systems using low HZ setting. Signed-off-by: Jari Vanhala Acked-by: Anssi Hannula Signed-off-by: Dmitry Torokhov commit ea486e681188d64c6a101d8d06414aef0f9f0cd3 Author: Dmitry Torokhov Date: Thu Dec 24 21:40:43 2009 -0800 Input: serio - do not mark kseriod freezable anymore We used to make kseriod freezable to prevent unnecessary attempts at resuming keyboard and mouse before taking hibernation image when suspend and hibernation were sharing PM operations. Now that they are separated and we don't risk resuming during 'thaw' we don't need to freeze kseriod anymore. This will allow us to start resetting mouse and keyboard a bit earlier, before rest of the userspace comes back up. Acked-by: Rafael J. Wysocki Signed-off-by: Dmitry Torokhov commit 4a299bf591bc5bef3bde8316e603b9eaec5a7696 Author: Dmitry Torokhov Date: Thu Dec 24 21:40:24 2009 -0800 Input: speed up suspend/shutdown for PS/2 mice and keyboards Instead of doing full-blown reset while suspending or shutting down the box use lighter form of reset that should take less time. Tested-by: Alan Stern Tested-by: Rafael J. Wysocki Signed-off-by: Dmitry Torokhov commit 6d3b82f2d31f22085e5711b28dddcb9fb3d97a25 Author: Fang Wenqi Date: Thu Dec 24 17:51:42 2009 -0500 ext4: Update documentation to correct the inode_readahead_blks option name Per commit 240799cd, the option name for readahead should be inode_readahead_blks, not inode_readahead. Signed-off-by: Fang Wenqi Signed-off-by: "Theodore Ts'o" commit f466dba1832f05006cf6caa9be41fb98d11cb848 Author: John Fastabend Date: Wed Dec 23 22:02:57 2009 -0800 pktgen: ndo_start_xmit can return NET_XMIT_xxx values This updates pktgen so that it does not decrement skb->users when it receives valid NET_XMIT_xxx values. These are now valid return values from ndo_start_xmit in net-next-2.6. They also indicate the skb has been consumed. This fixes pktgen to work correctly with vlan devices. Signed-off-by: John Fastabend Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit c0d7a0212becebe11ffe6979ee3d6f1c4104568d Author: Jarek Poplawski Date: Wed Dec 23 21:54:29 2009 -0800 net/via-rhine: Fix scheduling while atomic bugs There are BUGs "scheduling while atomic" triggered by the timer rhine_tx_timeout(). They are caused by calling napi_disable() (with msleep()). This patch fixes it by moving most of the timer content to the workqueue function (similarly to other drivers, like tg3), with spin_lock() changed to BH version. Additionally, there is spin_lock_irq() moved in rhine_close() to exclude napi_disable() etc., also tg3's way. Reported-by: Andrey Rahmatullin Tested-by: Andrey Rahmatullin Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller commit 656ab8172a49d3931e64f866c080260be638c8a9 Author: Don Skidmore Date: Wed Dec 23 21:19:19 2009 -0800 ixgbe: fix Need to call pci_save_state after pci_restore_state This patch adds a pci_save_state() call in ixgbe_resume() after pci_restore_state(). A similar change was made in ixgbe_io_slot_reset() that accommodates pci_restore_state() new behavior. This change makes pci_restore_state() clear the saved_state flag This is necessary due to a resent kernel change to pci_restore_state() so that it now clears the saved_state flag of the device right after the device.s standard configuration registers have been poplulated with the previously saved values. Signed-off-by: Don Skidmore Acked-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 16c02145902d8597841a25e8443cfb082898a2d7 Author: Sarveshwar Bandi Date: Wed Dec 23 04:42:51 2009 +0000 be2net: Bug fix to return correct values in ethtool get_settings. Changes to return correct values for transceiver and supported in ethtool get_settings function. Signed-off-by: Sarveshwar Bandi Signed-off-by: David S. Miller commit fced9999ed7f6975fbb2350a73048918ba60a773 Author: Sarveshwar Bandi Date: Wed Dec 23 04:41:44 2009 +0000 be2net: Bug fix to config NIC appropriately before loopback test NIC controller has to be set to an appropriate mode before doing a loopback test. Test will fail otherwise. Signed-off-by: Sarveshwar Bandi Signed-off-by: David S. Miller commit d7b901418250f00eaaa18f9135d09ba61b72a5bc Author: Sarveshwar Bandi Date: Wed Dec 23 04:40:36 2009 +0000 be2net: Bug fix to avoid soft lockup in loopback test. This change ensures that loopback test command gives up after 4 seconds when the hardware is not responsive. This could happen if the ports are connected properly in loopback mode. Signed-off-by: Sarveshwar Bandi Signed-off-by: David S. Miller commit 1242b6f31e1d0688f1eb1dc78036dbd975bd6140 Author: Williams, Mitch A Date: Wed Dec 23 13:22:43 2009 +0000 igbvf: Make igbvf error message more informative Signed-off-by: Mitch Williams Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 58b8b042509f53955ba660a4245e221c5405f124 Author: Alexander Duyck Date: Wed Dec 23 13:21:46 2009 +0000 igb: check both function bits in status register in wol exception The ethtool code for enabling Wake on Lan was not correctly checking the status register bits so as a result ports 0 and 2 were both being allowed to set WOL to enabled even though it is only supported on the first port for our adapters. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit d405ea3ef2499eb46834418a643973c884ff7f30 Author: Alexander Duyck Date: Wed Dec 23 13:21:27 2009 +0000 igb: correctly offset 82575 flow control watermarks by 16 bytes The watermark values for the 82575 were not being set correctly. As a result the high and low watermark values were set to the same value which can lead to excess xon/xoff packets being generated. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 8c6af2995c14e71558c312b86955ae32272a03d8 Author: Alexander Duyck Date: Wed Dec 23 13:21:07 2009 +0000 igb: do not force retry count to 1 on 82580 phy This change resolves an issue seen in some configurations where the link may drop to 100Mb/s even though the link itself supports 1000Mb/s. The issue was root caused to the fact that we were only trying the link once. Now instead we will try up to 5 attempts on a faulty cable before downshifting to 100Mb/s. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit d68caec645b4b92f6a81985265b024bc94bce41f Author: Alexander Duyck Date: Wed Dec 23 13:20:47 2009 +0000 igb: do not force pcs link when in KX mode We were forcing the PCS link up in error when we are in KX mode. We should only be disabling autoneg, not forcing the link up. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit 286d47ba90315a871f77351f7f61b7e4a96476a9 Author: Ben Hutchings Date: Wed Dec 23 13:49:13 2009 +0000 sfc: Disable TX descriptor prefetch watchdog This hardware watchdog can misfire, so it does more harm than good. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 50d6ec552bdd4d9227fe9ed2bac819eced3170ac Author: Ben Hutchings Date: Wed Dec 23 13:48:42 2009 +0000 sfc: QT2025C: Add error message for suspected bad SFP+ cables Some cables have EEPROMs that conflict with the PHY's on-board EEPROM so it cannot load firmware. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 1a1284ef97ca79ba747d211b697e996a248a8555 Author: Matthew Slattery Date: Wed Dec 23 13:48:32 2009 +0000 sfc: QT2025C: Work around PHY firmware initialisation bug The PHY's firmware very occasionally appears to lock up very early, but with the heartbeat update still running. Rebooting the microcontroller core seems to be sufficient to recover. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 0d83b2f64c330ee3892cb3117ac5d56e97185ecf Author: Matthew Slattery Date: Wed Dec 23 13:48:04 2009 +0000 sfc: QT2025C: Switch into self-configure mode when not in loopback The PHY boots in a mode which is not necessarily optimal. This change switches it to self-configure mode (except when in loopback, which won't work in that mode if an SFP+ module is not present) by rebooting the PHY's microcontroller, and replicating the sequence of configuration writes from the boot EEPROM with the appropriate changes. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit 17d6aeafe9d8268612d91edc0102659edb382282 Author: Matthew Slattery Date: Wed Dec 23 13:47:37 2009 +0000 sfc: QT2025C: Work around PHY bug If we see the PHY remaining stuck in a link-down state due to PCS being down while PMA/PMD is up, we briefly switch to PMA/PMD loopback and back, which usually unsticks it. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit a7ebd27a13757248863cd61e541af7fa9e7727ee Author: Neil Turton Date: Wed Dec 23 13:47:13 2009 +0000 sfc: Fix DMA mapping cleanup in case of an error in TSO We need buffer->len to remain valid to work out the correct address to be unmapped. We therefore need to clear buffer->len after the unmap operation. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit a355020af415947c7dee7e00a91360d11b6a9b47 Author: Ben Hutchings Date: Wed Dec 23 13:46:47 2009 +0000 sfc: Include XGXS in XMAC link status check except in XGMII loopback The XGXS block may not get a link immediately in XGXS or XAUI loopback modes, so we still need to check it. Split falcon_xaui_link_ok() into falcon_xgxs_link_ok(), which checks only the Falcon XGXS block, and falcon_xmac_link_ok(), which checks one or both sides of the link as appropriate. Also rename falcon_check_xaui_link() to falcon_xmac_link_ok_retry(). Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit ff3b00a0fcaab89ff885e9f0f4ad83c4ced788f4 Author: Steve Hodgson Date: Wed Dec 23 13:46:36 2009 +0000 sfc: Move PHY software state initialisation from init() into probe() This prevents efx->link_advertising from being blatted during a reset. The phy_short_reach sysfs node is now destroyed later in the port shutdown process, so check for STATE_RUNNING after acquiring the rtnl_lock (just like in set_phy_flash_cfg). Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller commit f5908267b67917b8cbd98b27fd2be9b5f62ec76f Author: Herbert Xu Date: Wed Dec 23 23:22:34 2009 +0800 hwrng: core - Fix double unlock in rng_dev_read When the loop terminates with size == 0 in rng_dev_read we will unlock the rng mutex twice. Reported-by: Dan Carpenter Signed-off-by: Herbert Xu commit 3ebfdf885acedafcadceb4007e77438479094135 Author: Andrew Morton Date: Wed Dec 23 08:05:15 2009 -0500 jbd2: don't use __GFP_NOFAIL in journal_init_common() It triggers the warning in get_page_from_freelist(), and it isn't appropriate to use __GFP_NOFAIL here anyway. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14843 Reported-by: Christian Casteyde Signed-off-by: Andrew Morton Signed-off-by: "Theodore Ts'o" commit c8afb44682fcef6273e8b8eb19fab13ddd05b386 Author: Eric Sandeen Date: Wed Dec 23 07:58:12 2009 -0500 ext4: flush delalloc blocks when space is low Creating many small files in rapid succession on a small filesystem can lead to spurious ENOSPC; on a 104MB filesystem: for i in `seq 1 22500`; do echo -n > $SCRATCH_MNT/$i echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i done leads to ENOSPC even though after a sync, 40% of the fs is free again. This is because we reserve worst-case metadata for delalloc writes, and when data is allocated that worst-case reservation is not usually needed. When freespace is low, kicking off an async writeback will start converting that worst-case space usage into something more realistic, almost always freeing up space to continue. This resolves the testcase for me, and survives all 4 generic ENOSPC tests in xfstests. We'll still need a hard synchronous sync to squeeze out the last bit, but this fixes things up to a large degree. Signed-off-by: Eric Sandeen Signed-off-by: "Theodore Ts'o" commit 17bd55d037a02b04d9119511cfd1a4b985d20f63 Author: Eric Sandeen Date: Wed Dec 23 07:57:07 2009 -0500 fs-writeback: Add helper function to start writeback if idle ext4, at least, would like to start pushing on writeback if it starts to get close to ENOSPC when reserving worst-case blocks for delalloc writes. Writing out delalloc data will convert those worst-case predictions into usually smaller actual usage, freeing up space before we hit ENOSPC based on this speculation. Thanks to Jens for the suggestion for the helper function, & the naming help. I've made the helper return status on whether writeback was started even though I don't plan to use it in the ext4 patch; it seems like it would be potentially useful to test this in some cases. Signed-off-by: Eric Sandeen Acked-by: Jan Kara commit d3533d72e7478a61a3e1936956fc825289a2acf4 Author: Julia Lawall Date: Wed Dec 23 07:52:31 2009 -0500 ext4: Eliminate potential double free on error path b_entry_name and buffer are initially NULL, are initialized within a loop to the result of calling kmalloc, and are freed at the bottom of this loop. The loop contains gotos to cleanup, which also frees b_entry_name and buffer. Some of these gotos are before the reinitializations of b_entry_name and buffer. To maintain the invariant that b_entry_name and buffer are NULL at the top of the loop, and thus acceptable arguments to kfree, these variables are now set to NULL after the kfrees. This seems to be the simplest solution. A more complicated solution would be to introduce more labels in the error handling code at the end of the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier E; expression E1; iterator I; statement S; @@ *kfree(E); ... when != E = E1 when != I(E,...) S when != &E *kfree(E); // Signed-off-by: Julia Lawall Signed-off-by: "Theodore Ts'o" commit a6b43e382568a49cc64291bfaddf896652d44f70 Author: Andrew Morton Date: Wed Dec 23 07:48:08 2009 -0500 ext4: fix unsigned long long printk warning in super.c sparc64 allmodconfig: fs/ext4/super.c: In function `lifetime_write_kbytes_show': fs/ext4/super.c:2174: warning: long long unsigned int format, long unsigned int arg (arg 4) fs/ext4/super.c:2174: warning: long long unsigned int format, long unsigned int arg (arg 4) Signed-off-by: Andrew Morton Signed-off-by: "Theodore Ts'o" commit cc3e1bea5d87635c519da657303690f5538bb4eb Author: Theodore Ts'o Date: Wed Dec 23 06:52:08 2009 -0500 ext4, jbd2: Add barriers for file systems with exernal journals This is a bit complicated because we are trying to optimize when we send barriers to the fs data disk. We could just throw in an extra barrier to the data disk whenever we send a barrier to the journal disk, but that's not always strictly necessary. We only need to send a barrier during a commit when there are data blocks which are must be written out due to an inode written in ordered mode, or if fsync() depends on the commit to force data blocks to disk. Finally, before we drop transactions from the beginning of the journal during a checkpoint operation, we need to guarantee that any blocks that were flushed out to the data disk are firmly on the rust platter before we drop the transaction from the journal. Thanks to Oleg Drokin for pointing out this flaw in ext3/ext4. Signed-off-by: "Theodore Ts'o" commit f80ca163d65903276bec7045a484a79c0897eb2d Merge: 0794ec8 a6d52d7 Author: Dan Williams Date: Tue Dec 22 17:21:47 2009 -0700 Merge branch 'ioat' into fixes commit 0794ec8ce327ec74416b569b8fb1951274693700 Author: Julia Lawall Date: Tue Dec 22 21:30:59 2009 +0100 drivers/dma: Correct use after free Move the kfree after the iounmap that refers to the same structure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,e; identifier f; iterator I; statement S; @@ *kfree(x); ... when != &x when != x = e when != I(x,...) S *x->f // Signed-off-by: Julia Lawall Signed-off-by: Dan Williams commit 1e9d1b13efae7e0a2705611d47ae5f07e27015f0 Author: Julia Lawall Date: Sat Dec 19 08:30:30 2009 +0100 drivers/dma: drop unnecesary memset memset of 0 is not needed after kzalloc The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; statement S; @@ x = kzalloc(...); if (x == NULL) S ... when != x -memset(x,0,...);// Signed-off-by: Julia Lawall Signed-off-by: Dan Williams commit 6ec1480d8539c8e2e6ba7fbbeffe5adc640bfe98 Author: Andrew Morton Date: Mon Dec 21 16:27:50 2009 -0800 aoe: switch to the new bio_flush_dcache_pages() interface Cc: "Ed L. Cashin" Cc: David Woodhouse Cc: Ilya Loginov Cc: Ingo Molnar Cc: Peter Horton Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit e019ef0c4f11a0acb79b89fb1e09c72197b42bbe Author: H Hartley Sweeten Date: Mon Dec 21 16:27:49 2009 -0800 drivers/block/mg_disk.c: use resource_size() Use resource_size() for ioremap. The ioremap appears to be passing the incorrect size for the platform resource. Unfortunately, I can't locate a user in mainline to verify this. Using resource_size should be the correct fix. Signed-off-by: H Hartley Sweeten Acked-by: unsik Kim Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit df9dc83d193959f990c981787279e8541fe9df8c Author: Julia Lawall Date: Mon Dec 21 16:27:49 2009 -0800 drivers/block/DAC960.c: use DAC960_V2_Controller DAC960_LP_Controller and DAC960_V2_Controller have the same value, but elsewhere it is DAC960_V1_Controller or DAC960_V2_Controller that is used in the FirmwareType field. Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit c757bea93bea4b77ebd181cc6dca60c15e3b1a2c Author: Steven Rostedt Date: Mon Dec 21 22:35:16 2009 -0500 tracing: Fix setting tracer specific options The function __set_tracer_option() takes as its last parameter a "neg" value. If set it should negate the value of the option. The trace_options_write() passed the value written to the file which is what the new value needs to be set as. But since this is not the negative, it never sets the value. Reported-by: Peter Zijlstra Cc: Li Zefan Signed-off-by: Steven Rostedt commit ed4b2019a62e2208a8370461dd91ed4de2c9fc8f Merge: b746656 92c6f8d Author: David S. Miller Date: Mon Dec 21 11:54:49 2009 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 commit 490c560b100822716099d00e90f88643c7e7b165 Merge: 9504e08 820cd61 Author: Jens Axboe Date: Mon Dec 21 19:16:38 2009 +0100 Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-linus commit 92c6f8d849178582fc527aaf1e51dd37a74767d3 Author: Benjamin Herrenschmidt Date: Fri Dec 18 11:19:32 2009 -0800 ps3_gelic_wireless: Fix build failure due to missing WEXT_PRIV The option to support the old style PSK interface in the PS3 GELIC wireless drivers requires CONFIG_WEXT_PRIV to be set Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Geoff Levand Signed-off-by: John W. Linville commit 0183826b58a2712ffe608bc3302447be3e6a3ab8 Author: Johannes Berg Date: Thu Dec 17 16:16:53 2009 +0100 mac80211: fix WMM AP settings application My commit 77fdaa12cea26c204cc12c312fe40bc0f3dcdfd8 Author: Johannes Berg Date: Tue Jul 7 03:45:17 2009 +0200 mac80211: rework MLME for multiple authentications inadvertedly broke WMM because it removed, along with a bunch of other now useless initialisations, the line initialising sdata->u.mgd.wmm_last_param_set to -1 which would make it adopt any WMM parameter set. If, as is usually the case, the AP uses WMM parameter set sequence number zero, we'd never update it until the AP changes the sequence number. Add the missing initialisation back to get the WMM settings from the AP applied locally. Signed-off-by: Johannes Berg Cc: stable@kernel.org [2.6.31+] Signed-off-by: John W. Linville commit 9a418af5df03ad133cd8c8f6742b75e542db6392 Author: Johannes Berg Date: Thu Dec 17 13:55:48 2009 +0100 mac80211: fix peer HT capabilities I noticed yesterday, because Jeff had noticed a speed regression, cf. bug http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2138 that the SM PS settings for peers were wrong. Instead of overwriting the SM PS settings with the local bits, we need to keep the remote bits. The bug was part of the original HT code from over two years ago, but unfortunately nobody noticed that it makes no sense -- we shouldn't be overwriting the peer's setting with our own but rather keep it intact when masking the peer capabilities with our own. While fixing that, I noticed that the masking of capabilities is completely useless for most of the bits, so also fix those other bits. Finally, I also noticed that PSMP_SUPPORT no longer exists in the final 802.11n version, so also remove that. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville commit 8585c2b896861aacd15337c3c7e58ad114e6cf60 Author: Roel Kluin Date: Wed Dec 16 17:01:38 2009 +0100 iwmc3200wifi: Fix test of unsigned in iwm_ntf_stop_resume_tx() `queue' was unsigned so the test did not work. Signed-off-by: Roel Kluin Reviewed-by: Pavel Roskin Acked-by: Zhu Yi Signed-off-by: John W. Linville commit 45b241689179a6065384260242637cf21dabfb2d Author: Daniel Mack Date: Wed Dec 16 05:12:58 2009 +0100 Libertas: fix buffer overflow in lbs_get_essid() The libertas driver copies the SSID buffer back to the wireless core and appends a trailing NULL character for termination. This is a) unnecessary because the buffer is allocated with kzalloc and is hence already NULLed when this function is called, and b) for priv->curbssparams.ssid_len == 32, it writes back one byte too much which causes memory corruptions. Fix this by removing the extra write. Signed-off-by: Daniel Mack Cc: Stephen Hemminger Cc: Maithili Hinge Cc: Kiran Divekar Cc: Michael Hirsch Cc: netdev@vger.kernel.org Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@lists.infradead.org Cc: stable@kernel.org Acked-by: Holger Schurig Acked-by: Dan Williams Signed-off-by: John W. Linville commit 77ca7d9e2c099b4484bb10075948b4267f37d9fa Author: akpm@linux-foundation.org Date: Mon Dec 14 15:56:54 2009 -0800 drivers/net/wireless/iwlwifi/iwl-tx.c: fix gcc-3.4.5 warning drivers/net/wireless/iwlwifi/iwl-tx.c: In function `iwl_hw_txq_ctx_free': drivers/net/wireless/iwlwifi/iwl-tx.c:410: warning: suggest explicit braces to avoid ambiguous `else' Cc: Zhu Yi Cc: Reinette Chatre Signed-off-by: Andrew Morton Signed-off-by: John W. Linville commit 2ab81d4a9a5ecb13d343269b3cdf5d975c81c570 Author: Sujith Date: Mon Dec 14 16:34:56 2009 +0530 ath9k: Stop ANI when doing a reset The MIB counters are disabled when doing a chip reset. Since ANI depends on the MIB registers for its operation, relying on the contents of said registers during HW reset results in sub-optimal performance. Cc: stable@kernel.org Signed-off-by: Sujith Signed-off-by: John W. Linville commit e8009e9850d59000d518296af372888911a129bd Author: Sujith Date: Mon Dec 14 14:57:08 2009 +0530 ath9k: Fix TX queue draining When TX DMA termination has failed, the HW has to be reset completely. Doing a fast channel change in this case is insufficient. Also, change the debug level of a couple of messages to FATAL. Cc: stable@kernel.org Signed-off-by: Sujith Signed-off-by: John W. Linville commit 17b182e3db255ab068c2ebb85f34840607a53cc4 Author: Sujith Date: Mon Dec 14 14:56:56 2009 +0530 ath9k: Fix bug in assigning sequence number The internal, driver-specific maintenance of sequence numbers is applicable only for HT frames. Also, remove comments that are not relevant anymore. Signed-off-by: Sujith Signed-off-by: John W. Linville commit 7988436c6330eab98f64b6e799ce2d30fe5ffd55 Author: Gertjan van Wingerde Date: Mon Dec 14 23:32:31 2009 +0100 rt2x00: Fix calculation of rt2800 iveiv entry offset. Fix typo. The index should be multiplied by the entry size, not 'and'-ed. Found via code-inspection. Signed-off-by: Gertjan van Wingerde Acked-by: Ivo van Doorn Signed-off-by: John W. Linville commit 6c3069b1e7e983e176a5f826e2edffefdd404a08 Author: Reinette Chatre Date: Mon Dec 14 14:12:13 2009 -0800 iwlwifi: fix 40MHz operation setting on cards that do not allow it Some devices have 40MHz operation disabled entirely. Ensure that driver do not enable 40MHz operation if a channel does not allow this. This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2135 Signed-off-by: Reinette Chatre CC: stable@kernel.org Signed-off-by: John W. Linville commit dc57a303faab8562b92e85df0d79c4a05d7e2a61 Author: Zhu Yi Date: Mon Dec 14 14:12:12 2009 -0800 iwl3945: fix panic in iwl3945 driver 3945 updated write_ptr without regard to read_ptr on the Tx path. This messes up our TFD on high load and result in the following: <1>[ 7290.414172] IP: [] iwl3945_rx_reply_tx+0xc1/0x450 [iwl3945] <4>[ 7290.414205] PGD 0 <1>[ 7290.414214] Thread overran stack, or stack corrupted <0>[ 7290.414229] Oops: 0002 [#1] PREEMPT SMP <0>[ 7290.414246] last sysfs file: /sys/devices/platform/coretemp.1/temp1_input <4>[ 7290.414265] CPU 0 <4>[ 7290.414274] Modules linked in: af_packet nfsd usb_storage usb_libusual cpufreq_powersave exportfs cpufreq_conservative iwl3945 nfs cpufreq_userspace snd_hda_codec_realtek acpi_cpufreq uvcvideo lockd iwlcore snd_hda_intel joydev coretemp nfs_acl videodev snd_hda_codec mac80211 v4l1_compat snd_hwdep sbp2 v4l2_compat_ioctl32 uhci_hcd psmouse auth_rpcgss ohci1394 cfg80211 ehci_hcd video ieee1394 snd_pcm serio_raw battery ac nvidia(P) usbcore output sunrpc evdev lirc_ene0100 snd_page_alloc rfkill tg3 libphy fuse lzo lzo_decompress lzo_compress <6>[ 7290.414486] Pid: 0, comm: swapper Tainted: P 2.6.32-rc8-wl #213 Aspire 5720 <6>[ 7290.414507] RIP: 0010:[] [] iwl3945_rx_reply_tx+0xc1/0x450 [iwl3945] <6>[ 7290.414541] RSP: 0018:ffff880002203d60 EFLAGS: 00010246 <6>[ 7290.414557] RAX: 000000000000004f RBX: ffff880064c11600 RCX: 0000000000000013 <6>[ 7290.414576] RDX: ffffffffa0ddcf20 RSI: ffff8800512b7008 RDI: 0000000000000038 <6>[ 7290.414596] RBP: ffff880002203dd0 R08: 0000000000000000 R09: 0000000000000100 <6>[ 7290.414616] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000000000a0 <6>[ 7290.414635] R13: 0000000000000002 R14: 0000000000000013 R15: 0000000000020201 <6>[ 7290.414655] FS: 0000000000000000(0000) GS:ffff880002200000(0000) knlGS:0000000000000000 <6>[ 7290.414677] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b <6>[ 7290.414693] CR2: 0000000000000041 CR3: 0000000001001000 CR4: 00000000000006f0 <6>[ 7290.414712] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 <6>[ 7290.414732] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 <4>[ 7290.414752] Process swapper (pid: 0, threadinfo ffffffff81524000, task ffffffff81528b60) <0>[ 7290.414772] Stack: <4>[ 7290.414780] ffff880002203da0 0000000000000046 0000000000000000 0000000000000046 <4>[ 7290.414804] <0> 0000000000000282 0000000000000282 0000000000000282 ffff880064c12010 <4>[ 7290.414830] <0> ffff880002203db0 ffff880064c11600 ffff880064c12e50 ffff8800512b7000 <0>[ 7290.414858] Call Trace: <0>[ 7290.414867] <4>[ 7290.414884] [] iwl3945_irq_tasklet+0x657/0x1740 [iwl3945] <4>[ 7290.414910] [] ? _spin_unlock+0x30/0x60 <4>[ 7290.414931] [] tasklet_action+0x101/0x110 <4>[ 7290.414950] [] __do_softirq+0xc0/0x160 <4>[ 7290.414968] [] call_softirq+0x1c/0x30 <4>[ 7290.414986] [] do_softirq+0x75/0xb0 <4>[ 7290.415003] [] irq_exit+0x95/0xa0 <4>[ 7290.415020] [] do_IRQ+0x77/0xf0 <4>[ 7290.415038] [] ret_from_intr+0x0/0xf <0>[ 7290.415052] <4>[ 7290.415067] [] ? acpi_idle_enter_bm+0x270/0x2a5 <4>[ 7290.415087] [] ? acpi_idle_enter_bm+0x27a/0x2a5 <4>[ 7290.415107] [] ? acpi_idle_enter_bm+0x270/0x2a5 <4>[ 7290.415130] [] ? cpuidle_idle_call+0x93/0xf0 <4>[ 7290.415149] [] ? cpu_idle+0xa7/0x110 <4>[ 7290.415168] [] ? rest_init+0x75/0x80 <4>[ 7290.415187] [] ? start_kernel+0x3a7/0x3b3 <4>[ 7290.415206] [] ? x86_64_start_reservations+0x125/0x129 <4>[ 7290.415227] [] ? x86_64_start_kernel+0xe4/0xeb <0>[ 7290.415243] Code: 00 41 39 ce 0f 8d e8 01 00 00 48 8b 47 40 48 63 d2 48 69 d2 98 00 00 00 4c 8b 04 02 48 c7 c2 20 cf dd a0 49 8d 78 38 49 8d 40 4f 47 09 00 c6 47 0c 00 c6 47 0f 00 c6 47 12 00 c6 47 15 00 49 <1>[ 7290.415382] RIP [] iwl3945_rx_reply_tx+0xc1/0x450 [iwl3945] <4>[ 7290.415410] RSP <0>[ 7290.415421] CR2: 0000000000000041 <4>[ 7290.415436] ---[ end trace ec46807277caa515 ]--- <0>[ 7290.415450] Kernel panic - not syncing: Fatal exception in interrupt <4>[ 7290.415468] Pid: 0, comm: swapper Tainted: P D 2.6.32-rc8-wl #213 <4>[ 7290.415486] Call Trace: <4>[ 7290.415495] [] panic+0x7d/0x13a <4>[ 7290.415519] [] oops_end+0xda/0xe0 <4>[ 7290.415538] [] no_context+0xea/0x250 <4>[ 7290.415557] [] ? select_task_rq_fair+0x511/0x780 <4>[ 7290.415578] [] __bad_area_nosemaphore+0x125/0x1e0 <4>[ 7290.415597] [] ? __enqueue_entity+0x7c/0x80 <4>[ 7290.415616] [] ? enqueue_task_fair+0x111/0x150 <4>[ 7290.415636] [] bad_area_nosemaphore+0xe/0x10 <4>[ 7290.415656] [] do_page_fault+0x26a/0x320 <4>[ 7290.415674] [] page_fault+0x1f/0x30 <4>[ 7290.415697] [] ? iwl3945_rx_reply_tx+0xc1/0x450 [iwl3945] <4>[ 7290.415723] [] iwl3945_irq_tasklet+0x657/0x1740 [iwl3945] <4>[ 7290.415746] [] ? _spin_unlock+0x30/0x60 <4>[ 7290.415764] [] tasklet_action+0x101/0x110 <4>[ 7290.415783] [] __do_softirq+0xc0/0x160 <4>[ 7290.415801] [] call_softirq+0x1c/0x30 <4>[ 7290.415818] [] do_softirq+0x75/0xb0 <4>[ 7290.415835] [] irq_exit+0x95/0xa0 <4>[ 7290.415852] [] do_IRQ+0x77/0xf0 <4>[ 7290.415869] [] ret_from_intr+0x0/0xf <4>[ 7290.415883] [] ? acpi_idle_enter_bm+0x270/0x2a5 <4>[ 7290.415911] [] ? acpi_idle_enter_bm+0x27a/0x2a5 <4>[ 7290.415931] [] ? acpi_idle_enter_bm+0x270/0x2a5 <4>[ 7290.415952] [] ? cpuidle_idle_call+0x93/0xf0 <4>[ 7290.415971] [] ? cpu_idle+0xa7/0x110 <4>[ 7290.415989] [] ? rest_init+0x75/0x80 <4>[ 7290.416007] [] ? start_kernel+0x3a7/0x3b3 <4>[ 7290.416026] [] ? x86_64_start_reservations+0x125/0x129 <4>[ 7290.416047] [] ? x86_64_start_kernel+0xe4/0xeb Reported-by: Maxim Levitsky Tested-by: Maxim Levitsky Signed-off-by: Zhu Yi Signed-off-by: Reinette Chatre CC: stable@kernel.org Signed-off-by: John W. Linville commit 731a29b74aa823e09a6547befce3f721bef32f86 Author: Reinette Chatre Date: Mon Dec 14 14:12:11 2009 -0800 iwlwifi: initialize spinlock before use Recent powersaving work resulted in power management ops being called during EEPROM initialization. The lock used by these functions is not initialized at this time. Ensure lock is initialized before it is used. Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit bc45a67079c916a9bd0a95b0b879cc0f259bac6e Author: Reinette Chatre Date: Mon Dec 14 14:12:10 2009 -0800 iwl3945: disable power save we see from http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2125 that power saving does not work well on 3945. Since then power saving has also been connected with association problems where an AP deathenticates a 3945 after it is unable to transmit data to it - this happens when 3945 enters power savings mode. Disable power save support until issues are resolved. Signed-off-by: Reinette Chatre CC: stable@kernel.org Signed-off-by: John W. Linville commit b7bb1756cb6a610cdbac8cfdad9e79bb5670b63b Author: Johannes Berg Date: Mon Dec 14 14:12:09 2009 -0800 iwlwifi: fix more eeprom endian bugs I've also for a long time had a problem with the temperature calculation code, which I had fixed by byte-swapping the values, and now it turns out that was the correct fix after all. Also, any use of iwl_eeprom_query_addr() that is for more than a u8 must be cast to little endian, and some structs as well. Fix all this. Again, no real impact on platforms that already are little endian. Signed-off-by: Johannes Berg Cc: stable@kernel.org Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit af6b8ee38833b39f70946f767740565ceb126961 Author: Johannes Berg Date: Mon Dec 14 14:12:08 2009 -0800 iwlwifi: fix EEPROM/OTP reading endian annotations and a bug The construct "le16_to_cpu((__force __le16)(r >> 16))" has always bothered me when looking through the iwlwifi code, it shouldn't be necessary to __force anything, and before this code, "r" was obtained with an ioread32, which swaps each of the two u16 values in it properly when swapping the entire u32 value. I've had arguments about this code with people before, but always conceded they were right because removing it only made things not work at all on big endian platforms. However, analysing a failure of the OTP reading code, I now finally figured out what is going on, and why my intuition about that code being wrong was right all along. It turns out that the 'priv->eeprom' u8 array really wants to have the data in it in little endian. So the force code above and all really converts *to* little endian, not from it. Cf., for instance, the function iwl_eeprom_query16() -- it reads two u8 values and combines them into a u16, in a little-endian way. And considering it more, it makes sense to have the eeprom array as on the device, after all not all values really are 16-bit values, the MAC address for instance is not. Now, what this really means is that all the annotations are completely wrong. The eeprom reading code should fill the priv->eeprom array as a __le16 array, with __le16 values. This also means that iwl_read_otp_word() should really have a __le16 pointer as the data argument, since it should be filling that in a format suitable for priv->eeprom. Propagating these changes throughout, iwl_find_otp_image() is found to be, now obviously visible, defective -- it uses the data returned by iwl_read_otp_word() directly as if it was CPU endianness. Fixing that, which is this hunk of the patch: - next_link_addr = link_value * sizeof(u16); + next_link_addr = le16_to_cpu(link_value) * sizeof(u16); is the only real change of this patch. Everything else is just fixing the sparse annotations. Also, the bug only shows up on big endian platforms with a 1000 series card. 5000 and previous series do not use OTP, and 6000 series has shadow RAM support which means we don't ever use the defective code on any cards but 1000. Signed-off-by: Johannes Berg Cc: stable@kernel.org Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit 93b6bd26b74efe46b4579592560f9f1cb7b61994 Author: Gertjan van Wingerde Date: Mon Dec 14 20:33:55 2009 +0100 rt2x00: Disable powersaving for rt61pci and rt2800pci. We've had many reports of rt61pci failures with powersaving enabled. Therefore, as a stop-gap measure, disable powersaving of the rt61pci until we have found a proper solution. Also disable powersaving on rt2800pci as it most probably will show the same problem. Cc: stable@kernel.org Signed-off-by: Gertjan van Wingerde Acked-by: Ivo van Doorn Signed-off-by: John W. Linville commit 855da5e07ef4dba5f23d8f6f31004116ba16c52a Author: Julia Lawall Date: Sun Dec 13 17:07:45 2009 +0100 drivers/net/wireless: Correct code taking the size of a pointer sizeof(iv16) and sizeof(iv32) are the sizes of pointers. Change them to the size of the copied data. Furthermore, iveiv_entry is a local structure that has just been initialized and is not visible outside this function. Thus, there would seem to be no point to copy data into it. The order of the arguments is thus changed to copy the data into the parameters, which are provided as pointers, suggesting in this case that they should be used to return values. A simplified version of the semantic patch that finds the first problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // Signed-off-by: Julia Lawall Acked-by: Gertjan van Wingerde Acked-by: Ivo van Doorn Signed-off-by: John W. Linville commit 4d91f9f3730d6d82a3ba67cae215a1823ba6a191 Author: Benoit Papillault Date: Sat Dec 12 00:22:35 2009 +0100 ath9k: Last fix for TX software padding. First, we copy/paste the padding stuff from ath9k_tx to ath_tx_cabq since it needs to same kind of padding, but for internally generated beacons. Next, software padding done on TX needs to be removed before calling ieee80211_tx_status. The code was already there in ath_tx_complete but it was wrong. Fix it by using ath9k_cmn_padpos. This later code has been tested by sending packets to a monitor interface and reading packets from the same interface. Signed-off-by: Benoit PAPILLAULT Signed-off-by: John W. Linville commit 521d9bce86331d8261213b807a9127f7e2ec046b Author: Wey-Yi Guy Date: Thu Dec 10 14:37:23 2009 -0800 iwlwifi: fix syslog message for event log dump size When trigger event log dumping from debugfs, the entire event log should be dumped and the size should match the number of events being dump. Signed-off-by: Wey-Yi Guy Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit f8701fe3aec24fcfb0dfa19aab47904611f96daf Author: Reinette Chatre Date: Thu Dec 10 14:37:22 2009 -0800 iwlwifi: power up all devices for EEPROM read Recent commits "iwlwifi: remove power-wasting calls to apm_ops.init()" and "iwlagn: power up device before initializing EEPROM" had the goal of reducing device power consumption from the time the module is loaded until the interface is brought up and the device's power saving mechanisms kick in. The idea is that once the module is loaded there is no need for the device to consume power until the interface is brought up. With the current solution the device is only powered up during EEPROM read, and then so also only if the EEPROM type is OTP. We have found that on certain platforms even non-OTP devices require power to be up during EEPROM read. On these platforms the driver never loads and the system log contains the following: iwlagn 0000:03:00.0: MAC is in deep sleep!. CSR_GP_CNTRL = 0x080403D8 We thus now power up all devices during EEPROM read. Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit 64a76b504b04b5da16d1e7658a95dd126594e02f Author: Zhu Yi Date: Thu Dec 10 14:37:21 2009 -0800 iwlwifi: allocated rx page accounting cleanup In iwlwifi, priv->alloc_rxb_page is used to keep track of the Rx pages allocated by the driver. This cleans up the page free routines by introducing __iwl_free_pages/iwl_free_pages so that the accounting is more accurate and less error prone. This also fixes two instances where the counter was not updated. Signed-off-by: Zhu Yi Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville commit ce9277fb08e6e721482f7011ca28dcd0449b197c Merge: f797d98 0f76480 Author: Joerg Roedel Date: Mon Dec 21 15:58:19 2009 +0100 Merge branches 'dma-debug/fixes' and 'amd-iommu/fixes' into iommu/fixes commit 9504e0864b58b4a304820dcf3755f1da80d5e72f Author: Martin K. Petersen Date: Mon Dec 21 15:55:51 2009 +0100 block: Fix topology stacking for data and discard alignment The stacking code incorrectly scaled up the data offset in some cases causing misaligned devices to report alignment. Rewrite the stacking algorithm to remedy this and apply the same alignment principles to the discard handling. Signed-off-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 0f764806438d5576ac58898332e5dcf30bb8a679 Author: Joerg Roedel Date: Mon Dec 21 15:51:23 2009 +0100 x86/amd-iommu: Fix initialization failure panic The assumption that acpi_table_parse passes the return value of the hanlder function to the caller proved wrong recently. The return value of the handler function is totally ignored. This makes the initialization code for AMD IOMMU buggy in a way that could cause a kernel panic on initialization. This patch fixes the issue in the AMD IOMMU driver. Cc: stable@kernel.org Signed-off-by: Joerg Roedel commit f797d9881b62c2ddb1d2e7bd80d87141949c84aa Author: Shaun Ruffell Date: Thu Dec 17 18:00:36 2009 -0600 dma-debug: Do not add notifier when dma debugging is disabled. If CONFIG_HAVE_DMA_API_DEBUG is defined and "dma_debug=off" is specified on the kernel command line, when you detach a driver from a device you can cause the following NULL pointer dereference: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] dma_debug_device_change+0x5d/0x117 The problem is that the dma_debug_device_change notifier function is added to the bus notifier chain even though the dma_entry_hash array was never initialized. If dma debugging is disabled, this patch both prevents dma_debug_device_change notifiers from being added to the chain, and additionally ensures that the dma_debug_device_change notifier function is a no-op. Cc: stable@kernel.org Signed-off-by: Shaun Ruffell Signed-off-by: Joerg Roedel commit 820cd61a28503598f4262c544082ccb33678b9fc Author: Huang Weiyi Date: Sun Dec 13 22:05:03 2009 +0800 drbd: remove unused #include Remove unused #include ('s) in drivers/block/drbd/drbd_main.c drivers/block/drbd/drbd_receiver.c drivers/block/drbd/drbd_worker.c Signed-off-by: Huang Weiyi Signed-off-by: Philipp Reisner commit 7b886f4f7a051dc88165684cbcddd98e22bd0203 Author: Huang Weiyi Date: Wed Dec 9 21:09:12 2009 +0800 drbd: remove duplicated #include Remove duplicated #include('s) in drivers/block/drbd/drbd_worker.c Signed-off-by: Huang Weiyi Signed-off-by: Philipp Reisner commit 49829ea74f790d3be2e803a617e714f5b9a5ed50 Author: Roel Kluin Date: Tue Dec 15 22:55:44 2009 +0100 drbd: Fix test of unsigned in _drbd_fault_random() rsp->count is unsigned so the test does not work. Signed-off-by: Roel Kluin Signed-off-by: Andrew Morton Signed-off-by: Philipp Reisner commit 7d4e9d0962cd0f6a30b01e256756dd10606dab30 Author: Emese Revfy Date: Mon Dec 14 00:59:30 2009 +0100 drbd: Constify struct file_operations Signed-off-by: Emese Revfy Signed-off-by: Philipp Reisner commit 7e25f44cbf8d95a9748fdfd19c06145f19fd10e3 Author: Randy Dunlap Date: Fri Dec 18 15:17:12 2009 -0800 Documentation: Update ftrace-design.txt Correct grammos. Spell out words. Add missing words. Consistent use of "mcount()" function name. Signed-off-by: Randy Dunlap Acked-by: Steven Rostedt LKML-Reference: <4B2C0D78.6060707@oracle.com> Signed-off-by: Ingo Molnar commit b41df645c829d961068aecd30909c2675acbaaea Author: Randy Dunlap Date: Fri Dec 18 15:17:04 2009 -0800 Documentation: Update tracepoint-analysis.txt Fix grammar, spelling, punctuation, hyphenation, section numbering. Tell what PCL means. Signed-off-by: Randy Dunlap Cc: Mel Gorman Cc: Steven Rostedt LKML-Reference: <4B2C0D70.4030707@oracle.com> Signed-off-by: Ingo Molnar commit 360b6e5cab1cea1d838b0100956ce0d3dbccbb6f Author: Randy Dunlap Date: Fri Dec 18 15:16:56 2009 -0800 Documentation: Update mmiotrace.txt Fix typos, spellos, hyphenation, line lengths. BTW: are there some userspace tools? There is a reference to some at the wiki page, but there are no tools listed there. Signed-off-by: Randy Dunlap Acked-by: Pekka Paalanen LKML-Reference: <4B2C0D68.6080401@oracle.com> Signed-off-by: Ingo Molnar commit a6d52d70677e99bdb89b6921c265d0a58c22e597 Author: Dan Williams Date: Sat Dec 19 15:36:02 2009 -0700 ioat2,3: put channel hardware in known state at init Put the ioat2 and ioat3 state machines in the halted state with all errors cleared. The ioat1 init path is not disturbed for stability, there are no reported ioat1 initiaization issues. Cc: Reported-by: Roland Dreier Tested-by: Roland Dreier Acked-by: Simon Horman Signed-off-by: Dan Williams commit 0422a4fc2c6a41c3d4184984797512af2650014e Author: Arnaldo Carvalho de Melo Date: Fri Dec 18 16:35:58 2009 -0200 perf diff: Fix usage array, it must end with a NULL entry Fixing this: [acme@doppio linux-2.6-tip]$ perf diff --hell Error: unknown option `hell' usage: perf diff [] [old_file] [new_file] Segmentation fault [acme@doppio linux-2.6-tip]$ Also go over the other such arrays to check if they all were OK, they are, but there were some minor changes to do like making one static and renaming another to match the command it refers to. Signed-off-by: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1261161358-23959-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar commit 8bee738bb1979c8bf7b42716b772522ab7d26b0c Author: Masami Hiramatsu Date: Fri Dec 18 10:40:13 2009 -0500 x86: Fix objdump version check in chkobjdump.awk for different formats. Different version of objdump says its version in different way; GNU objdump 2.16.1 or GNU objdump version 2.19.51.0.14-1.fc11 20090722 This patch uses the first argument which starts with a number as version string. Changes in v2: - Remove unneeded increment. Signed-off-by: Masami Hiramatsu LKML-Reference: <20091218154012.16960.5113.stgit@dhcp-100-2-132.bos.redhat.com> Suggested-by: H. Peter Anvin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Signed-off-by: H. Peter Anvin commit 65b32a573eefa1cdd3cbe5ea59326308e6c3b9ad Author: Vivek Goyal Date: Wed Dec 16 17:52:59 2009 -0500 cfq-iosched: Remove prio_change logic for workload selection o CFQ now internally divides cfq queues in therr workload categories. sync-idle, sync-noidle and async. Which workload to run depends primarily on rb_key offset across three service trees. Which is a combination of mulitiple things including what time queue got queued on the service tree. There is one exception though. That is if we switched the prio class, say we served some RT tasks and again started serving BE class, then with-in BE class we always started with sync-noidle workload irrespective of rb_key offset in service trees. This can provide better latencies for sync-noidle workload in the presence of RT tasks. o This patch gets rid of that exception and which workload to run with-in class always depends on lowest rb_key across service trees. The reason being that now we have multiple BE class groups and if we always switch to sync-noidle workload with-in group, we can potentially starve a sync-idle workload with-in group. Same is true for async workload which will be in root group. Also the workload-switching with-in group will become very unpredictable as it now depends whether some RT workload was running in the system or not. Signed-off-by: Vivek Goyal Reviewed-by: Gui Jianfeng Acked-by: Corrado Zoccolo Signed-off-by: Jens Axboe commit fb104db41e6e006c85ce1097f372cd1e10c1755c Author: Vivek Goyal Date: Wed Dec 16 17:52:58 2009 -0500 cfq-iosched: Get rid of nr_groups o Currently code does not seem to be using cfqd->nr_groups. Get rid of it. Signed-off-by: Vivek Goyal Reviewed-by: Gui Jianfeng Signed-off-by: Jens Axboe commit 1db32c40600437c5e049796bd32f49f61244c6ef Author: Vivek Goyal Date: Wed Dec 16 17:52:57 2009 -0500 cfq-iosched: Remove the check for same cfq group from allow_merge o allow_merge() already checks if submitting task is pointing to same cfqq as rq has been queued in. If everything is fine, we should not be having a task in one cgroup and having a pointer to cfqq in other cgroup. Well I guess in some situations it can happen and that is, when a random IO queue has been moved into root cgroup for group_isolation=0. In this case, tasks's cgroup/group is different from where actually cfqq is, but this is intentional and in this case merging should be allowed. The second situation is where due to close cooperator patches, multiple processes can be sharing a cfqq. If everything implemented right, we should not end up in a situation where tasks from different processes in different groups are sharing the same cfqq as we allow merging of cooperating queues only if they are in same group. Signed-off-by: Vivek Goyal Reviewed-by: Gui Jianfeng Signed-off-by: Jens Axboe commit 4a63b030d75a063b910b2bab014d84837cb33eb7 Author: Roel Kluin Date: Fri Dec 18 12:38:11 2009 +0100 drbd: fix test of unsigned in _drbd_fault_random() rsp->count is unsigned so the test does not work. Signed-off-by: Roel Kluin Cc: Lars Ellenberg Cc: Philipp Reisner Signed-off-by: Jens Axboe commit 1de6129f381b4907013ccea08a3bdea8c966d50a Author: FUJITA Tomonori Date: Fri Dec 18 12:37:48 2009 +0100 block: remove Documentation/block/as-iosched.txt Commit 492af6350a5ccf087e4964104a276ed358811458 removed the AS IO scheduler, so remove its documentation too. Signed-off-by: FUJITA Tomonori Signed-off-by: Jens Axboe commit e02a0e47a3f061c1a53fc4376332a988ec047e8a Author: Dan Williams Date: Thu Dec 17 13:55:38 2009 -0700 async_tx: expand async raid6 test to cover ioatdma corner case Add explicit 11 and 12 disks cases to exercise the 0 < src_cnt % 8 < 3 corner case in the ioatdma driver. Signed-off-by: Dan Williams commit cd78809f6191485a90ea6c92c2b58900ab5c156f Author: Dan Williams Date: Thu Dec 17 13:52:39 2009 -0700 ioat3: fix p-disabled q-continuation When continuing a pq calculation the driver needs 3 extra sources. The driver can perform a 3 source calculation with a single descriptor, but needs an extended descriptor to process up to 8 sources in one operation. However, in the p-disabled case only one extra source is needed. When continuing a p-disabled operation there are occasions (i.e. 0 < src_cnt % 8 < 3) where the tail operation does not need an extended descriptor. Properly account for this fact otherwise invalid 'dmacount' values will be written to hardware usually causing the channel to halt with 'invalid descriptor' errors. Cc: Signed-off-by: Dan Williams commit 3542a113ab2f5880f1b62e5909d754250fb57d6b Author: Guennadi Liakhovetski Date: Thu Dec 17 09:41:39 2009 -0700 sh: fix DMA driver's descriptor chaining and cookie assignment The SH DMA driver wrongly assigns negative cookies to transfer descriptors, also, its chaining of partial descriptors is broken. The latter problem is usually invisible, because maximum transfer size per chunk is 16M, but if you artificially set this limit lower, the driver fails. Since cookies are also used in chunk management, both these problems are fixed in one patch. As side effects a possible memory leak, when descriptors are prepared, but not submitted, and multiple races have also been fixed. Signed-off-by: Guennadi Liakhovetski Acked-by: Paul Mundt Acked-by: Nobuhiro Iwamatsu Signed-off-by: Dan Williams commit 2d1c861871d767153538a77c498752b36d4bb4b8 Author: Benjamin Herrenschmidt Date: Wed Dec 9 17:52:13 2009 +1100 PCI/cardbus: Add a fixup hook and fix powerpc The cardbus code creates PCI devices without ever going through the necessary fixup bits and pieces that normal PCI devices go through. There's in fact a commented out call to pcibios_fixup_bus() in there, it's commented because ... it doesn't work. I could make pcibios_fixup_bus() do the right thing on powerpc easily but I felt it cleaner instead to provide a specific hook pci_fixup_cardbus for which a weak empty implementation is provided by the PCI core. This fixes cardbus on powerbooks and probably all other PowerPC platforms which was broken completely for ever on some platforms and since 2.6.31 on others such as PowerBooks when we made the DMA ops mandatory (since those are setup by the fixups). Acked-by: Dominik Brodowski Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jesse Barnes commit 47376ceba54600cec4dd9e7c4fe8b98e4269633a Author: Frederic Weisbecker Date: Wed Dec 16 23:25:50 2009 +0100 reiserfs: Fix reiserfs lock <-> inode mutex dependency inversion The reiserfs lock -> inode mutex dependency gets inverted when we relax the lock while walking to the tree. To fix this, use a specialized version of reiserfs_mutex_lock_safe that takes care of mutex subclasses. Then we can grab the inode mutex with I_MUTEX_XATTR subclass without any reiserfs lock dependency. This fixes the following report: [ INFO: possible circular locking dependency detected ] 2.6.32-06793-gf405425-dirty #2 ------------------------------------------------------- mv/18566 is trying to acquire lock: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x28= /0x40 but task is already holding lock: (&sb->s_type->i_mutex_key#5/3){+.+.+.}, at: [] reiserfs_for_each_xattr+0x10c/0x380 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#5/3){+.+.+.}: [] validate_chain+0xa23/0xf70 [] __lock_acquire+0x4e5/0xa70 [] lock_acquire+0x7a/0xa0 [] mutex_lock_nested+0x5f/0x2b0 [] reiserfs_for_each_xattr+0x84/0x380 [] reiserfs_delete_xattrs+0x15/0x50 [] reiserfs_delete_inode+0x8f/0x140 [] generic_delete_inode+0x9c/0x150 [] generic_drop_inode+0x3d/0x60 [] iput+0x47/0x50 [] do_unlinkat+0xdb/0x160 [] sys_unlink+0x10/0x20 [] sysenter_do_call+0x12/0x36 -> #0 (&REISERFS_SB(s)->lock){+.+.+.}: [] validate_chain+0xf68/0xf70 [] __lock_acquire+0x4e5/0xa70 [] lock_acquire+0x7a/0xa0 [] mutex_lock_nested+0x5f/0x2b0 [] reiserfs_write_lock+0x28/0x40 [] search_by_key+0x1f7b/0x21b0 [] search_by_entry_key+0x1f/0x3b0 [] reiserfs_find_entry+0x77/0x400 [] reiserfs_lookup+0x85/0x130 [] __lookup_hash+0xb4/0x110 [] lookup_one_len+0xb3/0x100 [] reiserfs_for_each_xattr+0x120/0x380 [] reiserfs_delete_xattrs+0x15/0x50 [] reiserfs_delete_inode+0x8f/0x140 [] generic_delete_inode+0x9c/0x150 [] generic_drop_inode+0x3d/0x60 [] iput+0x47/0x50 [] dentry_iput+0x6f/0xf0 [] d_kill+0x24/0x50 [] dput+0x5b/0x120 [] sys_renameat+0x1b9/0x230 [] sys_rename+0x28/0x30 [] sysenter_do_call+0x12/0x36 other info that might help us debug this: 2 locks held by mv/18566: #0: (&sb->s_type->i_mutex_key#5/1){+.+.+.}, at: [] lock_rename+0xcc/0xd0 #1: (&sb->s_type->i_mutex_key#5/3){+.+.+.}, at: [] reiserfs_for_each_xattr+0x10c/0x380 stack backtrace: Pid: 18566, comm: mv Tainted: G C 2.6.32-06793-gf405425-dirty #2 Call Trace: [] ? printk+0x18/0x1e [] print_circular_bug+0xc0/0xd0 [] validate_chain+0xf68/0xf70 [] ? trace_hardirqs_off+0xb/0x10 [] __lock_acquire+0x4e5/0xa70 [] lock_acquire+0x7a/0xa0 [] ? reiserfs_write_lock+0x28/0x40 [] mutex_lock_nested+0x5f/0x2b0 [] ? reiserfs_write_lock+0x28/0x40 [] ? reiserfs_write_lock+0x28/0x40 [] ? schedule+0x27a/0x440 [] reiserfs_write_lock+0x28/0x40 [] search_by_key+0x1f7b/0x21b0 [] ? __lock_acquire+0x506/0xa70 [] ? lock_release_non_nested+0x1e7/0x340 [] ? reiserfs_write_lock+0x28/0x40 [] ? trace_hardirqs_on_caller+0x124/0x170 [] ? trace_hardirqs_on+0xb/0x10 [] ? T.316+0x15/0x1a0 [] ? sched_clock_cpu+0x9d/0x100 [] search_by_entry_key+0x1f/0x3b0 [] ? __mutex_unlock_slowpath+0x9a/0x120 [] ? trace_hardirqs_on_caller+0x124/0x170 [] reiserfs_find_entry+0x77/0x400 [] reiserfs_lookup+0x85/0x130 [] ? sched_clock_cpu+0x9d/0x100 [] __lookup_hash+0xb4/0x110 [] lookup_one_len+0xb3/0x100 [] reiserfs_for_each_xattr+0x120/0x380 [] ? delete_one_xattr+0x0/0x1c0 [] ? math_error+0x22/0x150 [] ? reiserfs_write_lock+0x28/0x40 [] reiserfs_delete_xattrs+0x15/0x50 [] ? reiserfs_write_lock+0x28/0x40 [] reiserfs_delete_inode+0x8f/0x140 [] ? generic_delete_inode+0x5f/0x150 [] ? reiserfs_delete_inode+0x0/0x140 [] generic_delete_inode+0x9c/0x150 [] generic_drop_inode+0x3d/0x60 [] iput+0x47/0x50 [] dentry_iput+0x6f/0xf0 [] d_kill+0x24/0x50 [] dput+0x5b/0x120 [] sys_renameat+0x1b9/0x230 [] ? sched_clock_cpu+0x9d/0x100 [] ? trace_hardirqs_off+0xb/0x10 [] ? cpu_clock+0x4e/0x60 [] ? do_page_fault+0x155/0x370 [] ? up_read+0x16/0x30 [] ? do_page_fault+0x155/0x370 [] sys_rename+0x28/0x30 [] sysenter_do_call+0x12/0x36 Reported-by: Alexander Beregalov Signed-off-by: Frederic Weisbecker Cc: Chris Mason Cc: Ingo Molnar Cc: Thomas Gleixner commit 7e8af37a9a71b479f58d2fd5f0ddaa6780c51f11 Author: Stefan Assmann Date: Thu Dec 3 18:00:10 2009 +0100 PCI: change PCI nomenclature in drivers/pci/ (non-comment changes) Changing occurrences of variants of PCI-X and PCIe to the PCI-SIG terms listed in the "Trademark and Logo Usage Guidelines". http://www.pcisig.com/developers/procedures/logos/Trademark_and_Logo_Usage_Guidelines_updated_112206.pdf Patch is limited to drivers/pci/ and changes concern non-comment parts or anything that might be visible to the user. Signed-off-by: Stefan Assmann Signed-off-by: Jesse Barnes commit 45e829ea412760d2404d7dfc42528df46aedbf62 Author: Stefan Assmann Date: Thu Dec 3 06:49:24 2009 -0500 PCI: change PCI nomenclature in drivers/pci/ (comment changes) Changing occurrences of variants of PCI-X and PCIe to the PCI-SIG terms listed in the "Trademark and Logo Usage Guidelines". http://www.pcisig.com/developers/procedures/logos/Trademark_and_Logo_Usage_Guidelines_updated_112206.pdf Patch is limited to drivers/pci/ and changes concern comments only. Signed-off-by: Stefan Assmann Signed-off-by: Jesse Barnes commit 5714868812b563ba8816c1d974f4f07c76941c30 Author: Jiri Slaby Date: Tue Dec 15 10:19:50 2009 +0900 PCI: fix section mismatch on update_res() Remark update_res from __init to __devinit as it is called also from __devinit functions. This patch removes the following warning message: WARNING: vmlinux.o(.devinit.text+0x774a): Section mismatch in reference from the function pci_root_bus_res() to the function .init.text:update_res() The function __devinit pci_root_bus_res() references a function __init update_res(). If update_res is only used by pci_root_bus_res then annotate update_res with a matching annotation. Signed-off-by: Jiri Slaby Cc: Aristeu Sergio Cc: Jesse Barnes Cc: linux-pci@vger.kernel.org Cc: x86@kernel.org Signed-off-by: Hidetoshi Seto Signed-off-by: Jesse Barnes commit c763e7b58f71833e6cb7b05493eb1adda4811b08 Author: Dexuan Cui Date: Mon Dec 7 13:03:23 2009 +0800 PCI: add Intel 82599 Virtual Function specific reset method Handle device specific timeout and use FLR. Signed-off-by: Yu Zhao Signed-off-by: Dexuan Cui Signed-off-by: Jesse Barnes commit aeb30016fec3378c543cae33654c2144277fe674 Author: Dexuan Cui Date: Mon Dec 7 13:03:22 2009 +0800 PCI: add Intel USB specific reset method Handle device specific reset requirements (i.e. vendor reg for reset along with appropriate timeout). Signed-off-by: Yu Zhao Signed-off-by: Dexuan Cui Signed-off-by: Jesse Barnes commit b9c3b266411d27f1a6466c19d146d08db576bfea Author: Dexuan Cui Date: Mon Dec 7 13:03:21 2009 +0800 PCI: support device-specific reset methods Add a new type of quirk for resetting devices at pci_dev_reset time. This is necessary to handle device with nonstandard reset procedures, especially useful for guest drivers. Signed-off-by: Yu Zhao Signed-off-by: Dexuan Cui Signed-off-by: Jesse Barnes commit 2820f333e3b4ad96590093efbed7b3400bcf492b Author: Csaba Henk Date: Tue Dec 15 17:55:25 2009 +0530 PCI: Handle case when no pci device can provide cache line size hint Prior to this patch, if pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, ...) returns 0 for all dev, pci_cache_line_size ends up set to zero (instead of pci_dfl_cache_line_size). This patch ensures the pci_cache_line_size = pci_dfl_cache_line_size setting in the above scenario. This happens in case of a kvm-88 guest (where, consequently, the rtl8139 NIC failed to initialize). Acked-by: Tejun Heo Signed-off-by: Csaba Henk Signed-off-by: Jesse Barnes commit dc1a94ae1749d14c55f8b54e9d92bd89df82d51a Author: Rafael J. Wysocki Date: Sun Nov 29 16:35:54 2009 +0100 PCI/PM: Propagate wake-up enable for PCIe devices too Having read the PM part of the PCIe 2.0 specification more carefully I think that it was a mistake to restrict the wake-up enable propagation to non-PCIe devices, because if we do not request control of the root ports' PME registers via OSC, PCIe PME is supposed to be handled by the platform, just like the non-PCIe PME. Even if we do that, the wake-up propagation is done to allow the devices to wake up the system from sleep states which involves the platform anyway, so it won't hurt. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 15293df82bd1c15196e7cb336130c243e9a41806 Author: Detlef Riekenberg Date: Thu Dec 10 13:55:48 2009 +0100 vgaarbiter: fix a typo in the vgaarbiter Documentation I detected a typo, while reading "Documentation/vgaarbiter.txt". Fix the 'fieldd' mispelling. Signed-off-by: Detlef Riekenberg Signed-off-by: Jesse Barnes commit 4297a462f455e38f08976df7b16c849614a287da Author: Nicolas Ferre Date: Wed Dec 16 16:28:03 2009 +0100 dma: at_hdmac: correct incompatible type for argument 1 of 'spin_lock_bh' Correct a typo error in locking calls. Cc: Signed-off-by: Nicolas Ferre Signed-off-by: Dan Williams commit d24deb2580823ab0b8425790c6f5d18e2ff749d8 Author: Gertjan van Wingerde Date: Fri Dec 4 23:46:54 2009 +0100 mac80211: Add define for TX headroom reserved by mac80211 itself. Add a definition of the amount of TX headroom reserved by mac80211 itself for its own purposes. Also add BUILD_BUG_ON to validate the value. This define can then be used by drivers to request additional TX headroom in the most efficient manner. Signed-off-by: Gertjan van Wingerde Acked-by: Johannes Berg Signed-off-by: John W. Linville commit b2ec153a637409bd87952d44409905b7d98418b8 Author: Gertjan van Wingerde Date: Mon Dec 14 14:09:49 2009 -0500 rt2x00: Fix rt2800usb detection in rt2800lib. rt2800lib incorrectly detected whether RT2800USB was enabled because it didn't account for a modularized RT2800USB driver. Signed-off-by: Gertjan van Wingerde Acked-by: Ivo van Doorn Signed-off-by: John W. Linville commit 034fb4c95fc0fed4ec4a50778127b92c6f2aec01 Author: Surbhi Palande Date: Mon Dec 14 09:53:52 2009 -0500 ext4: replace BUG() with return -EIO in ext4_ext_get_blocks This patch fixes the Kernel BZ #14286. When the address of an extent corresponding to a valid block is corrupted, a -EIO should be reported instead of a BUG(). This situation should not normally not occur except in the case of a corrupted filesystem. If however it does, then the system should not panic directly but depending on the mount time options appropriate action should be taken. If the mount options so permit, the I/O should be gracefully aborted by returning a -EIO. http://bugzilla.kernel.org/show_bug.cgi?id=14286 Signed-off-by: Surbhi Palande Signed-off-by: "Theodore Ts'o" commit 51b7e3c9fbe7d22d4e355101e9a73b44fc5c9feb Author: Theodore Ts'o Date: Mon Dec 21 10:56:09 2009 -0500 ext4: add module aliases for ext2 and ext3 Add module aliases for ext2 and ext3 when CONFIG_EXT4_USE_FOR_EXT23 is set. This makes the existing user-space stuff like mkinitrd working as is. Signed-off-by: Takashi Iwai Signed-off-by: "Theodore Ts'o" commit 84c664730374248adaf420c0846a6158d64413c7 Author: David Howells Date: Mon Dec 21 10:54:09 2009 -0500 ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured Don't offer to build ext2/3 support into ext4 if ext4 itself is not configured on. Signed-off-by: David Howells Signed-off-by: "Theodore Ts'o" commit 149feb00d7c3f4f06896b245533c957b54e3e052 Author: Huang Weiyi Date: Mon Dec 14 09:24:20 2009 -0500 ext4: remove unused #include Remove unused #include ('s) in fs/ext4/block_validity.c fs/ext4/mballoc.h Signed-off-by: Huang Weiyi Signed-off-by: "Theodore Ts'o" commit cb1c2e51c5a72f093b5af384b11d2f1c2abd6c13 Author: Frederic Weisbecker Date: Sun Dec 13 23:32:06 2009 +0100 reiserfs: Fix reiserfs lock and journal lock inversion dependency When we were using the bkl, we didn't care about dependencies against other locks, but the mutex conversion created new ones, which is why we have reiserfs_mutex_lock_safe(), which unlocks the reiserfs lock before acquiring another mutex. But this trick actually fails if we have acquired the reiserfs lock recursively, as we try to unlock it to acquire the new mutex without inverted dependency, but we eventually only decrease its depth. This happens in the case of a nested inode creation/deletion. Say we have no space left on the device, we create an inode and tak the lock but fail to create its entry, then we release the inode using iput(), which calls reiserfs_delete_inode() that takes the reiserfs lock recursively. The path eventually ends up in journal_begin() where we try to take the journal safely but we fail because of the reiserfs lock recursion: [ INFO: possible circular locking dependency detected ] 2.6.32-06486-g053fe57 #2 ------------------------------------------------------- vi/23454 is trying to acquire lock: (&journal->j_mutex){+.+...}, at: [] do_journal_begin_r+0x64/0x2f0 but task is already holding lock: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x28/0x40 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&REISERFS_SB(s)->lock){+.+.+.}: [] validate_chain+0xa23/0xf70 [] __lock_acquire+0x4e5/0xa70 [] lock_acquire+0x7a/0xa0 [] mutex_lock_nested+0x5f/0x2b0 [] reiserfs_write_lock+0x28/0x40 [] do_journal_begin_r+0x6b/0x2f0 [] journal_begin+0x7f/0x120 [] reiserfs_remount+0x212/0x4d0 [] do_remount_sb+0x67/0x140 [] do_mount+0x436/0x6b0 [] sys_mount+0x66/0xa0 [] sysenter_do_call+0x12/0x36 -> #0 (&journal->j_mutex){+.+...}: [] validate_chain+0xf68/0xf70 [] __lock_acquire+0x4e5/0xa70 [] lock_acquire+0x7a/0xa0 [] mutex_lock_nested+0x5f/0x2b0 [] do_journal_begin_r+0x64/0x2f0 [] journal_begin+0x7f/0x120 [] reiserfs_delete_inode+0x9f/0x140 [] generic_delete_inode+0x9c/0x150 [] generic_drop_inode+0x3d/0x60 [] iput+0x47/0x50 [] reiserfs_create+0x16c/0x1c0 [] vfs_create+0xc1/0x130 [] do_filp_open+0x81c/0x920 [] do_sys_open+0x4f/0x110 [] sys_open+0x29/0x40 [] sysenter_do_call+0x12/0x36 other info that might help us debug this: 2 locks held by vi/23454: #0: (&sb->s_type->i_mutex_key#5){+.+.+.}, at: [] do_filp_open+0x27e/0x920 #1: (&REISERFS_SB(s)->lock){+.+.+.}, at: [] reiserfs_write_lock+0x28/0x40 stack backtrace: Pid: 23454, comm: vi Not tainted 2.6.32-06486-g053fe57 #2 Call Trace: [] ? printk+0x18/0x1e [] print_circular_bug+0xc0/0xd0 [] validate_chain+0xf68/0xf70 [] ? trace_hardirqs_off+0xb/0x10 [] __lock_acquire+0x4e5/0xa70 [] lock_acquire+0x7a/0xa0 [] ? do_journal_begin_r+0x64/0x2f0 [] mutex_lock_nested+0x5f/0x2b0 [] ? do_journal_begin_r+0x64/0x2f0 [] ? do_journal_begin_r+0x64/0x2f0 [] ? delete_one_xattr+0x0/0x1c0 [] do_journal_begin_r+0x64/0x2f0 [] journal_begin+0x7f/0x120 [] ? reiserfs_delete_xattrs+0x15/0x50 [] reiserfs_delete_inode+0x9f/0x140 [] ? generic_delete_inode+0x5f/0x150 [] ? reiserfs_delete_inode+0x0/0x140 [] generic_delete_inode+0x9c/0x150 [] generic_drop_inode+0x3d/0x60 [] iput+0x47/0x50 [] reiserfs_create+0x16c/0x1c0 [] ? inode_permission+0x7d/0xa0 [] vfs_create+0xc1/0x130 [] ? reiserfs_create+0x0/0x1c0 [] do_filp_open+0x81c/0x920 [] ? trace_hardirqs_off+0xb/0x10 [] ? _spin_unlock+0x1d/0x20 [] ? alloc_fd+0xba/0xf0 [] do_sys_open+0x4f/0x110 [] sys_open+0x29/0x40 [] sysenter_do_call+0x12/0x36 To fix this, use reiserfs_lock_once() from reiserfs_delete_inode() which prevents from adding reiserfs lock recursion. Reported-by: Alexander Beregalov Signed-off-by: Frederic Weisbecker Cc: Chris Mason Cc: Ingo Molnar Cc: Thomas Gleixner commit 500f5a0bf5f0624dae34307010e240ec090e4cde Author: Frederic Weisbecker Date: Sun Dec 13 22:48:54 2009 +0100 reiserfs: Fix possible recursive lock While allocating the bitmap using vmalloc, we hold the reiserfs lock, which makes lockdep later reporting a possible deadlock as we may swap out pages to allocate memory and then take the reiserfs lock recursively: inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage. kswapd0/312 [HC0[0]:SC0[0]:HE1:SE1] takes: (&REISERFS_SB(s)->lock){+.+.?.}, at: [] reiserfs_write_lock+0x28/0x40 {RECLAIM_FS-ON-W} state was registered at: [] mark_held_locks+0x62/0x90 [] lockdep_trace_alloc+0x9a/0xc0 [] kmem_cache_alloc+0x26/0xf0 [] __get_vm_area_node+0x6c/0xf0 [] __vmalloc_node+0x7e/0xa0 [] vmalloc+0x2b/0x30 [] reiserfs_init_bitmap_cache+0x39/0x70 [] reiserfs_fill_super+0x2e8/0xb90 [] get_sb_bdev+0x145/0x180 [] get_super_block+0x21/0x30 [] vfs_kern_mount+0x40/0xd0 [] do_kern_mount+0x39/0xd0 [] do_mount+0x2c7/0x6b0 [] sys_mount+0x66/0xa0 [] mount_block_root+0xc4/0x245 [] mount_root+0x59/0x5f [] prepare_namespace+0x111/0x14b [] kernel_init+0xcf/0xdb [] kernel_thread_helper+0x7/0x1c This is actually fine for two reasons: we call vmalloc at mount time then it's not in the swapping out path. Also the reiserfs lock can be acquired recursively, but since its implementation depends on a mutex, it's hard and not necessary worth it to teach that to lockdep. The lock is useless at mount time anyway, at least until we replay the journal. But let's remove it from this path later as this needs more thinking and is a sensible change. For now we can just relax the lock around vmalloc, Reported-by: Alexander Beregalov Signed-off-by: Frederic Weisbecker Cc: Chris Mason Cc: Ingo Molnar Cc: Thomas Gleixner commit 6548698f929814375fa5d62ae1db96959b0418c1 Merge: 1d2c6cf 22763c5 Author: Frederic Weisbecker Date: Mon Dec 7 07:28:35 2009 +0100 Merge commit 'v2.6.32' into reiserfs/kill-bkl Merge-reason: The tree was based 2.6.31. It's better to be up to date with 2.6.32. Although no conflicting changes were made in between, it gives benchmarking results closer to the lastest kernel behaviour. commit a994b8fa669f16c50728328c3735722a3f20652e Author: Steve French Date: Mon Dec 7 05:44:46 2009 +0000 [CIFS] Enable mmap on forcedirectio mounts openoffice and gedit failed with 'direct' options Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French commit a2934c7b363ddcc001964f2444649f909e583bef Author: Jeff Layton Date: Thu Dec 3 08:09:41 2009 -0500 cifs: NULL out tcon, pSesInfo, and srvTcp pointers when chasing DFS referrals The scenario is this: The kernel gets EREMOTE and starts chasing a DFS referral at mount time. The tcon reference is put, which puts the session reference too, but neither pointer is zeroed out. The mount gets retried (goto try_mount_again) with new mount info. Session setup fails fails and rc ends up being non-zero. The code then falls through to the end and tries to put the previously freed tcon pointer again. Oops at: cifs_put_smb_ses+0x14/0xd0 Fix this by moving the initialization of the rc variable and the tcon, pSesInfo and srvTcp pointers below the try_mount_again label. Also, add a FreeXid() before the goto to prevent xid "leaks". Signed-off-by: Jeff Layton Reported-by: Gustavo Carvalho Homem CC: stable Signed-off-by: Steve French