summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Mutex documentation is unclear about software interrupts, tasklets and timersMatti Linnanvuori2007-10-172-2/+4
| | | | | | | Acked-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Spelling fix: weired -> weirdRalf Baechle2007-10-171-1/+1
| | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ipc namespace: remove config ipc ns fixCedric Le Goater2007-10-171-4/+0Star
| | | | | | | | | | | | Finish the work : kill all #ifdef CONFIG_IPC_NS. Thanks Robert ! Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Eric Biederman <ebiederm@xmision.com> Cc: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* I2O: Fix "defined but not used" build warningsSatyam Sharma2007-10-171-47/+47
| | | | | | | | | | | | | drivers/message/i2o/exec-osm.c:539: warning: `i2o_exec_lct_notify' defined but not used comes when CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=n, because its only callsite is #ifdef'ed as such. So let's #ifdef the function definition also. Also move the definition to before the callsite, to get rid of forward prototype. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Satyam Sharma <satyam@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* update checkpatch.pl to version 0.10Andy Whitcroft2007-10-171-58/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version brings a number of new checks, and a number of bug fixes. Of note: - better categorisation and space checks for dual use unary/binary operators - warn on deprecated use of {SPIN,RW}_LOCK_UNLOCKED - check if/for/while with trailing ';' for hanging statements - detect DOS line endings - detect redundant casts for kalloc() Andy Whitcroft (18): Version: 0.10 asmlinkage is also a storage type pull out inline specifiers allow only some operators before a unary operator parenthesised values may span line ends add additional attribute matching handle sparse annotations within pointer type space checks support alternative function definition syntax for typedefs check if/for/while with trailing ';' for hanging statements fix output format for case checks deprecate SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED allow complex macros with bracketing braces detect and report DOS line endings fastcall is a valid function attribute bracket spacing is ok for 'for' categorise operators into unary/binary/definitions add heuristic to pick up on unannotated types remove spurious warnings from cat_vet Dave Jones (1): Make checkpatch warn about pointless casting of kalloc returns. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add CONFIG_VT_UNICODEBill Nottingham2007-10-176-5/+27
| | | | | | | | | | | | | | | | | | As of now, the kernel defaults to non-unicode and XLATE for the keyboard. We've been changing this in Fedora, but that requires patching the defaults in the kernel. The attached introduces CONFIG_VT_UNICODE, which sets the console in unicode mode by default on boot, including both the virtual terminal and the keyboard driver. Signed-off-by: Bill Nottingham <notting@redhat.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* avoid negative (and full-width) shifts in radix-tree.cPeter Lund2007-10-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Negative shifts are not allowed in C (the result is undefined). Same thing with full-width shifts. It works on most platforms but not on the VAX with gcc 4.0.1 (it results in an "operand reserved" fault). Shifting by more than the width of the value on the left is also not allowed. I think the extra '>> 1' tacked on at the end in the original code was an attempt to work around that. Getting rid of that is an extra feature of this patch. Here's the chapter and verse, taken from the final draft of the C99 standard ("6.5.7 Bitwise shift operators", paragraph 3): "The integer promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined." Thank you to Jan-Benedict Glaw, Christoph Hellwig, Maciej Rozycki, Pekka Enberg, Andreas Schwab, and Christoph Lameter for review. Special thanks to Andreas for spotting that my fix only removed half the undefined behaviour. Signed-off-by: Peter Lund <firefly@vax64.dk> Christoph Lameter <clameter@sgi.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Andreas Schwab <schwab@suse.de> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: WU Fengguang <wfg@mail.ustc.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* constify string/array kparam tracking structuresJan Beulich2007-10-172-17/+18
| | | | | | | | | .. in an effort to make read-only whatever can be made, so that CONFIG_DEBUG_RODATA can catch as many issues as possible. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* store __setup_str_* in a more compact wayJan Beulich2007-10-171-1/+1
| | | | | | | | | | __setup_str_* are referenced only during boot, hence there's no need to waste image space for aligning these strings (with the aim of improving performance). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* handle recursive calls to bust_spinlocks()Jan Beulich2007-10-171-3/+3
| | | | | | | | | | | | | | | | | | Various architectures may call bust_spinlocks() recursively; the function itself, however, doesn't appear to be meant to be called in this manner. Nevertheless, this doesn't appear to be a problem as long as bust_spinlocks(0) doesn't get called twice in a row (otherwise, unblank_screen() may enter the scheduler). However, at least on i386 die() has been capable of returning (and on other architectures this should really be that way, too) when notify_die() returns NOTIFY_STOP. Short of getting a reply to a respective query, this patch makes bust_spinlocks() increment/decrement oops_in_progress, and wake klogd only when the count drops back to zero. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add a "rounddown_pow_of_two" routine to log2.hRobert P. J. Day2007-10-171-0/+25
| | | | | | | | | | | | To go along with the existing "roundup_pow_of_two" routine, add one for rounding down since that operation appears to crop up on a regular basis in the source tree. [m.kozlowski@tuxland.pl: fix unbalanced parentheses] Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* make dmapool code use __set_current_state()Arjan van de Ven2007-10-171-1/+1
| | | | | | Signed-off-by: Arjan van de Ven <arjan@Linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* quota: send messages via netlinkJan Kara2007-10-174-30/+222
| | | | | | | | | | | | | Implement sending of quota messages via netlink interface. The advantage is that in userspace we can better decide what to do with the message - for example display a dialogue in your X session or just write the message to the console. As a bonus, we can get rid of problems with console locking deep inside filesystem code once we remove the old printing mechanism. Signed-off-by: Jan Kara <jack@suse.cz> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Remove final traces of long-deprecated "ramdisk" kernel parmRobert P. J. Day2007-10-174-19/+3Star
| | | | | | | | | | Since the "ramdisk" kernel parameter has been officially deprecated since at least 2.6.18, might as well finally get rid of it. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* docs: ramdisk/initrd/initramfs correctionsRandy Dunlap2007-10-174-22/+27
| | | | | | | | | | | | | | | | initrd/initramfs/ramdisk docs: - fix typos/spellos/grammar - clarify RAM disk config location - correct cpio option Acked-by: Bryan O'Sullivan <bos@serpentine.com> Acked-by: Rob Landley <rob@landley.net> Cc: Werner Almesberger <werner@almesberger.net> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* local_t: update documentationMathieu Desnoyers2007-10-171-1/+1
| | | | | | | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* atomic_ops.txt: mention local_tGrant Grundler2007-10-171-0/+4
| | | | | | | | | local_t is a variant of atomic_t and has related ops to match. Add reference for local_t documentation to atomic_ops.txt. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* local_t Documentation update 2Mathieu Desnoyers2007-10-171-0/+23
| | | | | | | | | | | | | | | | | Grant Grundler was asking for more detail about correct usage of local atomic operations and suggested adding the resulting summary to local_ops.txt. "Please add a bit more detail. If DaveM is correct (he normally is), then there must be limits on how the local_t can be used in the kernel process and interrupt contexts. I'd like those rules spelled out very clearly since it's easy to get wrong and tracking down such a bug is quite painful." Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Remove valueless definition of hard-selected RAMFS optionRobert P. J. Day2007-10-173-16/+2Star
| | | | | | | | | | | | | | | | | | Since CONFIG_RAMFS is currently hard-selected to "y", and since Documentation/filesystems/ramfs-rootfs-initramfs.txt reads as follows: "The amount of code required to implement ramfs is tiny, because all the work is done by the existing Linux caching infrastructure. Basically, you're mounting the disk cache as a filesystem. Because of this, ramfs is not an optional component removable via menuconfig, since there would be negligible space savings." It seems pointless to leave this as a Kconfig entry. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/block/cciss.c: fix check-after-useAdrian Bunk2007-10-171-29/+27Star
| | | | | | | | | | | | | The Coverity checker spotted that we have already oops'ed if "disk" was NULL. Since "disk" being NULL seems impossible at this point this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* make kernel/profile.c:time_hook staticAdrian Bunk2007-10-172-4/+1Star
| | | | | | | | {,un}register_timer_hook() is the API that should be used. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kernel/sys_ni.c: add dummy sys_ni_syscall() prototypeAdrian Bunk2007-10-171-0/+4
| | | | | | | | | kernel/sys_ni.c can't #include <linux/syscalls.h> due to cond_syscall(), but let's tell gcc to not warn with -Wmissing-prototypes. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* n_hdlc.c: fix check-after-useAdrian Bunk2007-10-171-1/+1
| | | | | | | | | | | | | The Coverity checker spotted that we'd have already oops'ed if "tty" was NULL. Since "tty" can't be NULL when we reach this line of code this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* remove include/asm-*/ipc.hAdrian Bunk2007-10-1747-77/+47Star
| | | | | | | | | | | | All asm/ipc.h files do only #include <asm-generic/ipc.h>. This patch therefore removes all include/asm-*/ipc.h files and moves the contents of include/asm-generic/ipc.h to include/linux/ipc.h. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Drop some headers from mm.hAlexey Dobriyan2007-10-175-4/+4
| | | | | | | | | | | mm.h doesn't use directly anything from mutex.h and backing-dev.h, so remove them and add them back to files which need them. Cross-compile tested on many configs and archs. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cciss: fix error reporting for SG_IOSteve Cameron2007-10-171-18/+61
| | | | | | | | | | | | | | | This fixes a problem with the way cciss was filling out the "errors" field of the request structure upon completion of requests. Previously, it just put a 1 or a 0 in there and used the negation of this as the uptodate parameter to one of the functions in the block layer, being a block device. For the SG_IO ioctl, this was not sufficient, and we noticed that, for example, sg_turs from sg3_utils did not correctly detect problems due to cciss having set rq->errors incorrectly. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* NBD: allow hung network I/O to be cancelledPaul Clements2007-10-172-31/+64
| | | | | | | | | | | | | | | | | | Allow NBD I/O to be cancelled when a network outage occurs. Previously, I/O would just hang, and if enough I/O was hung in nbd, the system (at least user-level) would completely hang until a TCP timeout (default, 15 minutes) occurred. The patch introduces a new ioctl NBD_SET_TIMEOUT that allows a transmit timeout value (in seconds) to be specified. Any network send that exceeds the timeout will be cancelled and the nbd connection will be shut down. I've tested with various timeout values and 6 seconds seems to be a good choice for the timeout. If the NBD_SET_TIMEOUT ioctl is not called, you get the old (I/O hang) behavior. Signed-off-by: Paul Clements <paul.clements@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* NBD: set uninitialized devices to size 0Paul Clements2007-10-171-2/+5
| | | | | | | | | | | | | | | | | | | | | This fixes errors with utilities (such as LVM's vgscan) that try to scan all devices. Previously this would generate read errors when uninitialized nbd devices were scanned: # vgscan Reading all physical volumes. This may take a while... /dev/nbd0: read failed after 0 of 1024 at 0: Input/output error /dev/nbd0: read failed after 0 of 1024 at 509804544: Input/output error /dev/nbd0: read failed after 0 of 2048 at 0: Input/output error /dev/nbd1: read failed after 0 of 1024 at 509804544: Input/output error /dev/nbd1: read failed after 0 of 2048 at 0: Input/output error From now on, uninitialized nbd devices will have size zero, which prevents these errors. Signed-off-by: Paul Clements <paul.clements@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* CodingStyle: relax the 80-cole ruleAlan Cox2007-10-171-2/+5
| | | | | | | | | | | I would suggest this change to make CodingStyle properly reflect the style used by the kernel, rather than the current wording which is wishful thinking and misleading, and comes from the same school of thought that gets off on prescriptive grammar, latin and comp.std.c Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cleanup floppy.hJan Beulich2007-10-1712-35/+0Star
| | | | | | | | | AUTO_DMA and FLOPPY_MOTOR_MASK in include/asm-*/floppy.h are dead symbols - remove them. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* floppy: tolerate DMA channel unavailabilityJan Beulich2007-10-171-5/+9
| | | | | | | | | | The floppy driver is already written to be able to operate in virtual DMA mode. Thus it can easily be adjusted to tolerate failure from fd_request_dma() as long as virtual DMA mode is not disallowed. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Move PREEMPT_NOTIFIERS into an always-included KconfigAvi Kivity2007-10-172-3/+3
| | | | | | | | | | | | | | | | Kconfig.preempt is not included on some archs (for example, m68k). On those archs, the Kconfig machinery complains that KVM selects an undefined symbol PREEMPT_NOTIFIERS (which lives in Kconfig.preempt). So move the offending symbol into a Kconfig file which is included by everyone. Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Avi Kivity <avi@qumranet.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* tty.h: remove dead defineAlan Cox2007-10-171-5/+0Star
| | | | | | | | | No longer used. TTY_FLIPBUF_SIZE will also go soon but needs a couple of other cleanups first Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Shrink task_struct if CONFIG_FUTEX=nAlexey Dobriyan2007-10-173-3/+9
| | | | | | | | | | robust_list, compat_robust_list, pi_state_list, pi_state_cache are really used if futexes are on. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add-vmcore: add a prefix "VMCOREINFO_" to the vmcoreinfo macrosKen'ichi Ohmichi2007-10-175-56/+56
| | | | | | | | | | | | Add a prefix "VMCOREINFO_" to the vmcoreinfo macros. Old vmcoreinfo macros were defined as generic names SYMBOL/SIZE/OFFSET /LENGTH/CONFIG, and it is impossible to grep for them. So these names should be changed. This discussion is the following: http://www.ussg.iu.edu/hypermail/linux/kernel/0709.1/0415.html Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add-vmcore: use the existing ia64_tpa() instead of asm codeKen'ichi Ohmichi2007-10-171-4/+2Star
| | | | | | Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add-vmcore: add nodemask_t's size and NR_FREE_PAGES's value to vmcoreinfo_dataKen'ichi Ohmichi2007-10-172-0/+7
| | | | | | | | | | | | | | [2/3] Add nodemask_t's size and NR_FREE_PAGES's value to vmcoreinfo_data. The dump filetering command 'makedumpfile'(v1.1.6 or before) had assumed the above values, and it was not good from the reliability viewpoint. So makedumpfile v1.2.0 came to need these values and I created the patch to let the kernel output them. makedumpfile site: https://sourceforge.net/projects/makedumpfile/ Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* add-vmcore: cleanup the coding style according to Andrew's commentsKen'ichi Ohmichi2007-10-173-13/+15
| | | | | | | | | | | | | | [1/3] Cleanup the coding style according to Andrew's comments: http://lists.infradead.org/pipermail/kexec/2007-August/000522.html - vmcoreinfo_append_str() should have suitable __attribute__s so that the compiler can check its use. - vmcoreinfo_max_size should have size_t. - Use get_seconds() instead of xtime.tv_sec. - Use init_uts_ns.name.release instead of UTS_RELEASE. Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add vmcoreinfoKen'ichi Ohmichi2007-10-178-1/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch set frees the restriction that makedumpfile users should install a vmlinux file (including the debugging information) into each system. makedumpfile command is the dump filtering feature for kdump. It creates a small dumpfile by filtering unnecessary pages for the analysis. To distinguish unnecessary pages, it needs a vmlinux file including the debugging information. These days, the debugging package becomes a huge file, and it is hard to install it into each system. To solve the problem, kdump developers discussed it at lkml and kexec-ml. As the result, we reached the conclusion that necessary information for dump filtering (called "vmcoreinfo") should be embedded into the first kernel file and it should be accessed through /proc/vmcore during the second kernel. (http://www.uwsg.iu.edu/hypermail/linux/kernel/0707.0/1806.html) Dan Aloni created the patch set for the above implementation. (http://www.uwsg.iu.edu/hypermail/linux/kernel/0707.1/1053.html) And I updated it for multi architectures and memory models. (http://lists.infradead.org/pipermail/kexec/2007-August/000479.html) Signed-off-by: Dan Aloni <da-x@monatomic.org> Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* binfmt_flat: warning fixesAndrew Morton2007-10-171-6/+8
| | | | | | | | | | | | | | | | | | | | Fix this lot: fs/binfmt_flat.c: In function `decompress_exec': fs/binfmt_flat.c:293: warning: label `out' defined but not used fs/binfmt_flat.c: In function `load_flat_file': fs/binfmt_flat.c:462: warning: unsigned int format, long int arg (arg 3) fs/binfmt_flat.c:462: warning: unsigned int format, long int arg (arg 4) fs/binfmt_flat.c:518: warning: comparison of distinct pointer types lacks a cast fs/binfmt_flat.c:549: warning: passing arg 1 of `ksize' makes pointer from integer without a cast fs/binfmt_flat.c:601: warning: passing arg 1 of `ksize' makes pointer from integer without a cast fs/binfmt_flat.c: In function `load_flat_binary': fs/binfmt_flat.c:116: warning: 'dummy' might be used uninitialized in this function Acked-by: Greg Ungerer <gerg@uclinux.org> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add stack checking for BlackfinMike Frysinger2007-10-171-0/+3
| | | | | | | | | | Simply fill out the bits in checkstack.pl for Blackfin. I thought I already sent this, but I don't see it in -mm anywhere ... Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* do_sigaction: don't worry about signal_pending()Oleg Nesterov2007-10-171-9/+0Star
| | | | | | | | | | | | | | | | | do_sigaction() returns -ERESTARTNOINTR if signal_pending(). The comment says: * If there might be a fatal signal pending on multiple * threads, make sure we take it before changing the action. I think this is not needed. We should only worry about SIGNAL_GROUP_EXIT case, bit it implies a pending SIGKILL which can't be cleared by do_sigaction. Kill this special case. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* exec: RT sub-thread can livelock and monopolize CPU on execOleg Nesterov2007-10-172-16/+22
| | | | | | | | | | | | | | de_thread() yields waiting for ->group_leader to be a zombie. This deadlocks if an rt-prio execer shares the same cpu with ->group_leader. Change the code to use ->group_exit_task/notify_count mechanics. This patch certainly uglifies the code, perhaps someone can suggest something better. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* exec: consolidate 2 fast-pathsOleg Nesterov2007-10-171-9/+0Star
| | | | | | | | | | | Now that we don't pre-allocate the new ->sighand, we can kill the first fast path, it doesn't make sense any longer. At best, it can save one "list_empty()" check but leads to the code duplication. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* exec: simplify the new ->sighand allocationOleg Nesterov2007-10-171-15/+9Star
| | | | | | | | | | | | | | | | | | | | | de_thread() pre-allocates newsighand to make sure that exec() can't fail after killing all sub-threads. Imho, this buys nothing, but complicates the code: - this is (mostly) needed to handle CLONE_SIGHAND without CLONE_THREAD tasks, this is very unlikely (if ever used) case - unless we already have some serious problems, GFP_KERNEL allocation should not fail - ENOMEM still can happen after de_thread(), ->sighand is not the last object we have to allocate Change the code to allocate the new ->sighand on demand. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* exec: simplify ->sighand switchingOleg Nesterov2007-10-171-7/+1Star
| | | | | | | | | | | | | | | There is no any reason to do recalc_sigpending() after changing ->sighand. To begin with, recalc_sigpending() does not take ->sighand into account. This means we don't need to take newsighand->siglock while changing sighands. rcu_assign_pointer() provides a necessary barrier, and if another process reads the new ->sighand it should either take tasklist_lock or it should use lock_task_sighand() which has a corresponding smp_read_barrier_depends(). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Fix f_version type: should be u64 instead of unsigned longMathieu Desnoyers2007-10-176-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix f_version type: should be u64 instead of long There is a type inconsistency between struct inode i_version and struct file f_version. fs.h: struct inode u64 i_version; and struct file unsigned long f_version; Users do: fs/ext3/dir.c: if (filp->f_version != inode->i_version) { So why isn't f_version a u64 ? It becomes a problem if versions gets higher than 2^32 and we are on an architecture where longs are 32 bits. This patch changes the f_version type to u64, and updates the users accordingly. It applies to 2.6.23-rc2-mm2. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Martin Bligh <mbligh@google.com> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Cc: Al Viro <viro@ftp.linux.org.uk> Cc: <linux-ext4@vger.kernel.org> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* aio: account I/O wait time properlyJeff Moyer2007-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | | Some months back I proposed changing the schedule() call in read_events to an io_schedule(): http://osdir.com/ml/linux.kernel.aio.general/2006-10/msg00024.html This was rejected as there are AIO operations that do not initiate disk I/O. I've had another look at the problem, and the only AIO operation that will not initiate disk I/O is IOCB_CMD_NOOP. However, this command isn't even wired up! Given that it doesn't work, and hasn't for *years*, I'm going to suggest again that we do proper I/O accounting when using AIO. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Acked-by: Zach Brown <zach.brown@oracle.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Suparna Bhattacharya <suparna@in.ibm.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make rcutorture RNG use temporal entropyPaul E. McKenney2007-10-171-6/+3Star
| | | | | | | | | | | | | | | | | | | | | Repost of http://lkml.org/lkml/2007/8/10/472 made available by request. The locking used by get_random_bytes() can conflict with the preempt_disable() and synchronize_sched() form of RCU. This patch changes rcutorture's RNG to gather entropy from the new cpu_clock() interface (relying on interrupts, preemption, daemons, and rcutorture's reader thread's rock-bottom scheduling priority to provide useful entropy), and also adds and EXPORT_SYMBOL_GPL() to make that interface available to GPLed kernel modules such as rcutorture. Passes several hours of rcutorture. [ego@in.ibm.com: Use raw_smp_processor_id() in rcu_random()] Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Use num_possible_cpus() instead of NR_CPUS for timer distributionjohn stultz2007-10-171-1/+1
| | | | | | | | | | | | | | | To avoid lock contention, we distribute the sched_timer calls across the cpus so they do not trigger at the same instant. However, I used NR_CPUS, which can cause needless grouping on small smp systems depending on your kernel config. This patch converts to using num_possible_cpus() so we spread it as evenly as possible on every machine. Briefly tested w/ NR_CPUS=255 and verified reduced contention. Signed-off-by: John Stultz <johnstul@us.ibm.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>