aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-22adfs: fix E+/F+ dir size > 2048 crashing kernelStuart Swales2-21/+84
Kernel crashes in fs/adfs module when accessing directories with a large number of objects on mounted Acorn ADFS E+/F+ format discs (or images) as the existing code writes off the end of the fixed array of struct buffer_head pointers. Additionally, each directory access that didn't crash would leak a buffer as nr_buffers was not adjusted correctly for E+/F+ discs (was always left as one less than required). The patch fixes this by allocating a dynamically-sized set of struct buffer_head pointers if necessary for the E+/F+ case (many directories still do in fact fit in 2048 bytes) and sets the correct nr_buffers so that all buffers are released. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=26072 Tested by tar'ing the contents of my RISC PC's E+ format 20Gb HDD which contains a number of large directories that previously crashed the kernel. Signed-off-by: Stuart Swales <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22Documentation/vm/page-types.c: auto debugfs mount for hwpoison operationChen Gong1-4/+101
page-types.c doesn't supply a way to specify the debugfs path and the original debugfs path is not usual on most machines. This patch supplies a way to auto mount debugfs if needed. This patch is heavily inspired by tools/perf/utils/debugfs.c [[email protected]: make functions static] [[email protected]: fix debugfs_mount() signature] Signed-off-by: Chen Gong <[email protected]> Reviewed-by: KOSAKI Motohiro <[email protected]> Reviewed-by: Wu Fengguang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22Documentation/Changes: minor correctionsChristian Kujau1-4/+4
I noticed the 'mcelog' program had no comment and then ended up "fixing" a few more things: * reiserfsck -V does not print "reiserfsprogs" (any more?) * is "udevinfo" still shipped? udevd certainly is * grub2 doesn't have a 'grub' binary * add a "# how to get the mcelog version" comment Signed-off-by: Christian Kujau <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22Documentation/CodingStyle: flesh out if-else examplesHarry Wei1-0/+7
There is a missing case for "Chapter 3: Placing Braces and Spaces". We often know we should not use braces where a single statement. The first case is: if (condition) action(); Another case is: if (condition) do_this(); else do_that(); However, I can not find a description of the second case. Signed-off-by: Harry Wei <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22codafs: fix compile warning when CONFIG_SYSCTL=nRakib Mullick1-7/+1
When CONFIG_SYSCTL=n, we get the following warning: fs/coda/sysctl.c:18: warning: `coda_tabl' defined but not used Fix the warning by making sure coda_table and it's callee function are in the same context. Also clean up the code by removing extra #ifdef. [[email protected]: remove unneeded stub macros] Signed-off-by: Rakib Mullick <[email protected]> Cc: Jan Harkes <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22x86: allow CONFIG_ISA_DMA_API to be disabledDavid Rientjes2-4/+12
Not all 64-bit systems require ISA-style DMA, so allow it to be configurable. x86 utilizes the generic ISA DMA allocator from kernel/dma.c, so require it only when CONFIG_ISA_DMA_API is enabled. Disabling CONFIG_ISA_DMA_API is dependent on x86_64 since those machines do not have ISA slots and benefit the most from disabling the option (and on CONFIG_EXPERT as required by H. Peter Anvin). When disabled, this also avoids declaring claim_dma_lock(), release_dma_lock(), request_dma(), and free_dma() since those interfaces will no longer be provided. Signed-off-by: David Rientjes <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Russell King <[email protected]> Cc: "Luck, Tony" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22x86: only compile floppy driver if CONFIG_ISA_DMA_API is enabledDavid Rientjes1-1/+1
The generic floppy disk driver utilizies the interface provided by CONFIG_ISA_DMA_API, specifically claim_dma_lock(), release_dma_lock(), request_dma(), and free_dma(). Thus, there's a strict dependency on the config option and the driver should only be loaded if the kernel supports ISA-style DMA. Signed-off-by: David Rientjes <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Russell King <[email protected]> Cc: "Luck, Tony" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22x86: only compile 8237A if CONFIG_ISA_DMA_API is enabledDavid Rientjes1-1/+2
8237A utilizes the interface provided by CONFIG_ISA_DMA_API, specifically claim_dma_lock() and release_dma_lock(). Thus, there's a strict dependency on the config option and the module should only be loaded if the kernel supports ISA-style DMA. Signed-off-by: David Rientjes <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Russell King <[email protected]> Cc: "Luck, Tony" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22pnp: only assign IORESOURCE_DMA if CONFIG_ISA_DMA_API is enabledDavid Rientjes3-6/+10
IORESOURCE_DMA cannot be assigned without utilizing the interface provided by CONFIG_ISA_DMA_API, specifically request_dma() and free_dma(). Thus, there's a strict dependency on the config option and limits IORESOURCE_DMA only to architectures that support ISA-style DMA. ia64 is not one of those architectures, so pnp_check_dma() no longer needs to be special-cased for that architecture. pnp_assign_resources() will now return -EINVAL if IORESOURCE_DMA is attempted on such a kernel. Signed-off-by: David Rientjes <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Russell King <[email protected]> Cc: "Luck, Tony" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22rtc: add real-time clock driver for NVIDIA TegraAndrew Chew3-0/+499
This is a platform driver that supports the built-in real-time clock on Tegra SOCs. Signed-off-by: Andrew Chew <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Acked-by: Wan ZongShun <[email protected]> Acked-by: Jon Mayo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram fileVasiliy Kulikov1-1/+1
Don't allow everybogy to write to NVRAM. Signed-off-by: Vasiliy Kulikov <[email protected]> Cc: Andy Sharp <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/rtc/rtc-isl1208.c: add alarm supportRyan Mallon1-5/+171
Add alarm/wakeup support to rtc isl1208 driver Signed-off-by: Ryan Mallon <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22rtc: convert DS1374 to dev_pm_opsMark Brown1-6/+13
There is a general move to replace bus-specific PM ops with dev_pm_ops in order to facilitate core improvements. Do this conversion for DS1374. Signed-off-by: Mark Brown <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: john stultz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22init: return proper error code in do_mounts_rd()Davidlohr Bueso1-1/+1
In do_mounts_rd() if memory cannot be allocated, return -ENOMEM. Signed-off-by: Davidlohr Bueso <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22binfmt_elf: quiet GCC-4.6 'set but not used' warning in load_elf_binary()David Daney1-1/+1
With GCC-4.6 we get warnings about things being 'set but not used'. In load_elf_binary() this can happen with reloc_func_desc if ELF_PLAT_INIT is defined, but doesn't use the reloc_func_desc argument. Quiet the warning/error by marking reloc_func_desc as __maybe_unused. Signed-off-by: David Daney <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22epoll: fix compiler warning and optimize the non-blocking pathShawn Bohrer1-5/+28
Add a comment to ep_poll(), rename labels a bit clearly, fix a warning of unused variable from gcc and optimize the non-blocking path a little. Hinted-by: Andrew Morton <[email protected]> Signed-off-by: Davide Libenzi <[email protected]> [email protected]: : The non-blocking ep_poll path optimization introduced skipping over the : return value setup. : : Initialize it properly, my userspace gets upset by epoll_wait() returning : random things. : : In addition, remove the reinitialization at the fetch_events label, the : return value is garuanteed to be zero when execution reaches there. [[email protected]: fix initialization] Signed-off-by: Johannes Weiner <[email protected]> Cc: Shawn Bohrer <[email protected]> Acked-by: Davide Libenzi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22epoll: move ready event check into proper inlineDavide Libenzi1-3/+16
Move the event readiness check into a proper inline, and use it uniformly inside ep_poll() code. Events in the ->ovflist are no less ready than the ones in ->rdllist. Signed-off-by: Davide Libenzi <[email protected]> Cc: Shawn Bohrer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22crc32: add missed brackets in macroKonstantin Khlebnikov1-1/+1
Add brackets around typecasted argument in crc32() macro. Signed-off-by: Konstantin Khlebnikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22checkpatch: warn about memset with swapped argumentsDave Jones1-0/+5
Because the second and third arguments of memset have the same type, it turns out to be really easy to mix them up. This bug comes up time after time, so checkpatch should really be checking for it at patch submission time. Signed-off-by: Dave Jones <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22scripts/checkpatch.pl: reset rpt_cleaners warningsMike Frysinger1-0/+1
If you run checkpatch against multiple patches, and one of them has a whitespace issue which can be helped via a script (rpt_cleaners), you will see the same NOTE over and over for all subsequent patches. It makes it seem like those patches also have whitespace problems when in reality, there's only one or two bad apples. So reset rpt_cleaners back to 0 after we've issued the note so that it only shows up near the patch with the actual problems. Signed-off-by: Mike Frysinger <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/mmc/host/omap_hsmmc.c: use resource_size()Chris Ball1-4/+3
Use resource_size(). Signed-off-by: Chris Ball <[email protected]> Cc: Madhusudhan Chikkature <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/mmc/host/omap.c: use resource_size()Chris Ball1-3/+3
Signed-off-by: Chris Ball <[email protected]> Cc: Jarkko Lavinen <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22sigma-firmware: loader for Analog Devices' SigmaStudioMike Frysinger4-0/+188
Analog Devices' SigmaStudio can produce firmware blobs for devices with these DSPs embedded (like some audio codecs). Allow these device drivers to easily parse and load them. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22kstrto*: converting strings to integers done (hopefully) rightAlexey Dobriyan8-150/+1039
1. simple_strto*() do not contain overflow checks and crufty, libc way to indicate failure. 2. strict_strto*() also do not have overflow checks but the name and comments pretend they do. 3. Both families have only "long long" and "long" variants, but users want strtou8() 4. Both "simple" and "strict" prefixes are wrong: Simple doesn't exactly say what's so simple, strict should not exist because conversion should be strict by default. The solution is to use "k" prefix and add convertors for more types. Enter kstrtoull() kstrtoll() kstrtoul() kstrtol() kstrtouint() kstrtoint() kstrtou64() kstrtos64() kstrtou32() kstrtos32() kstrtou16() kstrtos16() kstrtou8() kstrtos8() Include runtime testsuite (somewhat incomplete) as well. strict_strto*() become deprecated, stubbed to kstrto*() and eventually will be removed altogether. Use kstrto*() in code today! Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if they'll be unused at runtime. This is temporarily solution, because I don't want to hardcode list of archs where these functions aren't needed. Current solution with sizeof() and __alignof__ at least always works. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: add drivers/platform/msm to MSM subsystemKenneth Heitke1-0/+1
Signed-off-by: Kenneth Heitke <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: update WINBOND CIR patternJoe Perches1-1/+1
commit 5b2e303f6df ("[media] rc-core: convert winbond-cir") moved the files, update the pattern. Signed-off-by: Joe Perches <[email protected]> Acked-by: David Härdeman <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: uSB SE401 moved to staging, update patternJoe Perches1-3/+2
And set the status to Orphan. Signed-off-by: Joe Perches <[email protected]> Cc: Jeroen Vreeken <[email protected]> Cc: Hans Verkuil <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: update SFI patternJoe Perches1-1/+1
commit 937f961a653 ("x86: Move sfi to platform") moved the files, update the pattern. Signed-off-by: Joe Perches <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: remove SHARP LH7A40X sectionJoe Perches1-11/+0
commit 82e6923e186 ("ARM: lh7a40x: remove unmaintained platform support") removed support, remove it from MAINTAINERS. Signed-off-by: Joe Perches <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: update SCX200 file patternJoe Perches1-1/+1
commit 3b3da9d25ae ("x86: Move scx200 to platform") moved it, convert the pattern too. Signed-off-by: Joe Perches <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: remove unused TIMEKEEPING timekeeping.hJoe Perches1-1/+0
Commit 88606e80da0 ("MAINTAINERS: Update timer related entries") added a file pattern that didn't actually exist. Signed-off-by: Joe Perches <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: remove IEEE1394 entryJoe Perches1-9/+0
commit 66fa12c571d ("ieee1394: remove the old IEEE 1394 driver stack") removed the code, remove the MAINTAINERS entry. Signed-off-by: Joe Perches <[email protected]> Cc: Stefan Richter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: update media pathJoe Perches1-2/+1
Commit 52b661449ae ("[media] rc: Rename remote controller type to rc_type instead of ir_type") moved it around. Signed-off-by: Joe Perches <[email protected]> Cc: Maxim Levitsky <[email protected]> Acked-by: Harry Wei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: update clkdev locationJoe Perches1-1/+1
Commit 6d803ba736a ("ARM: 6483/1: arm & sh: factorised duplicated clkdev.c") moved it to a separate directory. Signed-off-by: Joe Perches <[email protected]> Cc: Russell King <[email protected]> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: remove unnecessary [email protected] entriesJoe Perches1-5/+0
CC'ing lkml is the default and doesn't need separate entries. Signed-off-by: Joe Perches <[email protected]> Acked-by: Harry Wei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: add missing : after HR Timers F tagJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Acked-by: Harry Wei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: remove ASOC CODEC DRIVERS files not in treeJoe Perches1-2/+0
Remove these patterns until such files are actually in the tree. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: change web links from wiki-analog to wiki.analogJoe Perches1-10/+10
wiki-analog doesn't seem to work, but wiki.analog does. Signed-off-by: Joe Perches <[email protected]> Cc: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: update ADP5520 patternJoe Perches1-1/+1
Typo in path. Signed-off-by: Joe Perches <[email protected]> Acked-by: Michael Hennerich <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: quote non-alphanumeric email addressesJoe Perches1-5/+5
Add quotes around email address with periods and commas. So they don't explode when pasted into certain email clients. Signed-off-by: Joe Perches <[email protected]> Acked-by: Harry Wei <[email protected]> Cc: "Mark F. Brown" <[email protected]> Cc: "Gustavo F. Padovan" <[email protected]> Cc: "Stephen M. Cameron" <[email protected]> Cc: "Lee, Chun-Yi" <[email protected]> Acked-by: Harry Wei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22MAINTAINERS: add topgit for T:Harry Wei1-1/+1
At least one tree: ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6) is available via topgit. Add mention of topgit in the MAINTAINERS description section. Signed-off-by: Harry Wei <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22get_maintainer.pl: allow "K:" pattern tests to match non-patch textJoe Perches1-1/+10
Extend the usage of the K section in the MAINTAINERS file to support matching regular expressions to any arbitrary text that may precede the patch itself. For example, the commit message or mail headers generated by git-format-patch. Signed-off-by: Joe Perches <[email protected]> Original-patch-by: L. Alberto Giménez <[email protected]> Acked-by: L. Alberto Giménez <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22printk: allow setting DEFAULT_MESSAGE_LEVEL via KconfigMandeep Singh Baines2-1/+12
We've been burned by regressions/bugs which we later realized could have been triaged quicker if only we'd paid closer attention to dmesg. To make it easier to audit dmesg, we'd like to make DEFAULT_MESSAGE_LEVEL Kconfig-settable. That way we can set it to KERN_NOTICE and audit any messages <= KERN_WARNING. Signed-off-by: Mandeep Singh Baines <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Joe Perches <[email protected]> Cc: Olof Johansson <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22printk: use %pK for /proc/kallsyms and /proc/modulesKees Cook3-9/+7
In an effort to reduce kernel address leaks that might be used to help target kernel privilege escalation exploits, this patch uses %pK when displaying addresses in /proc/kallsyms, /proc/modules, and /sys/module/*/sections/*. Note that this changes %x to %p, so some legitimately 0 values in /proc/kallsyms would have changed from 00000000 to "(null)". To avoid this, "(null)" is not used when using the "K" format. Anything that was already successfully parsing "(null)" in addition to full hex digits should have no problem with this change. (Thanks to Joe Perches for the suggestion.) Due to the %x to %p, "void *" casts are needed since these addresses are already "unsigned long" everywhere internally, due to their starting life as ELF section offsets. Signed-off-by: Kees Cook <[email protected]> Cc: Eugene Teo <[email protected]> Cc: Dan Rosenberg <[email protected]> Cc: Rusty Russell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22console: prevent registered consoles from dumping old kernel message over againFeng Tang1-0/+18
For a platform with many consoles like: "console=tty1 console=ttyMFD2 console=ttyS0 earlyprintk=mrst" Each time when the non "selected_console" (tty1 and ttyMFD2 here) get registered, the existing kernel message will be printed out on registered consoles again, the "mrst" early console will get some same message for 3 times, and "tty1" will get some for twice. As suggested by Andrew Morton, every time a new console is registered, it will be set as the "exclusive" console which will dump the already existing kernel messages. Signed-off-by: Feng Tang <[email protected]> Cc: Greg KH <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22console: allow to retain boot console via boot option keep_bootconFabio M. Di Nitto2-1/+21
On some architectures, the boot process involves de-registering the boot console (early boot), initialize drivers and then re-register the console. This mechanism introduces a window in which no printk can happen on the console and messages are buffered and then printed once the new console is available. If a kernel crashes during this window, all it's left on the boot console is "console [foo] enabled, bootconsole disabled" making debug of the crash rather 'interesting'. By adding "keep_bootcon" option, do not unregister the boot console, that will allow to printk everything that is happening up to the crash. The option is clearly meant only for debugging purposes as it introduces lots of duplicated info printed on console, but will make bug report from users easier as it doesn't require a kernel build just to figure out where we crash. Signed-off-by: Fabio M. Di Nitto <[email protected]> Acked-by: David S. Miller <[email protected]> Cc: Alan Cox <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22vsprintf: neaten %pK kptr_restrict, save a bit of code spaceJoe Perches1-9/+5
If kptr restrictions are on, just set the passed pointer to NULL. $ size lib/vsprintf.o.* text data bss dec hex filename 8247 4 2 8253 203d lib/vsprintf.o.new 8282 4 2 8288 2060 lib/vsprintf.o.old Signed-off-by: Joe Perches <[email protected]> Cc: Dan Rosenberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22drivers/dca/dca-core.c: use list_move() instead of list_del()/list_add() ↵Kirill A. Shutemov1-4/+2
combination Signed-off-by: Kirill A. Shutemov <[email protected]> Cc: Maciej Sosnowski <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22kernel/watchdog.c: always return NOTIFY_OK during cpu up/down eventsDon Zickus1-6/+16
This patch addresses a couple of problems. One was the case when the hardlockup failed to start, it also failed to start the softlockup. There were valid cases when the hardlockup shouldn't start and that shouldn't block the softlockup (no lapic, bios controls perf counters). The second problem was when the hardlockup failed to start on boxes (from a no lapic or bios controlled perf counter case), it reported failure to the cpu notifier chain. This blocked the notifier from continuing to start other more critical pieces of cpu bring-up (in our case based on a 2.6.32 fork, it was the mce). As a result, during soft cpu online/offline testing, the system would panic when a cpu was offlined because the cpu notifier would succeed in processing a watchdog disable cpu event and would panic in the mce case as a result of un-initialized variables from a never executed cpu up event. I realized the hardlockup/softlockup cases are really just debugging aids and should never impede the progress of a cpu up/down event. Therefore I modified the code to always return NOTIFY_OK and instead rely on printks to inform the user of problems. Signed-off-by: Don Zickus <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Reviewed-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-22kernel/watchdog.c: allow hardlockup to panic by defaultDon Zickus3-3/+24
When a cpu is considered stuck, instead of limping along and just printing a warning, it is sometimes preferred to just panic, let kdump capture the vmcore and reboot. This gets the machine back into a stable state quickly while saving the info that got it into a stuck state to begin with. Add a Kconfig option to allow users to set the hardlockup to panic by default. Also add in a 'nmi_watchdog=nopanic' to override this. [[email protected]: fix strncmp length] Signed-off-by: Don Zickus <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Reviewed-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>