Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Otherwise the linker complains of multiple definitions.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
This structure isn't defined for !CONFIG_MODULE, so don't try to use it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
Without marking this as static, the linker complaints about conflicts.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
So remove the stub function.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
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>
|
|
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>
|
|
A stray 'static void' with nothing else anywhere is bound to cause some
problems.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
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>
|
|
This structure isn't defined for !CONFIG_MODULE, so don't try to use it.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
|
|
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
|
|
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
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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
|
|
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
|
|
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>
|
|
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
|
|
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
|
|
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()
|
|
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
|
|
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
|