Commit Graph

2077 Commits

Author SHA1 Message Date
Al Viro d671d5e514 [PATCH] namei fixes (8/19)
In open_namei() we never use path.mnt or path.dentry after exit: or ok:.
Assignment of path.dentry in case of LAST_BIND is dead code and only
obfuscates already convoluted function; assignment of path.mnt after
__do_follow_link() can be moved down to the place where we set path.dentry.

Obviously equivalent transformations, just to clean the air a bit in that
region.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:25 -07:00
Al Viro cd4e91d3bc [PATCH] namei fixes (7/19)
The first argument of __do_follow_link() switched to struct path *
(__do_follow_link(path->dentry, ...) -> __do_follow_link(path, ...)).

All callers have the same calls of mntget() right before and dput()/mntput()
right after __do_follow_link(); these calls have been moved inside.

Obviously equivalent transformations.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:25 -07:00
Al Viro 839d9f93c9 [PATCH] namei fixes (6/19)
mntget(path->mnt) in do_follow_link() moved down to right before the
__do_follow_link() call and rigth after loop: resp.

dput()+mntput() on non-ELOOP branch moved up to right after __do_follow_link()
call.

resulting
loop:
	mntget(path->mnt);
	path_release(nd);
	dput(path->mnt);
	mntput(path->mnt);
replaced with equivalent
	dput(path->mnt);
	path_release(nd);

Equivalent transformations - the reason why we have that mntget() is that
__do_follow_link() can drop a reference to nd->mnt and that's what holds
path->mnt.  So that call can happen at any point prior to __do_follow_link()
touching nd->mnt.  The rest is obvious.

NOTE: current tree relies on symlinks *never* being mounted on anything.  It's
not hard to get rid of that assumption (actually, that will come for free
later in the series).  For now we are just not making the situation worse than
it is.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:25 -07:00
Al Viro 1be4a0900b [PATCH] namei fixes (5/19)
fix for too early mntput() in open_namei() - we pin path.mnt down for the
duration of __do_follow_link().  Otherwise we could get the fs where our
symlink lived unmounted while we were in __do_follow_link().  That would end
up with dentry of symlink staying pinned down through the fs shutdown.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:24 -07:00
Al Viro d73ffe16b8 [PATCH] namei fixes (4/19)
path.mnt in open_namei() set to mirror nd->mnt.

nd->mnt is set in 3 places in that function - path_lookup() in the beginning,
__follow_down() loop after do_last: and __do_follow_link() call after
do_link:.

We set path.mnt to nd->mnt after path_lookup() and __do_follow_link().  In
__follow_down() loop we use &path.mnt instead of &nd->mnt and set nd->mnt to
path.mnt immediately after that loop.

Obviously equivalent transformation.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:24 -07:00
Al Viro 4e7506e4dd [PATCH] namei fixes (3/19)
Replaced struct dentry *dentry in namei with struct path path.  All uses of
dentry replaced with path.dentry there.

Obviously equivalent transformation.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:24 -07:00
Al Viro 5f92b3bcec [PATCH] namei fixes (2/19)
All callers of do_follow_link() do mntget() right before it and
dput()+mntput() right after.  These calls are moved inside do_follow_link()
now.

Obviously equivalent transformation.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:24 -07:00
Al Viro 90ebe5654f [PATCH] namei fixes
OK, here comes a patch series that hopefully should close all
too-early-mntput() races in fs/namei.c.  Entire area is convoluted as hell, so
I'm splitting that series into _very_ small chunks.

Patches alread in the tree close only (very wide) races in following symlinks
(see "busy inodes after umount" thread some time ago).  Unfortunately, quite a
few narrower races of the same nature were not closed.  Hopefully this should
take care of all of them.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:24 -07:00
Kumar Gala 4481e8eea7 [PATCH] ppc32: Fix incorrect CPU_FTR fixup usage for unified caches
Runtime feature support for unified caches was testing a userland feature
flag (PPC_FEATURE_UNIFIED_CACHE) instead of a cpu feature flag
(CPU_FTR_SPLIT_ID_CACHE).  Luckily the current defined bit mask for cpu
features and userland features do not overlap so this only causes an issue
on machines with a unified cache, which is extremely rare on PPC today.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:23 -07:00
Yoshinori Sato 8e2894e51d [PATCH] h8300 build error fix
h8300 was missing a few definitions.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:23 -07:00
Denis Vlasenko 3399ba5b70 [PATCH] moxa: do not ignore input
Stop using tty internal structure in mxser_receive_chars(), use
tty_insert_flip_char(tty, ch flag); instead.

Without this change driver ignores any rx'ed chars.

Run tested.

Cc: Alan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:23 -07:00
Martin Schwidefsky a511718168 [PATCH] broken fault_in_pages_readable call in generic_file_buffered_write()
fault_in_pages_readable() is being passed an incorrect `end' address, which
can result in writes accidentally faulting in pages which will not be affected
by the write() call.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 14:42:23 -07:00
Steve French 0b68177ccd Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-06-06 09:57:33 -07:00
Linus Torvalds 7cef5677ef Linux 2.6.12-rc6
Getting ready for the real release..
2005-06-06 08:22:29 -07:00
Yoichi Yuasa eae936e21b [PATCH] serial: update NEC VR4100 series serial support
- Changed the return value of unknown type to NULL.

- Deleted the NULL check of dev_id in siu_interrupt().

- Deleted the NULL check of port->membase in siu_shutdown().

- Added the NULL check of port->membase to siu_startup().

- Removed early_uart_ops. Now using vr41xx_siu standerd one.

- Changed KSEG1ADDR() in siu_console_setup() to ioremap().

- When uart_add_one_port() failed, changed to set NULL to port->dev.

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-04 17:13:01 -07:00
Gerald Schaefer f26d583e41 [PATCH] s390: deadlock in appldata
The system might hang when using appldata_mem with high I/O traffic and a
large number of devices.  The spinlocks bdev_lock and swaplock are acquired
via calls to si_meminfo() and si_swapinfo() from a tasklet, i.e.  interrupt
context, which can lead to a deadlock.  Replace tasklet with work queue.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-04 17:13:00 -07:00
Martin Schwidefsky 595bf2aaca [PATCH] s390: in_interrupt vs. in_atomic
The condition for no context in do_exception checks for hard and soft
interrupts by using in_interrupt() but not for preemption.  This is bad for
the users of __copy_from/to_user_inatomic because the fault handler might call
schedule although the preemption count is != 0.  Use in_atomic() instead
in_interrupt().

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-04 17:13:00 -07:00
Bodo Stroesser c5c3a6d8fe [PATCH] s390: uml ptrace fixes
To make UML build and run on s390, I needed to do these two little
changes:

1) UML includes some of the subarch's (s390) headers. I had to
   change one of them with the following one-liner, to make this
   compile. AFAICS, this change doesn't break compilation of s390
   itself.

2) UML needs to intercept syscalls via ptrace to invalidate the syscall,
   read syscall's parameters and write the result with the result of
   UML's syscall processing. Also, UML needs to make sure, that the host
   does no syscall restart processing. On i386 for example, this can be
   done by writing -1 to orig_eax on the 2nd syscall interception
   (orig_eax is the syscall number, which after the interception is used
   as a "interrupt was a syscall" flag only.
   Unfortunately, s390 holds syscall number and syscall result in gpr2 and
   its "interrupt was a syscall" flag (trap) is unreachable via ptrace.
   So I changed the host to set trap to -1, if the syscall number is changed
   to an invalid value on the first syscall interception.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-04 17:13:00 -07:00
Martin Schwidefsky 778959db97 [PATCH] s390: ptrace peek and poke
The special cases of peek and poke on acrs[15] and the fpc register are not
handled correctly.  A poke on acrs[15] will clobber the 4 bytes after the
access registers in the thread_info structure.  That happens to be the kernel
stack pointer.  A poke on the fpc with an invalid value is not caught by the
validity check.  On the next context switch the broken fpc value will cause a
program check in the kernel.  Improving the checks in peek and poke fixes
this.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-04 17:13:00 -07:00
Qu Fuping 854715be73 [PATCH] mpage_end_io_write() I/O error handling fix
When fsync() runs wait_on_page_writeback_range() it only inspects pages which
are actually under I/O (PAGECACHE_TAG_WRITEBACK).  If a page completed I/O
prior to wait_on_page_writeback_range() looking at it, it is supposed to have
recorded its I/O error state in the address_space.

But mpage_mpage_end_io_write() forgot to set the address_space error flag in
this case.

Signed-off-by: Qu Fuping <fs@ercist.iscas.ac.cn>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-04 17:12:59 -07:00
2089a0d38b Automatic merge of /spare/repo/netdev-2.6 branch skge 2005-06-04 17:54:39 -04:00
03d661d3d7 Automatic merge of /spare/repo/netdev-2.6 branch starfire 2005-06-04 17:19:42 -04:00
1a9505996d Automatic merge of /spare/repo/netdev-2.6 branch smc91x 2005-06-04 17:15:04 -04:00
bdb7a3427b Automatic merge of /spare/repo/netdev-2.6 branch remove-drivers 2005-06-04 17:12:32 -04:00
140fedb5f2 Automatic merge of /spare/repo/netdev-2.6 branch iff-running 2005-06-04 17:11:28 -04:00
91bcc018f9 Automatic merge of /spare/repo/netdev-2.6 branch we18 2005-06-04 17:08:24 -04:00
105adfc63f Automatic merge of /spare/repo/netdev-2.6 branch viro 2005-06-04 17:07:40 -04:00
7f6a57a907 Automatic merge of /spare/repo/netdev-2.6 branch r8169 2005-06-04 17:06:57 -04:00
4d8e11dcc2 Automatic merge of /spare/repo/netdev-2.6 branch orinoco-hch 2005-06-04 17:05:05 -04:00
21035ffeb7 Automatic merge of /spare/repo/netdev-2.6 branch ppp 2005-06-04 17:03:55 -04:00
14d8ce70d5 Automatic merge of /spare/repo/netdev-2.6 branch hdlc 2005-06-04 17:03:09 -04:00
79121839aa Automatic merge of /spare/repo/netdev-2.6 branch dm9000 2005-06-04 17:02:29 -04:00
b00b2f70dd Automatic merge of /spare/repo/netdev-2.6 branch 8139too-iomap 2005-06-04 17:01:45 -04:00
df77cc44dc Automatic merge of /spare/repo/netdev-2.6 branch 8139cp 2005-06-04 17:01:33 -04:00
Linus Torvalds d304506405 Automatic merge of 'misc-fixes' branch from
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2005-06-04 08:18:39 -07:00
910313aa1d Automatic merge of /spare/repo/netdev-2.6 branch r8169-fix 2005-06-04 04:31:44 -04:00
Jeff Garzik a0ea7328e3 [libata] ahci: finish ATAPI support (hopefully) 2005-06-04 01:13:15 -04:00
70c8523381 Merge of /spare/repo/libata-dev branch bridge-detect 2005-06-04 01:02:00 -04:00
31c94a6e98 Automatic merge of /spare/repo/libata-dev branch svw 2005-06-04 00:59:09 -04:00
1700c80d87 Merge of /spare/repo/libata-dev branch pdc20619 2005-06-04 00:58:52 -04:00
d3c39d14d1 Automatic merge of /spare/repo/libata-dev branch ahci-msi 2005-06-04 00:52:59 -04:00
Jeff Garzik 4b0060f4bd [libata] ahci: minor PCI MSI cleanup
Replace 'have_msi' variable with a bit in the existing 'flags' variable,.
AHCI_FLAG_MSI.
2005-06-04 00:50:22 -04:00
ae20ea8525 Automatic merge of /spare/repo/linux-2.6/.git branch HEAD 2005-06-04 00:40:40 -04:00
73561695b2 Automatic merge of /spare/repo/linux-2.6/.git branch HEAD 2005-06-03 23:54:56 -04:00
Deepak Saxena 17d82fcc6a [PATCH] ARM: 2700/1: Disable IXP2000 IRQs at bootup
Patch from Deepak Saxena

The IXDP2800 bootloader does not disable IRQs before jumping into
the kernel and this is causing the Grand Unified KGDB to crash
the system when we do an early call to trap_init() and irq handlers
have not yet been registered. This patch disables IRQs before we
jump into the kernel.

Signed-off-by: Deepak Saxena
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-06-03 22:18:52 +01:00
Nathan Lynch 8be3de3fd8 [PATCH] prom_find_machine_type typo breaks pSeries lpar boot
A typo in prom_find_machine_type from Ben's recent patch "ppc64: Fix
result code handling in prom_init" prevents pSeries LPAR systems from
booting.

Tested on a pSeries 570 and OpenPower 720 (both Power5 LPAR).

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-03 13:20:04 -07:00
Todd Poynor 8775420d2f [PATCH] ARM: 2691/1: PXA27x sleep fixes take 2
Patch from Todd Poynor

PXA27x sleep fixes:
* set additional sleep/wakeup registers for Mainstone boards.
* move CKEN=0 to pxa25x-specific code; that value is harmful on pxa27x.
* save/restore additional registers, including some found necessary for
C5 processors and/or newer blob versions.
* enable future support of additional sleep modes for PXA27x (eg,
standby, deep sleep).
* split off cpu-specific sleep processing between pxa27x and pxa25x into
separate files (partly in preparation for additional sleep modes).
Includes fixes from David Burrage.

Signed-off-by: Todd Poynor
Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-06-03 20:52:27 +01:00
Mike Frysinger 718a30a5cf [PATCH] ARM: 2696/1: remove ';' in ELF_DATA define in asm-arm{,26}/elf.h
Patch from Mike Frysinger

the ELF_DATA define in both arm asm subdirs of linux/include/ contain a
semicolon at the end.  this of course will cause any code that tries to use
ELF_DATA in assignment or comparison to fail.  no other arch has a semicolon
in their ELF_DATA defines.

Signed-off-by: Mike Frysinger
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-06-03 20:52:26 +01:00
Albrecht Dre 105bb2698b [PATCH] ARM: 2694/1: [s3c2410/dma] release irq properly to fix kernel oops
Patch from Albrecht Dre

Problem:
When a module requests a DMA channel via the function s3c2410_dma_request(), this function requests the appropriate irq under the name of the client module. When the client module is unloaded, it calls s3c2410_dma_free() which does not free the irq. Consequently, when e.g. running "cat /proc/interrupts", the irq owner points to freed memory, leading to a kernel oops.
File:
linux/arch/arm/mach-s3c2410/dma.c
Fix:
trivial, below

Signed-off-by: Albrecht Dre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-06-03 20:52:26 +01:00
Deepak Saxena 4ab5c01c7c [PATCH] ARM: 2692/1: Fix compile warnings in include/asm-arm/arch-ixp2000/io.h
Patch from Deepak Saxena

This patch fixes the following warnings:
include/asm/arch/io.h: In function `insw':
include/asm/arch/io.h:78: warning: comparison of distinct pointer types
lacks acast
include/asm/arch/io.h:79: warning: comparison of distinct pointer types
lacks acast
include/asm/arch/io.h: In function `outsw':
include/asm/arch/io.h:103: warning: comparison of distinct pointer types
lacks a cast
include/asm/arch/io.h:104: warning: comparison of distinct pointer types
lacks a cast
include/asm/arch/io.h: In function `inw':
include/asm/arch/io.h:127: warning: comparison of distinct pointer types
lacks a cast

Signed-off-by: Deepak Saxena
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-06-03 20:52:25 +01:00