aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-06-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds3-13/+14
Pull crypto fix from Herbert Xu: "This fixes a crash in the crypto layer exposed by an SCTP test tool" * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algboss - Hold ref count on larval
2013-06-29Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-0/+5
Pull drm/qxl fix from Dave Airlie: "Bad me forgot an access check, possible security issue, but since this is the first kernel with it, should be fine to just put it in now" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/qxl: add missing access check for execbuffer ioctl
2013-06-29Fix: kernel/ptrace.c: ptrace_peek_siginfo() missing __put_user() validationMathieu Desnoyers1-9/+11
This __put_user() could be used by unprivileged processes to write into kernel memory. The issue here is that even if copy_siginfo_to_user() fails, the error code is not checked before __put_user() is executed. Luckily, ptrace_peek_siginfo() has been added within the 3.10-rc cycle, so it has not hit a stable release yet. Signed-off-by: Mathieu Desnoyers <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Cc: Andrey Vagin <[email protected]> Cc: Roland McGrath <[email protected]> Cc: Paul McKenney <[email protected]> Cc: David Howells <[email protected]> Cc: Dave Jones <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Pedro Alves <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-06-29Merge branch 'for-linus' of ↵Linus Torvalds1-1/+5
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph fix from Sage Weil: "This is a recently spotted regression in the snapshot behavior... It turns out several tests weren't being run in the nightlies so this took a while to spot" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: send snapshot context with writes
2013-06-29Merge branch 'for-linus' of ↵Linus Torvalds1-15/+39
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ubifs fixes from Al Viro: "A couple of ubifs readdir/lseek race fixes. Stable fodder, really nasty..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: UBIFS: fix a horrid bug UBIFS: prepare to fix a horrid bug
2013-06-29Merge tag 'for-linus-20130628' of ↵Linus Torvalds2-34/+22
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-mn10300 Pull two MN10300 fixes from David Howells: "The first fixes a problem with passing arrays rather than pointers to get_user() where __typeof__ then wants to declare and initialise an array variable which gcc doesn't like. The second fixes a problem whereby putting mem=xxx into the kernel command line causes init=xxx to get an incorrect value." * tag 'for-linus-20130628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-mn10300: mn10300: Use early_param() to parse "mem=" parameter mn10300: Allow to pass array name to get_user()
2013-06-29Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds1-2/+5
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "Correct an ordering issue in the tick broadcast code. I really wish we'd get compensation for pain and suffering for each line of code we write to work around dysfunctional timer hardware." * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick: Fix tick_broadcast_pending_mask not cleared
2013-06-29Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds1-7/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Ingo Molnar: "One more fix for a recently discovered bug" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Disable monitoring on setuid processes for regular users
2013-06-29Merge branch 'devel-stable' into for-nextRussell King77-304/+2241
Conflicts: arch/arm/Makefile arch/arm/include/asm/glue-proc.h
2013-06-29Merge branches 'fixes', 'mcpm', 'misc' and 'mmci' into for-nextRussell King38-192/+592
2013-06-29ARM: 7775/1: mm: Remove do_sect_fault from LPAE codeSteven Capper1-0/+2
For LPAE, do_sect_fault used to be invoked as the second level access flag handler. When transparent huge pages were introduced for LPAE, do_page_fault was used instead. Unfortunately, do_sect_fault remains defined but not used for LPAE code resulting in a compile warning. This patch surrounds do_sect_fault with #ifndef CONFIG_ARM_LPAE to fix this warning. Signed-off-by: Steve Capper <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-06-29ARM: 7777/1: Avoid extra calls to the C compilerDouglas Anderson1-25/+31
Starting up the C compiler can be a slow operation on some systems. Though these calls don't individually take a lot of time, they add up. Rearrange the ARM Makefile a bit to avoid extra calls to the compiler when they can be easily avoided. When running with the Chrome OS ARM cross compiler "armv7a-cros-linux-gnueabi-", this shaved .55 seconds (from 5.31 seconds to 4.76 seconds) off an incremental build of the kernel: time make -j32 ARCH=arm CROSS_COMPILE=armv7a-cros-linux-gnueabi- Thanks to Mike Frysinger for the clean trick to make this work. Signed-off-by: Doug Anderson <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-06-29ARM: 7774/1: Fix dtb dependency to use order-only prerequisitesDouglas Anderson1-1/+2
The %.dtb dependency is specified to depend on the PHONY "scripts". That means that it'll build every time even if the underlying dtb file hasn't been touched. Use an order-only prerequisites to fix this. Also mark "dtbs" as PHONY for correctness. This was broken in (70b0476 ARM: 7513/1: Make sure dtc is built before running it). Reported-by: Mike Frysinger <[email protected]> Signed-off-by: Doug Anderson <[email protected]> Acked-by: Olof Johansson <[email protected]> Reviewed-by: David Brown <[email protected]> Signed-off-by: Russell King <[email protected]>
2013-06-29lseek_execute() doesn't need an inode passed to itAl Viro1-7/+3
Signed-off-by: Al Viro <[email protected]>
2013-06-29block_dev: switch to fixed_size_llseek()Al Viro1-22/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29cpqphp_sysfs: switch to fixed_size_llseek()Al Viro1-20/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29tile-srom: switch to fixed_size_llseek()Al Viro1-25/+3
Signed-off-by: Al Viro <[email protected]>
2013-06-29proc_powerpc: switch to fixed_size_llseek()Al Viro1-18/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29ubi/cdev: switch to fixed_size_llseek()Al Viro1-25/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29pci/proc: switch to fixed_size_llseek()Al Viro1-21/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29isapnp: switch to fixed_size_llseek()Al Viro1-21/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29lpfc: switch to fixed_size_llseek()Al Viro1-16/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: give the blocked_hash its own spinlockJeff Layton2-27/+30
There's no reason we have to protect the blocked_hash and file_lock_list with the same spinlock. With the tests I have, breaking it in two gives a barely measurable performance benefit, but it seems reasonable to make this locking as granular as possible. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: add a new "lm_owner_key" lock operationJeff Layton4-7/+34
Currently, the hashing that the locking code uses to add these values to the blocked_hash is simply calculated using fl_owner field. That's valid in most cases except for server-side lockd, which validates the owner of a lock based on fl_owner and fl_pid. In the case where you have a small number of NFS clients doing a lot of locking between different processes, you could end up with all the blocked requests sitting in a very small number of hash buckets. Add a new lm_owner_key operation to the lock_manager_operations that will generate an unsigned long to use as the key in the hashtable. That function is only implemented for server-side lockd, and simply XORs the fl_owner and fl_pid. Signed-off-by: Jeff Layton <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: turn the blocked_list into a hashtableJeff Layton1-8/+17
Break up the blocked_list into a hashtable, using the fl_owner as a key. This speeds up searching the hash chains, which is especially significant for deadlock detection. Note that the initial implementation assumes that hashing on fl_owner is sufficient. In most cases it should be, with the notable exception being server-side lockd, which compares ownership using a tuple of the nlm_host and the pid sent in the lock request. So, this may degrade to a single hash bucket when you only have a single NFS client. That will be addressed in a later patch. The careful observer may note that this patch leaves the file_lock_list alone. There's much less of a case for turning the file_lock_list into a hashtable. The only user of that list is the code that generates /proc/locks, and it always walks the entire list. Signed-off-by: Jeff Layton <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: convert fl_link to a hlist_nodeJeff Layton2-13/+13
Testing has shown that iterating over the blocked_list for deadlock detection turns out to be a bottleneck. In order to alleviate that, begin the process of turning it into a hashtable. We start by turning the fl_link into a hlist_node and the global lists into hlists. A later patch will do the conversion of the blocked_list to a hashtable. Signed-off-by: Jeff Layton <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: avoid taking global lock if possible when waking up blocked waitersJeff Layton1-1/+14
Since we always hold the i_lock when inserting a new waiter onto the fl_block list, we can avoid taking the global lock at all if we find that it's empty when we go to wake up blocked waiters. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: protect most of the file_lock handling with i_lockJeff Layton13-113/+155
Having a global lock that protects all of this code is a clear scalability problem. Instead of doing that, move most of the code to be protected by the i_lock instead. The exceptions are the global lists that the ->fl_link sits on, and the ->fl_block list. ->fl_link is what connects these structures to the global lists, so we must ensure that we hold those locks when iterating over or updating these lists. Furthermore, sound deadlock detection requires that we hold the blocked_list state steady while checking for loops. We also must ensure that the search and update to the list are atomic. For the checking and insertion side of the blocked_list, push the acquisition of the global lock into __posix_lock_file and ensure that checking and update of the blocked_list is done without dropping the lock in between. On the removal side, when waking up blocked lock waiters, take the global lock before walking the blocked list and dequeue the waiters from the global list prior to removal from the fl_block list. With this, deadlock detection should be race free while we minimize excessive file_lock_lock thrashing. Finally, in order to avoid a lock inversion problem when handling /proc/locks output we must ensure that manipulations of the fl_block list are also protected by the file_lock_lock. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: encapsulate the fl_link list handlingJeff Layton1-9/+36
Move the fl_link list handling routines into a separate set of helpers. Also ensure that locks and requests are always put on global lists last (after fully initializing them) and are taken off before unintializing them. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: make "added" in __posix_lock_file a boolJeff Layton1-4/+5
Signed-off-by: Jeff Layton <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: comment cleanups and clarificationsJeff Layton2-8/+31
Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: make generic_add_lease and generic_delete_lease staticJeff Layton1-2/+2
Signed-off-by: Jeff Layton <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29cifs: use posix_unblock_lock instead of locks_delete_blockJeff Layton3-8/+2
commit 66189be74 (CIFS: Fix VFS lock usage for oplocked files) exported the locks_delete_block symbol. There's already an exported helper function that provides this capability however, so make cifs use that instead and turn locks_delete_block back into a static function. Note that if fl->fl_next == NULL then this lock has already been through locks_delete_block(), so we should be OK to ignore an ENOENT error here and simply not retry the lock. Cc: Pavel Shilovsky <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29locks: drop the unused filp argument to posix_unblock_lockJeff Layton3-7/+4
Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29Don't pass inode to ->d_hash() and ->d_compare()Linus Torvalds23-165/+108
Instances either don't look at it at all (the majority of cases) or only want it to find the superblock (which can be had as dentry->d_sb). A few cases that want more are actually safe with dentry->d_inode - the only precaution needed is the check that it hadn't been replaced with NULL by rmdir() or by overwriting rename(), which case should be simply treated as cache miss. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-06-29minix: bug widening a binary "not" operationDan Carpenter1-1/+1
"chunk_size" is an unsigned int and "pos" is an unsigned long. The "& ~(chunk_size-1)" operation clears the high 32 bits unintentionally. The ALIGN() macro does the correct thing. Signed-off-by: Dan Carpenter <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2013-06-29splice: lift checks from do_splice_from() into callersAl Viro1-11/+20
Signed-off-by: Al Viro <[email protected]>
2013-06-29constify rw_verify_area()Al Viro4-2/+4
Signed-off-by: Al Viro <[email protected]>
2013-06-29ps3flash: switch to generic_file_llseek_size()Al Viro1-26/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29wlcore: use *ppos, not file->f_posAl Viro1-2/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29bfa: switch to fixed_size_llseek()Al Viro1-25/+3
Signed-off-by: Al Viro <[email protected]>
2013-06-29fnic: switch to fixed_size_llseek()Al Viro1-14/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29vc: switch to fixed_size_llseek()Al Viro1-16/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29eisa_eeprom: switch to fixed_size_llseek()Al Viro1-13/+2
Signed-off-by: Al Viro <[email protected]>
2013-06-29bna: switch to fixed_size_llseek()Al Viro1-21/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29zorro: switch to fixed_size_llseek()Al Viro1-21/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29mtdchar: switch to fixed_size_llseek()Al Viro1-19/+1
Signed-off-by: Al Viro <[email protected]>
2013-06-29new helper: fixed_size_llseek()Al Viro2-0/+22
Signed-off-by: Al Viro <[email protected]>
2013-06-29ecryptfs: switch ecryptfs_decode_and_decrypt_filename() from dentry to sbAl Viro4-10/+8
Signed-off-by: Al Viro <[email protected]>
2013-06-29fuse: another open-coded file_inode()Al Viro1-2/+1
Signed-off-by: Al Viro <[email protected]>