06 Dec, 2011
5 commits
-
When (no)bootmem finish operation, it pass pages to buddy
allocator. Since debug_pagealloc_enabled is not set, we will do
not protect pages, what is not what we want with
CONFIG_DEBUG_PAGEALLOC=y.To fix remove debug_pagealloc_enabled. That variable was
introduced by commit 12d6f21e "x86: do not PSE on
CONFIG_DEBUG_PAGEALLOC=y" to get more CPA (change page
attribude) code testing. But currently we have CONFIG_CPA_DEBUG,
which test CPA.Signed-off-by: Stanislaw Gruszka
Acked-by: Mel Gorman
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/1322582711-14571-1-git-send-email-sgruszka@redhat.com
Signed-off-by: Ingo Molnar -
Patch fixes a boot crash with pagealloc debugging enabled:
Initializing HighMem for node 0 (000377fe:0003fff0)
BUG: unable to handle kernel paging request at f6fefe80
IP: [] find_range_array+0x5e/0x69
[...]
Call Trace:
[] __get_free_all_memory_range+0x39/0xb4
[] add_highpages_with_active_regions+0x18/0x9b
[] set_highmem_pages_init+0x70/0x90
[] mem_init+0x50/0x21b
[] start_kernel+0x1bf/0x31c
[] i386_start_kernel+0x65/0x67The crash happens when memblock wants to allocate big area for
temporary "struct range" array and reuses pages from top of low
memory, which were already passed to the buddy allocator.Reported-by: Ingo Molnar
Signed-off-by: Stanislaw Gruszka
Cc: linux-mm@kvack.org
Cc: Mel Gorman
Link: http://lkml.kernel.org/r/20111206080833.GB3105@redhat.com
Signed-off-by: Ingo Molnar -
The last parameter to sort() is a pointer to the function used
to swap items. This parameter should be NULL, not 0, when not
used. This quiets the following sparse warning:warning: Using plain integer as NULL pointer
Signed-off-by: H Hartley Sweeten
Signed-off-by: Andrew Morton
Cc: hartleys@visionengravers.com
Signed-off-by: Ingo Molnar -
Replace the bubble sort in sanitize_e820_map() with a call to
the generic kernel sort function to avoid pathological
performance with large maps.On large (thousands of entries) E820 maps, the previous code
took minutes to run; with this change it's now milliseconds.Signed-off-by: Mike Ditto
Cc: sassmann@kpanic.de
Cc: yuenn@google.com
Cc: Stefan Assmann
Cc: Nancy Yuen
Cc: "H. Peter Anvin"
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar -
On x86_32 casting the unsigned int result of get_random_int() to
long may result in a negative value. On x86_32 the range of
mmap_rnd() therefore was -255 to 255. The 32bit mode on x86_64
used 0 to 255 as intended.The bug was introduced by 675a081 ("x86: unify mmap_{32|64}.c")
in January 2008.Signed-off-by: Ludwig Nussel
Cc: Linus Torvalds
Cc: harvey.harrison@gmail.com
Cc: "H. Peter Anvin"
Cc: Harvey Harrison
Signed-off-by: Andrew Morton
Link: http://lkml.kernel.org/r/201111152246.pAFMklOB028527@wpaz5.hot.corp.google.com
Signed-off-by: Ingo Molnar
11 Nov, 2011
7 commits
-
Now that zone_sizes_init() is identical on 32-bit and 64-bit,
move the code to arch/x86/mm/init.c and use it for both
architectures.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-7-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar -
Make 32-bit and 64-bit zone_sizes_init() identical in
preparation for unification.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-6-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar -
64-bit has no highmem so max_low_pfn is always the same as
'max_pfn'.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Acked-by: David Rientjes
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-5-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar -
In preparation for unifying 32-bit and 64-bit zone_sizes_init()
make sure ZONE_DMA32 is wrapped in CONFIG_ZONE_DMA32.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Acked-by: David Rientjes
Acked-by: Arun Sharma
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-4-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar -
The 'highend_pfn' variable is always set to 'max_pfn' so just
use the latter directly.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-3-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar -
This patch introduces a zone_sizes_init() helper function on
64-bit to make it more similar to 32-bit init.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Acked-by: David Rientjes
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-2-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar -
Use MAX_DMA_PFN which represents the 16 MB ISA DMA limit on
32-bit x86 just like we do on 64-bit.Acked-by: Tejun Heo
Acked-by: Yinghai Lu
Acked-by: David Rientjes
Signed-off-by: Pekka Enberg
Link: http://lkml.kernel.org/r/1320155902-10424-1-git-send-email-penberg@kernel.org
Signed-off-by: Ingo Molnar
10 Nov, 2011
1 commit
-
This reverts commit aa6afca5bcaba8101f3ea09d5c3e4100b2b9f0e5.
It escalates of some of the google-chrome SELinux problems with ptrace
("Check failed: pid_ > 0. Did not find zygote process"), and Andrew
says that it is also causing mystery lockdep reports.Reported-by: Alex Villacís Lasso
Requested-by: James Morris
Requested-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Nov, 2011
12 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
drivers/media: video/a5k6aa is a module and so needs module.h
mfd: fix build failures in recently added ab5500 code
hwspinlock/u8500: include linux/module.h
MTD: MAPS: bcm963xx-flash.c: explicitly include module.h -
* 'for-linus' of git://neil.brown.name/md:
md/raid5: STRIPE_ACTIVE has lock semantics, add barriers
md/raid5: abort any pending parity operations when array fails. -
* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: (45 commits)
DocBook/drm: Clean up a todo-note
DocBook/drm: `device aware' -> `device-aware'
DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific'
DocBook/drm: Clean up the paragraph on framebuffer objects
DocBook/drm: Use `; otherwise,'
DocBook/drm: Better flow with `, and then'
DocBook/drm: Refer to the domain-setting function as a device-specific ioctl
DocBook/drm: Improve flow of GPU/CPU coherence sentence
DocBook/drm: Use an for fundamental GEM operations
DocBook/drm: Insert a comma
DocBook/drm: Use a for vblank ioctls
DocBook/drm: Use an itemizedlist for what an encoder needs to provide
DocBook/drm: Insert `the' for readability, and change `set' to `setting'
DocBook/drm: Remove extraneous commas
DocBook/drm: Use a colon
DocBook/drm: Clarify `final initialization' via better formatting
DocBook/drm: Remove redundancy
DocBook/drm: Insert `it' for smooth reading
DocBook/drm: The word `so-called'; I do not think it connotes what you think it connotes
DocBook/drm: Use a singular subject for grammatical cleanliness
... -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: (21 commits)
ktest: Evaluate variables entered on the command line
ktest: Add variable ${PWD}
ktest: Add another monitor flush before installing kernel
ktest: Do not opencode reboot in grub setting
ktest: Add processing of complex conditionals
ktest: Fix parsing of config section lines
ktest: Sort make_min_config configs by dependecies
ktest: Add DEFINED keyword for IF statements
ktest: Add OVERRIDE keyword to DEFAULTS section
ktest: Consolidate TEST_TYPE and DEFAULT code
ktest: Add INCLUDE keyword to include other config files
ktest: Let IF keyword take comparisons
ktest: Add IF and ELSE to config sections
ktest: Do not reboot on config or build issues
ktest: Add option REBOOT_SUCCESS_LINE to stop waiting after a reboot
ktest: Add NO_INSTALL option to not install for a test
ktest: Fail when grub menu not found
ktest: Include monitor in reboot code
ktest: Only need to save .config when doing mrproper
ktest: Create outputdir if it does not exist
... -
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
PM / devfreq: fix private_data
Documentation: Fix typo in freezer-subsystem.txt
PM / QoS: Set cpu_dma_pm_qos->name -
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
[The semantic patch that makes this change is available
in scripts/coccinelle/api/err_cast.cocci.More information about semantic patching is available at
http://coccinelle.lip6.fr/]Signed-off-by: Thomas Meyer
Signed-off-by: Rafael J. Wysocki -
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
hwspinlock/u8500: fix build error due to undefined label
hwspinlock: Don't return a value in __hwspin_unlock -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc: Hook up process_vm_{readv,writev} syscalls. -
The Kconfig loop detection goes crazy without this.
Signed-off-by: Linus Torvalds
-
Otherwise we get compile errors like this:
ERROR: "led_classdev_unregister" [drivers/platform/x86/dell-laptop.ko] undefined!
ERROR: "led_classdev_register" [drivers/platform/x86/dell-laptop.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2when the dell-laptop support is enabled without the necessary LED
support being enabled.Reported-by: Alessandro Suardi
Acked-by: Matthew Garrett
Signed-off-by: Linus Torvalds -
This file uses core functions like module_init() and module_exit()
and so it explicitly needs to include the module.h header.Signed-off-by: Paul Gortmaker
-
Alek Du reported that the code erroneously applies time to jiffies
conversions twice to the t1 and t2 values. In normal use on a modem link
this cases no visible problem but on a slower link it will break as with
HZ=1000 as is typical we are running t1/t2 ten times too fast.Alek's original patch removed the conversion from the timer setting but we
in fact have to be more careful as the contents of t1/t2 are visible via
the device API and we thus need to correct the constants.Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds
08 Nov, 2011
15 commits
-
Fix below build error:
CC drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe':
drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not definedSigned-off-by: Axel Lin
Signed-off-by: Ohad Ben-Cohen -
Fix below build warning:
CC arch/arm/mach-omap2/hwspinlock.o
In file included from arch/arm/mach-omap2/hwspinlock.c:22:
include/linux/hwspinlock.h: In function '__hwspin_unlock':
include/linux/hwspinlock.h:121: warning: 'return' with a value, in function returning voidSigned-off-by: Axel Lin
Signed-off-by: Ohad Ben-Cohen -
All updates that occur under STRIPE_ACTIVE should be globally visible
when STRIPE_ACTIVE clears. test_and_set_bit() implies a barrier, but
clear_bit() does not.This is suitable for 3.1-stable.
Signed-off-by: Dan Williams
Signed-off-by: NeilBrown
Cc: stable@kernel.org -
When the number of failed devices exceeds the allowed number
we must abort any active parity operations (checks or updates) as they
are no longer meaningful, and can lead to a BUG_ON in
handle_parity_checks6.This bug was introduce by commit 6c0069c0ae9659e3a91b68eaed06a5c6c37f45c8
in 2.6.29.Reported-by: Manish Katiyar
Tested-by: Manish Katiyar
Acked-by: Dan Williams
Signed-off-by: NeilBrown
Cc: stable@kernel.org -
These files had implicit dependencies on modular support
which now show up as build failures with the module cleanup
work merged to mainline.Reported-by: Axel Lin
Signed-off-by: Paul Gortmaker -
Include module.h to fix below build error:
CC drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function)
[...]
drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype
make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1
make[1]: *** [drivers/hwspinlock] Error 2
make: *** [drivers] Error 2Signed-off-by: Axel Lin
Signed-off-by: Paul Gortmaker -
module.h was previously implicitly included through mtd/mtd.h.
Fixes the following build failure after the module.h cleanup:
CC drivers/mtd/maps/bcm963xx-flash.o
drivers/mtd/maps/bcm963xx-flash.c: In function 'bcm963xx_probe':
drivers/mtd/maps/bcm963xx-flash.c:208:29: error: 'THIS_MODULE' undeclared (first use in this function)
[...]
drivers/mtd/maps/bcm963xx-flash.c:276:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/mtd/maps/bcm963xx-flash.c:276:15: warning: function declaration isn't a prototype
make[7]: *** [drivers/mtd/maps/bcm963xx-flash.o] Error 1Signed-off-by: Jonas Gorski
Signed-off-by: Paul Gortmaker -
.. with new name. Because nothing says "really solid kernel release"
like naming it after an extinct animal that just happened to be in the
news lately. -
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits)
ARM: OMAP: Fix export.h or module.h includes
ARM: OMAP: omap_device: Include linux/export.h
ARM: OMAP2: Fix H4 matrix keyboard warning
ARM: OMAP1: Remove unused omap-alsa.h
ARM: OMAP1: Fix warnings about enabling 32 KiHz timer
ARM: OMAP2+: timer: Remove omap_device_pm_latency
ARM: OMAP2+: clock data: Remove redundant timer clkdev
ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio
ARM: OMAP: usb: musb: OMAP: Delete unused function
MAINTAINERS: Update linux-omap git repository
ARM: OMAP: change get_context_loss_count ret value to int
ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly
ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF
ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list
ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success
ARM: OMAP: dmtimer: Include linux/module.h
ARM: OMAP2+: l3-noc: Include linux/module.h
ARM: OMAP2+: devices: Fixes for McPDM
ARM: OMAP: Fix errors and warnings when building for one board
ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only
... -
Mountpoint crossing is similar to following procfs symlinks - we do
not get ->d_revalidate() called for dentry we have arrived at, with
unpleasant consequences for NFS4.Simple way to reproduce the problem in mainline:
cat >/tmp/a.c <
#include
#include
main()
{
struct flock fl = {.l_type = F_RDLCK, .l_whence = SEEK_SET, .l_len = 1};
if (fcntl(0, F_SETLK, &fl))
perror("setlk");
}
EOF
cc /tmp/a.c -o /tmp/testthen on nfs4:
mount --bind file1 file2
/tmp/test < file1 # ok
/tmp/test < file2 # spews "setlk: No locks available"...What happens is the missing call of ->d_revalidate() after mountpoint
crossing and that's where NFS4 would issue OPEN request to server.The fix is simple - treat mountpoint crossing the same way we deal with
following procfs-style symlinks. I.e. set LOOKUP_JUMPED...Cc: stable@kernel.org
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
The "private_date" field in struct devfreq_dev_status almost certainly
wants to be "private_data"; since there are no in-tree users of this
functionality, now seems like an easy time to make the fix.Signed-off-by: Jonathan Corbet
Signed-off-by: Rafael J. Wysocki -
Fix a typo in Documentation/cgroups/freezer-subsystem.txt.
Signed-off-by: Rafael J. Wysocki
Reviewed-by: Srivatsa S. Bhat
Acked-by: Randy Dunlap -
Since commit 4a31a334, the name of this misc device is not initialized,
which leads to a funny device named /dev/(null) being created and
/proc/misc containing an entry with just a number but no name. The latter
leads to complaints by cryptsetup, which caused me to investigate this
matter.Signed-off-by: Dominik Brodowski
Signed-off-by: Rafael J. Wysocki -
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf top: Fix live annotation in the --stdio interface
perf top tui: Don't recalc column widths considering just the first page
perf report: Add progress bar when processing time ordered events
perf hists browser: Warn about lost events
perf tools: Fix a typo of command name as trace-cmd
perf hists: Fix recalculation of total_period when sorting entries
perf header: Fix build on old systems
perf ui browser: Handle K_RESIZE in dialog windows
perf ui browser: No need to switch char sets that often
perf hists browser: Use K_TIMER
perf ui: Rename ui__warning_paranoid to ui__error_paranoid
perf ui: Reimplement the popup windows using libslang
perf ui: Reimplement ui__popup_menu using ui__browser
perf ui: Reimplement ui_helpline using libslang
perf ui: Improve handling sigwinch a bit
perf ui progress: Reimplement using slang
perf evlist: Fix grouping of multiple events