aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-11-04mm: do not assume generic_max_swapfile_size existsHEADmasterJason A. Donenfeld1-1/+1
For CONFIG_SWAP=n configurations, generic_max_swapfile_size is not compiled in, so conditionalize this statement. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30mm: only use bdev functions for CONFIG_BLOCKJason A. Donenfeld1-0/+4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: clear smap in cr4 when not usedJason A. Donenfeld4-3/+13
If the CPU supports SMAP, but it isn't specified in the config, then we need to explicitly clear it from cr4. Otherwise the processor will trap on all normal userspace accesses, always, since the transition state isn't being set. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30mm: guard pudp_clear_flush_notify with mm notifier configJason A. Donenfeld1-0/+2
Without CONFIG_MMU_NOTIFIER, pudp_clear_flush_notify isn't defined and doesn't make sense, so ifdef that out of the huge page path. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: remove errant CFI usage from rwlockJason A. Donenfeld1-4/+0
These don't assemble with newer binutils due to the use of the cfi directives, so simply remove them, since they're anyway just for debugging. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30cpuidle: define cpuidle_poll_time fallback as staticJason A. Donenfeld1-1/+1
Otherwise the linker complains of multiple definitions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30spec_ctrl: don't dereference struct module without CONFIG_MODULEJason A. Donenfeld1-0/+2
This structure isn't defined for !CONFIG_MODULE, so don't try to use it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: mark irq_set_vcpu_affinity stub as staticJason A. Donenfeld1-1/+1
Without marking this as static, the linker complaints about conflicts. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30sched: fair: idle_balance is always definedJason A. Donenfeld1-7/+2
So remove the stub function. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30net: fib: fib_encap_match requires CONFIG_IP_ROUTE_MULTIPATHJason A. Donenfeld1-0/+2
Don't call into fib_encap_match when it's not defined on !CONFIG_IP_ROUTE_MULTIPATH kernels. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30sched: fair: averaging depends on CONFIG_FAIR_GROUP_SCHEDJason A. Donenfeld1-1/+1
The avg member isn't defined in that struct for !CONFIG_FAIR_GROUP_SCHED kernels, so don't include those functions in that case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30events: remove copy and paste errorJason A. Donenfeld1-1/+0
A stray 'static void' with nothing else anywhere is bound to cause some problems. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30bpf: define trace_bpf_jit_free stub for when BPF isn't compiled inJason A. Donenfeld1-0/+4
Configuration options that exclude BPF mean we need to have a stub version of this function. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30rh_taint: don't dereference struct module without CONFIG_MODULEJason A. Donenfeld2-0/+6
This structure isn't defined for !CONFIG_MODULE, so don't try to use it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: mshyperv: don't touch kexec symbols without CONFIG_KEXEC_COREJason A. Donenfeld1-0/+6
These symbols aren't defined without CONFIG_KEXEC_CORE, so factor it out of the expression in the case that CONFIG_KEXEC_CORE isn't defined. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30mm: slub: use correct arguments for fallback functionJason A. Donenfeld1-1/+1
The stub function used different arguments from the real function, causing compiler errors when used. The fix is to simply use the same arguments for the nop function. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: kaiser_enabled isn't always definedJason A. Donenfeld1-0/+2
This symbol only exists when CONFIG_PAGE_TABLE_ISOLATION is set, so don't use it otherwise. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30workqueue: remove call to non-existent show_workqueue_stateJason A. Donenfeld1-3/+0
The function show_workqueue_state is called, but does not exist anywhere in the kernel, so remove the errant call, which is likely a result of a mismerge. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30huge_mm: define trans_huge_mmu_gather_count stub functionJason A. Donenfeld1-0/+5
When huge pages are not enabled, swap still needs to have a stub version of this function to prevent a compiler error. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30crash_dump: always include UAPI headerJason A. Donenfeld1-1/+1
The uapi header has important constants, regardless of whether or not CONFIG_CRASH_DUMP is enabled, so always include it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30mm: oom_kill: task_uid is a direct uid_tJason A. Donenfeld1-1/+1
This is code that presumes that uid_t is some sort of union type, which it isn't, so the val member doesn't exist. Instead, use the return value directly as an integer, which is what the type is here. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30workqueue: remove call to non-existent pr_cont_pool_infoJason A. Donenfeld1-1/+0
The function pr_cont_pool_info is called, but does not exist anywhere in the kernel, so remove the errant call, which is likely a result of a mismerge. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30sched: sched_info requires CONFIG_SCHEDSTATSJason A. Donenfeld1-1/+2
Because the sched_info symbol is only defined for CONFIG_SCHEDSTATS kernels, we shouldn't include it inside other structs in this case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30fs: forward declare struct bio to avoid compiler warningJason A. Donenfeld1-0/+1
Otherwise the compiler warns because the first usage of this struct is inside the function arguments. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30fs: only call out to emergency_thaw_bdev with CONFIG_BLOCKJason A. Donenfeld1-0/+2
The function emergency_thaw_bdev is only declared when CONFIG_BLOCK is defined, so conditionalize the call to emergency_thaw_bdev on the right config symbol. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: fault: do not define trace function for !CONFIG_TRACINGJason A. Donenfeld1-0/+2
Do not define the page fault tracing function for !CONFIG_TRACING, when the header file has a static inline function to redirect it elsewhere. Having both results in a compiler error. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30pgtable: properly ifdef out second definition of pud_writeJason A. Donenfeld1-1/+1
There's a conflicting definition in include/linux/pgtable.h, which is only enabled for CONFIG_X86_64, so make these two sets of conditions actually exclusive to avoid the clash. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30mm: include sched.h for task_struct usageJason A. Donenfeld1-0/+1
Functions in here dereference current, which means we need to include linux/sched.h to avoid compilation errors. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: do not evaluate sometimes-undefined _PAGE_BIT_SWP_SOFT_DIRTYJason A. Donenfeld1-1/+1
In certain configurations, _PAGE_BIT_SWP_SOFT_DIRTY is undefined, resulting in preprocessor warnings. Fix this by checking whether it's defined first. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30mm: pass in correct zero gup_flags argumentJason A. Donenfeld1-1/+1
The outer-function, get_user_pages_longterm, does not take a gup_flags argument, which means we should pass it onwards here as 0, rather than using an undefined variable, which caused a compiler error. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30huge_mm: remove trailing semicolonJason A. Donenfeld1-1/+1
The trialing semicolon before the function body is invalid C and resulted in a compiler error. This was probably due to a copy and paste error. This commit removes the extra semicolon. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: pud_trans_huge is already defined generically for the nop inlineJason A. Donenfeld2-13/+0
When pud_trans_huge is not required, the stub function is already defined in the asm-generic code, so adding it here too results in a compiler error. To fix this bug, we just get rid of the second superfluous definition, as well as the third in asm-generic itself, where the set of conditions for its inclusion overlapped. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30sched: sched_statistics is only defined for CONFIG_SCHEDSTATS systemsJason A. Donenfeld1-0/+2
Keeping this here results in a compile error on !CONFIG_SCHEDSTATS systems, so remove it from the struct in those cases. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30x86: spinlock_types: use u16 __ticket_t alwaysJason A. Donenfeld1-5/+0
While it'd be nice to have the smaller type for low-CPU builds, the generic spinlock include hardcodes this at u16 for kABI purposes. For that reason, we just keep the larger types always, in order to avoid a build-time error. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30linux-3.10.0-1160.el7Jason A. Donenfeld21343-1513970/+6228349
2013-06-30Linux 3.10Linus Torvalds1-1/+1
2013-06-30Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpcLinus Torvalds1-1/+2
Pull another powerpc fix from Benjamin Herrenschmidt: "I mentioned that while we had fixed the kernel crashes, EEH error recovery didn't always recover... It appears that I had a fix for that already in powerpc-next (with a stable CC). I cherry-picked it today and did a few tests and it seems that things now work quite well. The patch is also pretty simple, so I see no reason to wait before merging it." * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/eeh: Fix fetching bus for single-dev-PE
2013-06-30Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds11-93/+61
Pull SCSI fixes from James Bottomley: "This is a set of seven bug fixes. Several fcoe fixes for locking problems, initiator issues and a VLAN API change, all of which could eventually lead to data corruption, one fix for a qla2xxx locking problem which could lead to multiple completions of the same request (and subsequent data corruption) and a use after free in the ipr driver. Plus one minor MAINTAINERS file update" (only six bugfixes in this pull, since I had already pulled the fcoe API fix directly from Robert Love) * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: [SCSI] ipr: Avoid target_destroy accessing memory after it was freed [SCSI] qla2xxx: Fix for locking issue between driver ISR and mailbox routines MAINTAINERS: Fix fcoe mailing list libfc: extend ex_lock to protect all of fc_seq_send libfc: Correct check for initiator role libfcoe: Fix Conflicting FCFs issue in the fabric
2013-06-30powerpc/eeh: Fix fetching bus for single-dev-PEGavin Shan1-1/+2
While running Linux as guest on top of phyp, we possiblly have PE that includes single PCI device. However, we didn't return its PCI bus correctly and it leads to failure on recovery from EEH errors for single-dev-PE. The patch fixes the issue. Cc: <stable@vger.kernel.org> # v3.7+ Cc: Steve Best <sbest@us.ibm.com> Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-29Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpcLinus Torvalds2-7/+14
Pull powerpc fixes from Ben Herrenschmidt: "We discovered some breakage in our "EEH" (PCI Error Handling) code while doing error injection, due to a couple of regressions. One of them is due to a patch (37f02195bee9 "powerpc/pci: fix PCI-e devices rescan issue on powerpc platform") that, in hindsight, I shouldn't have merged considering that it caused more problems than it solved. Please pull those two fixes. One for a simple EEH address cache initialization issue. The other one is a patch from Guenter that I had originally planned to put in 3.11 but which happens to also fix that other regression (a kernel oops during EEH error handling and possibly hotplug). With those two, the couple of test machines I've hammered with error injection are remaining up now. EEH appears to still fail to recover on some devices, so there is another problem that Gavin is looking into but at least it's no longer crashing the kernel." * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/pci: Improve device hotplug initialization powerpc/eeh: Add eeh_dev to the cache during boot
2013-06-29ARM: dt: Only print warning, not WARN() on bad cpu map in device treeOlof Johansson1-2/+3
Due to recent changes and expecations of proper cpu bindings, there are now cases for many of the in-tree devicetrees where a WARN() will hit on boot due to badly formatted /cpus nodes. Downgrade this to a pr_warn() to be less alarmist, since it's not a new problem. Tested on Arndale, Cubox, Seaboard and Panda ES. Panda hits the WARN without this, the others do not. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-06-30powerpc/pci: Improve device hotplug initializationGuenter Roeck1-5/+12
Commit 37f02195b (powerpc/pci: fix PCI-e devices rescan issue on powerpc platform) fixes a problem with interrupt and DMA initialization on hot plugged devices. With this commit, interrupt and DMA initialization for hot plugged devices is handled in the pci device enable function. This approach has a couple of drawbacks. First, it creates two code paths for device initialization, one for hot plugged devices and another for devices known during the initial PCI scan. Second, the initialization code for hot plugged devices is only called when the device is enabled, ie typically in the probe function. Also, the platform specific setup code is called each time pci_enable_device() is called, not only once during device discovery, meaning it is actually called multiple times, once for devices discovered during the initial scan and again each time a driver is re-loaded. The visible result is that interrupt pins are only assigned to hot plugged devices when the device driver is loaded. Effectively this changes the PCI probe API, since pci_dev->irq and the device's dma configuration will now only be valid after pci_enable() was called at least once. A more subtle change is that platform specific PCI device setup is moved from device discovery into the driver's probe function, more specifically into the pci_enable_device() call. To fix the inconsistencies, add new function pcibios_add_device. Call pcibios_setup_device from pcibios_setup_bus_devices if device setup is not complete, and from pcibios_add_device if bus setup is complete. With this change, device setup code is moved back into device initialization, and called exactly once for both static and hot plugged devices. [ This also fixes a regression introduced by the above patch which causes dev->irq to be overwritten under some cirumstances after MSIs have been enabled for the device which leads to crashes due to the MSI core "hijacking" dev->irq to store the base MSI number and not the LSI. --BenH ] Cc: Yuanquan Chen <Yuanquan.Chen@freescale.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Hiroo Matsumoto <matsumoto.hiroo@jp.fujitsu.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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 <mathieu.desnoyers@efficios.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Andrey Vagin <avagin@openvz.org> Cc: Roland McGrath <roland@redhat.com> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com> Cc: David Howells <dhowells@redhat.com> Cc: Dave Jones <davej@redhat.com> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Pedro Alves <palves@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-06-29Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-clientLinus Torvalds1-1/+5
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 git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-15/+39
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 git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-mn10300Linus Torvalds2-34/+22
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 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-2/+5
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 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-7/+9
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