26 Mar, 2006
40 commits
-
Initramfs initrd images do not need a ramdisk device, so remove this
restriction in Kconfig. BLK_DEV_RAM=n saves about 13k on i386. Also
without ramdisk device there's no need for "dry run", so initramfs unpacks
much faster.People using cramfs, squashfs, or gzipped ext2/minix initrd images are
probably smart enough not to turn off ramdisk support by accident.Cc: Al Viro
Cc: Christoph Hellwig
Cc: "H. Peter Anvin"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A couple of places are forgetting to take it.
The kswapd case is probably unimportant. keventd_create_kthread() was racy.
The whole thing is a bit flakey: you start a kernel thread, get its pid from
kernel_thread() then look up its task_struct.a) It assumes that pid recycling takes a "long" time.
b) We get a task_struct but no reference was taken on it. The owner of the
kswapd and kthread task_struct*'s must assume that the new thread won't
exit unexpectedly. Because if it does, they're left holding dead memory
and any attempt to control or stop that task will crash.Cc: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When EXT3FS_DEBUG is #define-d, the compile breaks due to #include file
issues.Signed-off-by: Kirk True
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This fixes coverity bugs #398 and #397
Signed-off-by: Jesper Juhl
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch reduces scheduling latency in shrink_dcache_sb() noticed during
remounting of big partitions with many cached dentries. The same latency
fix was applied to select_parent() long ago.Signed-off-by: Denis Lunev
Signed-off-by: Pavel Emelianov
Signed-off-by: Kirill Korotaev
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In here, I think the following order is more cache-friendly.
Signed-off-by: OGAWA Hirofumi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
freeze_bdev() uses a fsync_super() without sync_blockdev(). This patch
makes __fsync_super() and shares it.Signed-off-by: OGAWA Hirofumi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Believe it or not, but in fs/minix/*, the oldest filesystem in the kernel,
something still can be fixed:printk("new_inode: bit already set");
"\n" is missing!
While at it, I also removed periods from the end of error messages and made
capitalization uniform. Also s/i-node/inode/, s/printk (/printk(/Signed-ff-by: Denis Vlasenko
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
PTRACE_TRACEME doesn't have proper capabilities validation when parent is
less privileged than child. Issue pointed out by Ram Gupta
.Note: I haven't identified a strong security issue, and it's a small ABI
change that could break apps that rely on existing behaviour (which allows
parent that is less privileged than child to ptrace when child does
PTRACE_TRACEME).Signed-off-by: Chris Wright
Cc: Ram Gupta
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Move capable() to kernel/capability.c and eliminate duplicate
implementations. Add __capable() function which can be used to check for
capabiilty of any process.Signed-off-by: Chris Wright
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds a proper prototype for setup_arch() in init.h.
This patch is based on a patch by Ben Dooks .
Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Implement the half-closed devices notifiation, by adding a new POLLRDHUP
(and its alias EPOLLRDHUP) bit to the existing poll/select sets. Since the
existing POLLHUP handling, that does not report correctly half-closed
devices, was feared to be changed, this implementation leaves the current
POLLHUP reporting unchanged and simply add a new bit that is set in the few
places where it makes sense. The same thing was discussed and conceptually
agreed quite some time ago:http://lkml.org/lkml/2003/7/12/116
Since this new event bit is added to the existing Linux poll infrastruture,
even the existing poll/select system calls will be able to use it. As far
as the existing POLLHUP handling, the patch leaves it as is. The
pollrdhup-2.6.16.rc5-0.10.diff defines the POLLRDHUP for all the existing
archs and sets the bit in the six relevant files. The other attached diff
is the simple change required to sys/epoll.h to add the EPOLLRDHUP
definition.There is "a stupid program" to test POLLRDHUP delivery here:
http://www.xmailserver.org/pollrdhup-test.c
It tests poll(2), but since the delivery is same epoll(2) will work equally.
Signed-off-by: Davide Libenzi
Cc: "David S. Miller"
Cc: Michael Kerrisk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This fix prevents re-disabling and enabling of a previously disabled
interrupt. On an SMP system with irq balancing enabled; If an interrupt is
disabled from within its own interrupt context with disable_irq_nosync and is
also earmarked for processor migration, the interrupt is blindly moved to the
other processor and enabled without regard for its current "enabled" state.
If there is an interrupt pending, it will unexpectedly invoke the irq handler
on the new irq owning processor (even though the irq was previously disabled)The more intuitive fix would be to invoke disable_irq_nosync and
enable_irq, but since we already have the desc->lock from __do_IRQ, we
cannot call them directly. Instead we can use the same logic to disable
and enable found in disable_irq_nosync and enable_irq, with regards to the
desc->depth.This now prevents a disabled interrupt from being re-disabled, and more
importantly prevents a disabled interrupt from being incorrectly enabled on
a different processor.Signed-off-by: Bryan Holty
Cc: Andi Kleen
Cc: "Luck, Tony"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Uninline some massive IRQ migration functions. Put them in the new
kernel/irq/migration.c.Cc: Andi Kleen
Cc: "Luck, Tony"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
sparc32:
drivers/input/touchscreen/ads7846.c: In function `ads7846_read12_ser':
drivers/input/touchscreen/ads7846.c:206: warning: implicit declaration of function `disable_irq'
drivers/input/touchscreen/ads7846.c:208: warning: implicit declaration of function `enable_irq'Cc: Dmitry Torokhov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In file included from drivers/char/tpm/tpm_nsc.c:23:
drivers/char/tpm/tpm.h: In function `tpm_read_index':
drivers/char/tpm/tpm.h:92: warning: implicit declaration of function `outb'
drivers/char/tpm/tpm.h:93: warning: implicit declaration of function `inb'Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This adds missing bits of collie (sharp sl-5500) PCMCIA support and
MFD support.Signed-off-by: Pavel Machek
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In frontlight support, we should really use values from flash-ROM instead
of hardcoding our own. Cleanup includes.Signed-off-by: Pavel Machek
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
It's already big enough and there's no reason to list maintainers of
external patches.Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The /dev/mem and /dev/kmem write handlers weren't fully POSIX compliant in
that they wouldn't always force the file pointer to be updated when
returning success status.The /dev/port write handler was inconsistent with the /dev/mem and
/dev/kmem handlers in that when encountering a -EFAULT condition after
already having written a number of items it would return -EFAULT rather
than the number of bytes written.Signed-off-by: Jan Beulich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When SMBFS_DEBUG_VERBOSE is #define-d, the compile breaks:
fs/smbfs/inode.c:217: error: aggregate value used where an integer was expected
This is a simple matter of using the .tv_sec attribute of struct time_spec.
Signed-off-by: Kirk True
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix documentation to match current implementation.
Signed-off-by: Eric Van Hensbergen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
There were a number of conflicting naming schemes used in the v9fs project.
The directory was fs/9p, but MAINTAINERS and Documentation referred to
v9fs. The module name itself was 9p2000, and the file system type was 9P.
This patch attempts to clean that up, changing all references to 9p in
order to match the directory name. We'll also start using 9p instead of
v9fs as our patch prefix.There is also a minor consistency cleanup in the options changing the name
option to uname in order to more closely match the Plan 9 options.Signed-off-by: Eric Van Hensbergevan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Update license boilerplate to specify GPLv2 and remove the (at your option
clause). This change was agreed to by all the copyright holders (approvals
can be found on v9fs-developer mailing list).Signed-off-by: Eric Van Hensbergen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
__getname, which in turn will call kmem_cache_alloc, may return NULL.
Coverity bug #977
Signed-off-by: Eugene Teo
Signed-off-by: Eric Van Hensbergen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Implement a new way of creating special files. Instead of Tcreate+Twstat,
add one more field to Tcreate that contains special file description.Signed-off-by: Latchesar Ionkov
Signed-off-by: Eric Van Hensbergen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Print 9p messages.
Signed-off-by: Latchesar Ionkov
Cc: Eric Van Hensbergen
Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The code talks about these things called tids, which I eventually figured
out are tags.Signed-off-by: Eric Van Hensbergen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Here is a new trans_fd.c that replaces the current trans_fd.c and
trans_sock.c.Signed-off-by: Eric Van Hensbergen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The Kconfig text for CONFIG_DEBUG_SLAB and CONFIG_DEBUG_PAGEALLOC have always
seemed a bit confusing. Change them to:CONFIG_DEBUG_SLAB: "Debug slab memory allocations"
CONFIG_DEBUG_PAGEALLOC: "Debug page memory allocations"Cc: "David S. Miller"
Cc: Hirokazu Takata
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove the assumption that driver_register() returns the number of devices
bound to the driver. In fact, it returns zero for success or a negative
error value.zorro_module_init() used the device count to automatically unregister and
unload drivers that found no devices. That might have worked at one time,
but has been broken for some time because zorro_register_driver() returned
either a negative error or a positive count (never zero). So it could only
unregister on failure, when it's not needed anyway.This functionality could be resurrected in individual drivers by counting
devices in their .probe() methods.Signed-off-by: Bjorn Helgaas
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove the assumption that driver_register() returns the number of devices
bound to the driver. In fact, it returns zero for success or a negative
error value.Signed-off-by: Bjorn Helgaas
Acked-by: Jeff Garzik
Acked-by: Marc Zyngier
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove the assumption that driver_register() returns the number of devices
bound to the driver. In fact, it returns zero for success or a negative
error value.dio_module_init() used the device count to automatically unregister and
unload drivers that found no devices. That might have worked at one time,
but has been broken for some time because dio_register_driver() returned
either a negative error or a positive count (never zero). So it could only
unregister on failure, when it's not needed anyway.This functionality could be resurrected in individual drivers by counting
devices in their .probe() methods.Signed-off-by: Bjorn Helgaas
Cc: Philip Blundell
Cc: Jochen Friedrich
Cc: "Antonino A. Daplas"
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use the new balance_dirty_pages_ratelimited_nr in reiserfs "largeio" file
write.Signed-off-by: Hans Reiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We presently ignore the return values from initcalls. But that can carry
useful debugging information. So print it out if it's non-zero.It turns out the -ENODEV happens quite a lot, due to built-in drivers which
have no hardware to drive. So suppress that unless initcall_debug was
specified.Also make the warning message more friendly by printing the name of the
initcall function.Also drop the KERN_DEBUG from the initcall_debug message. If we specified
inticall_debug then we obviously want to see the messages.Acked-by: Paul Jackson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Clean up several places where gcc issues warnings when -W is specified.
Thanks to Neil for finding that.Signed-off-by: Vladimir V. Saveliev
Cc: Neil Brown
Signed-off-by: Hans Reiser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Today I wondered about /dev/parport after not seeing anything in
drivers/parport register char-major-99. Having PP_MAJOR in
include/linux/major.h would've allowed me to more quickly determine that it
was the ppdev driver driving these.Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In latest -mm a number of section mismatch warnings are generated for
floppy.o like the following:WARNING: drivers/block/floppy.o - Section mismatch: reference to \
.init.data: from .text between 'init_module' (at offset 0x6976) and \
'cleanup_module'The warning are caused by a reference to floppy_init() which is __init from
init_module() which is not declared __init. Declaring init_module() _init
fixes this.Signed-off-by: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In latest -mm ide-code.o gave a number of warnings like the following:
WARNING: drivers/ide/ide-core.o - Section mismatch: reference to \
.init.text: from .text between 'init_module' (at offset 0x1f97) and \
'cleanup_module'The warning was caused by init_module() calling parse_option() and
ide_init() both declared __init.Declaring init_module() __init fixes the warnings.
Signed-off-by: Sam Ravnborg
Cc: Bartlomiej Zolnierkiewicz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Previous inotify work avoidance is good when inotify is completely unused,
but it breaks down if even a single watch is in place anywhere in the
system. Robin Holt notices that udev is one such culprit - it slows down a
512-thread application on a 512 CPU system from 6 seconds to 22 minutes.Solve this by adding a flag in the dentry that tells inotify whether or not
its parent inode has a watch on it. Event queueing to parent will skip
taking locks if this flag is cleared. Setting and clearing of this flag on
all child dentries versus event delivery: this is no in terms of race
cases, and that was shown to be equivalent to always performing the check.The essential behaviour is that activity occuring _after_ a watch has been
added and _before_ it has been removed, will generate events.Signed-off-by: Nick Piggin
Cc: Robert Love
Cc: John McCutchan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds