summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'locks-v4.1-1' of git://git.samba.org/jlayton/linuxLinus Torvalds2015-04-153-39/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull file locking related changes from Jeff Layton: "This set is mostly minor cleanups to the overhaul that went in last cycle. The other noticeable items are the changes to the lm_get_owner and lm_put_owner prototypes, and the fact that we no longer need to use the i_lock to protect the i_flctx pointer" * tag 'locks-v4.1-1' of git://git.samba.org/jlayton/linux: locks: use cmpxchg to assign i_flctx pointer locks: get rid of WE_CAN_BREAK_LSLK_NOW dead code locks: change lm_get_owner and lm_put_owner prototypes locks: don't allocate a lock context for an F_UNLCK request locks: Add lockdep assertion for blocked_lock_lock locks: remove extraneous IS_POSIX and IS_FLOCK tests locks: Remove unnecessary IS_POSIX test
| * locks: use cmpxchg to assign i_flctx pointerJeff Layton2015-04-031-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the v3.20/v4.0 cycle, I had originally had the code manage the inode->i_flctx pointer using a compare-and-swap operation instead of the i_lock. Sasha Levin though hit a problem while testing with trinity that made me believe that that wasn't safe. At the time, changing the code to protect the i_flctx pointer seemed to fix the issue, but I now think that was just coincidence. The issue was likely the same race that Kirill Shutemov hit while testing the pre-rc1 v4.0 kernel and that Linus spotted. Due to the way that the spinlock was dropped in the middle of flock_lock_file, you could end up with multiple flock locks for the same struct file on the inode. Reinstate the use of a CAS operation to assign this pointer since it's likely to be more efficient and gets the i_lock completely out of the file locking business. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
| * locks: get rid of WE_CAN_BREAK_LSLK_NOW dead codeJeff Layton2015-04-031-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | As Bruce points out, there's no compelling reason to change /proc/locks output at this point. If we did want to do this, then we'd almost certainly want to introduce a new file to display this info (maybe via debugfs?). Let's remove the dead WE_CAN_BREAK_LSLK_NOW ifdef here and just plan to stay with the legacy format. Reported-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
| * locks: change lm_get_owner and lm_put_owner prototypesJeff Layton2015-04-033-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | The current prototypes for these operations are somewhat awkward as they deal with fl_owners but take struct file_lock arguments. In the future, we'll want to be able to take references without necessarily dealing with a struct file_lock. Change them to take fl_owner_t arguments instead and have the callers deal with assigning the values to the file_lock structs. Signed-off-by: Jeff Layton <jlayton@primarydata.com>
| * locks: don't allocate a lock context for an F_UNLCK requestJeff Layton2015-04-031-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | In the event that we get an F_UNLCK request on an inode that has no lock context, there is no reason to allocate one. Change locks_get_lock_context to take a "type" pointer and avoid allocating a new context if it's F_UNLCK. Then, fix the callers to return appropriately if that function returns NULL. Signed-off-by: Jeff Layton <jlayton@primarydata.com>
| * locks: Add lockdep assertion for blocked_lock_lockDaniel Wagner2015-04-031-0/+6
| | | | | | | | | | | | | | | | Annonate insert, remove and iterate function that we need blocked_lock_lock held. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
| * locks: remove extraneous IS_POSIX and IS_FLOCK testsJeff Layton2015-04-031-2/+2
| | | | | | | | | | | | | | We know that the locks being passed into this function are of the correct type, now that they live on their own lists. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
| * locks: Remove unnecessary IS_POSIX testDaniel Wagner2015-04-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since following change commit bd61e0a9c852de2d705b6f1bb2cc54c5774db570 Author: Jeff Layton <jlayton@primarydata.com> Date: Fri Jan 16 15:05:55 2015 -0500 locks: convert posix locks to file_lock_context all Posix locks are kept on their a separate list, so the test is redudant. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Cc: Jeff Layton <jlayton@primarydata.com> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
* | crypto: fix mis-merge with the networking mergeLinus Torvalds2015-04-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The networking updates from David Miller removed the iocb argument from sendmsg and recvmsg (in commit 1b784140474e: "net: Remove iocb argument from sendmsg and recvmsg"), but the crypto code had added new instances of them. When I pulled the crypto update, it was a silent semantic mis-merge, and I overlooked the new warning messages in my test-build. I try to fix those in the merge itself, but that relies on me noticing. Oh well. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'exec_domain_rip_v2' of ↵Linus Torvalds2015-04-1585-675/+86
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc Pull exec domain removal from Richard Weinberger: "This series removes execution domain support from Linux. The idea behind exec domains was to support different ABIs. The feature was never complete nor stable. Let's rip it out and make the kernel signal handling code less complicated" * 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (27 commits) arm64: Removed unused variable sparc: Fix execution domain removal Remove rest of exec domains. arch: Remove exec_domain from remaining archs arc: Remove signal translation and exec_domain xtensa: Remove signal translation and exec_domain xtensa: Autogenerate offsets in struct thread_info x86: Remove signal translation and exec_domain unicore32: Remove signal translation and exec_domain um: Remove signal translation and exec_domain tile: Remove signal translation and exec_domain sparc: Remove signal translation and exec_domain sh: Remove signal translation and exec_domain s390: Remove signal translation and exec_domain mn10300: Remove signal translation and exec_domain microblaze: Remove signal translation and exec_domain m68k: Remove signal translation and exec_domain m32r: Remove signal translation and exec_domain m32r: Autogenerate offsets in struct thread_info frv: Remove signal translation and exec_domain ...
| * | arm64: Removed unused variableRichard Weinberger2015-04-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | arch/arm64/kernel/signal.c: In function ‘handle_signal’: arch/arm64/kernel/signal.c:290:22: warning: unused variable ‘thread’ [-Wunused-variable] Fixes: arm64: Remove signal translation and exec_domain Reported-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | sparc: Fix execution domain removalGuenter Roeck2015-04-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | ksp must be 8-byte aligned. Cc: Richard Weinberger <richard@nod.at> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | Remove rest of exec domains.Richard Weinberger2015-04-123-82/+1
| | | | | | | | | | | | | | | | | | | | | It is gone from all archs, now we can remove the final bits. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | arch: Remove exec_domain from remaining archsRichard Weinberger2015-04-1221-39/+0
| | | | | | | | | | | | Signed-off-by: Richard Weinberger <richard@nod.at>
| * | arc: Remove signal translation and exec_domainRichard Weinberger2015-04-122-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | xtensa: Remove signal translation and exec_domainRichard Weinberger2015-04-122-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | xtensa: Autogenerate offsets in struct thread_infoRichard Weinberger2015-04-122-11/+8
| | | | | | | | | | | | | | | | | | | | | Maintaining offsets by hand is no fun. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | x86: Remove signal translation and exec_domainRichard Weinberger2015-04-122-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | unicore32: Remove signal translation and exec_domainRichard Weinberger2015-04-123-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: Remove signal translation and exec_domainRichard Weinberger2015-04-122-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | tile: Remove signal translation and exec_domainRichard Weinberger2015-04-123-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | sparc: Remove signal translation and exec_domainRichard Weinberger2015-04-124-33/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: David S. Miller <davem@davemloft.net>
| * | sh: Remove signal translation and exec_domainRichard Weinberger2015-04-125-38/+6
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | s390: Remove signal translation and exec_domainRichard Weinberger2015-04-124-27/+4
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | mn10300: Remove signal translation and exec_domainRichard Weinberger2015-04-123-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | microblaze: Remove signal translation and exec_domainRichard Weinberger2015-04-122-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | m68k: Remove signal translation and exec_domainRichard Weinberger2015-04-122-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | m32r: Remove signal translation and exec_domainRichard Weinberger2015-04-122-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | m32r: Autogenerate offsets in struct thread_infoRichard Weinberger2015-04-124-13/+17
| | | | | | | | | | | | | | | | | | Maintaining offsets by hand is no fun. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | frv: Remove signal translation and exec_domainRichard Weinberger2015-04-124-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | blackfin: Remove exec_domain usageRichard Weinberger2015-04-122-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | blackfin: Autogenerate offsets in struct thread_infoRichard Weinberger2015-04-123-9/+7
| | | | | | | | | | | | | | | | | | Maintaining offsets by hand is no fun. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | arm64: Remove signal translation and exec_domainRichard Weinberger2015-04-123-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | arm: Remove signal translation and exec_domainRichard Weinberger2015-04-124-20/+3
| | | | | | | | | | | | | | | | | | | | | | | | As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | Remove execution domain supportRichard Weinberger2015-04-123-105/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All users of exec_domain are gone, now we can get rid of that abandoned feature. To not break existing userspace we keep a dummy /proc/execdomains file which will always contain "0-0 Linux [kernel]". Signed-off-by: Richard Weinberger <richard@nod.at>
| * | ia64: Remove Linux/x86 exec domain supportRichard Weinberger2015-04-121-25/+0
| | | | | | | | | | | | | | | | | | | | | As this series removes exec domain support we can get rid of this hack. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | arm: Remove RISC OS personalityRichard Weinberger2015-04-124-106/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The RISC OS personality seems to be unused and untested for a long time. It is doubtful whether this personality worked ever as expected. Let's rip it out. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | Merge tag 'for-linus-4.1' of ↵Linus Torvalds2015-04-1559-2067/+323
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - hostfs saw a face lifting - old/broken stuff was removed (SMP, HIGHMEM, SKAS3/4) - random cleanups and bug fixes * tag 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (26 commits) um: Print minimum physical memory requirement um: Move uml_postsetup in the init_thread stack um: add a kmsg_dumper x86, UML: fix integer overflow in ELF_ET_DYN_BASE um: hostfs: Reduce number of syscalls in readdir um: Remove broken highmem support um: Remove broken SMP support um: Remove SKAS3/4 support um: Remove ppc cruft um: Remove ia64 cruft um: Remove dead code from stacktrace hostfs: No need to box and later unbox the file mode hostfs: Use page_offset() hostfs: Set page flags in hostfs_readpage() correctly hostfs: Remove superfluous initializations in hostfs_open() hostfs: hostfs_open: Reset open flags upon each retry hostfs: Remove superfluous test in hostfs_open() hostfs: Report append flag in ->show_options() hostfs: Use __getname() in follow_link hostfs: Remove open coded strcpy() ...
| * | | um: Print minimum physical memory requirementThomas Meyer2015-04-131-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print a more sensible message about the minimum physical memory requirement. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Move uml_postsetup in the init_thread stackThomas Meyer2015-04-133-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | atomic_notifier_chain_register() and uml_postsetup() do call kernel code that rely on the "current" kernel macro and a valid task_struct resp. thread_info struct. Give those functions a valid stack by moving uml_postsetup() in the init_thread stack. This moves enables a panic() call in this early code to generate a valid stacktrace, instead of crashing. E.g. when an UML kernel is started with an initrd but too few physical memory the panic() call get's actually processed. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: add a kmsg_dumperThomas Meyer2015-04-133-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a kmsg_dumper, that dumps the kmsg buffer to stdout, when no console is available. This an enables the printing of early panic() calls triggered in uml_postsetup(). When a panic() call happens so early in the UML kernel no earlyprintk/console is available yet, but with a kmsg_dumper in place the kernel message buffer will be outputted to the user, to give a better hint, of what the failure was. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | x86, UML: fix integer overflow in ELF_ET_DYN_BASEAndrey Ryabinin2015-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all arches define ELF_ET_DYN_BASE as 2/3 of TASK_SIZE. Though it seems that some architectures do this in a wrong way. The problem is that 2*TASK_SIZE may overflow 32-bits so the real ELF_ET_DYN_BASE becomes wrong. Fix this overflow by dividing TASK_SIZE prior to multiplying: (TASK_SIZE / 3 * 2) Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: hostfs: Reduce number of syscalls in readdirRichard Weinberger2015-04-133-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently hostfs issues every time a seekdir(), in fact it has to do this only upon the first call. Also telldir() can be omitted as we can obtain the directory offset from readdir(). Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Remove broken highmem supportRichard Weinberger2015-04-136-93/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Highmem was always buggy and experimental on UML(i386). In times where 64 bit computers are default we can remove that experimental code. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Remove broken SMP supportRichard Weinberger2015-04-1310-366/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At times where UML used the TT mode to operate it had kind of SMP support. It never got finished nor was stable. Let's rip out that cruft and stop confusing developers which do tree-wide SMP cleanups. If someone wants SMP support UML it has do be done from scratch. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Remove SKAS3/4 supportRichard Weinberger2015-04-1318-814/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we had SKAS0 UML had two modes of operation TT (tracing thread) and SKAS3/4 (separated kernel address space). TT was known to be insecure and got removed a long time ago. SKAS3/4 required a few (3 or 4) patches on the host side which never went mainline. The last host patch is 10 years old. With SKAS0 mode (separated kernel address space using 0 host patches), default since 2005, SKAS3/4 is obsolete and can be removed. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Remove ppc cruftRichard Weinberger2015-04-1315-635/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That code is a relict from the early days of UML. ppc support was never completed nor worked. Let's rip it out. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Remove ia64 cruftRichard Weinberger2015-04-136-70/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That code is a relict from the early days of UML. ia64 support was never completed nor worked. Let's rip it out. Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | um: Remove dead code from stacktraceRichard Weinberger2015-04-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove left over code from commit 970e51feaddb (um: Add support for CONFIG_STACKTRACE) Signed-off-by: Richard Weinberger <richard@nod.at>
| * | | hostfs: No need to box and later unbox the file modeRichard Weinberger2015-03-263-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is really no point in having a function with 10 arguments. Reported-by: Daniel Walter <d.walter@0x90.at> Signed-off-by: Richard Weinberger <richard@nod.at>
OpenPOWER on IntegriCloud