Dave Jones [Tue, 19 Feb 2002 09:22:48 +0000 (01:22 -0800)]
[PATCH] LVM fixes.
Numerous LVM fixes & cleanups.
Gets things compiling again, and allegedly works according to feedback.
Mostly from Anders in absence of any maintainence by LVM people.
There are two critical problems with lvm in 2.5.2-pre11 (and earlier).
* ioctls on the chardev allocates a >4k lv_t on stack. if the ioctl is
LV_CREATE, LV_EXTEND, LV_REDUCE or LV_RENAME data is copied into this
and the task_struct will most certainly be corrupted.
* sizeof(lv_t) differs between user and kernelspace. The userspace version
of the lv_t structure is much smaller than the kernelspace version. This
leads to corruption of memory in the userspace application when an lv_t is
copied from kernelspace to userspace, as in "vgdisplay -v"
The following patch addresses these two issues. It puts the user-space
version of the lv_t into a substructure of the kernelspace version. When
communicating to userspace just the userlv_t part is used. This avoids the
allocation of the lv_t on the stack by allocation just a userlv_t instead.
Martin Dalecki [Tue, 19 Feb 2002 09:20:06 +0000 (01:20 -0800)]
[PATCH] 2.5.5-pre1 IDE cleanup 9
1. Kill the ide-probe-mod by merging it with ide-mod. There is *really*
no reaons for having this stuff split up into two different
modules unless you wan't to create artificial module dependancies
and waste space of page boundaries during memmory allocation for the
modules
2. Kill the ide_module_t - which is unnecessary and presents a
"reimplementation" of module handling inside the ide driver. This
is achieved by attaching the initialization routine ot the
ide_driver_t, which will be gone next time, since there is no sane
reason apparently, which this couldn't be done during the
module-generic initialization of the corresponding driver module.
3. Kill unnecessary tagging of "subdriver" with IDE_SUBDRIVER_VERSION -
we have plenty of other mechanisms for module consistency checking.
And anyway the ide code didn't any consistence checks on this value
at all.
NOTE: The ide_(un)register_module() functions will be killed in next round.
Jaroslav Kysela [Tue, 19 Feb 2002 06:35:21 +0000 (22:35 -0800)]
[PATCH] ALSA update for 2.5.5-pre1
this is a sync with the current ALSA CVS tree (last code
modification: (Sun Feb 17 17:46:41 2002 UTC)) and 2.5.5-pre1 code and
contains:
- ALSA code version 0.9.0beta11
- Config.in files updated (separated associated drivers to submenus)
- global sound/Makefile fixes
- added inclusion of missing header files for alpha architecture
- fixed power functions (bad locking)
- fixed copy_to_user calls (removed them from spinlocks)
- fixed freeing of resource structures
- fixed AD1816A driver (inverted volume controls)
- added new functions to allocate ISA DMA memory (cleanups in ISA drivers)
- updated ISA PnP detection in wavefront driver
- added joystick support for VIA686
- updated ES1968 (Maestro2) driver
- moved joystick support for YMFPCI to the control interface
- updated Korg1212 driver
Petr Vandrovec [Tue, 19 Feb 2002 05:56:37 +0000 (21:56 -0800)]
[PATCH] (1/3) matroxfb for 2.5.3
(1) Updates documentation.
(2) Remove 'current' and 'previous' hardware fields. X just do not play fair,
and one cannot assume anything about current hardware state.
(3) Changes algorithm for computing PLL parameters to one used by Matrox. On
recent chips (G550) there are no limits for PLL, you just have to try
couple of possible combinations to find which one works on this
particualr hardware.
(4) Add code which can intialize G450/G550 when BIOS did not initalize it
(non-ia32 hardware, secondary devices on ia32 hardware).
Petr Vandrovec [Tue, 19 Feb 2002 05:52:33 +0000 (21:52 -0800)]
[PATCH] 2.5.5-pre1: uninitialized SO_PASSCRED on sockets
* move socket clearing code from sock_alloc to sock_alloc_inode, so
root of socketfs does not contain garbage, and we have all initialization
in one place
* add initialization of passcred to zero - otherwise it is left on some
random value, causing at least autobind() to randomly fail on
unix sockets
Rik van Riel [Tue, 19 Feb 2002 03:52:54 +0000 (19:52 -0800)]
[PATCH] new struct page shrinkage
The patch has been changed like you wanted, with page->zone
shoved into page->flags. I've also pulled the thing up to
your latest changes from linux.bkbits.net so you should be
able to just pull it into your tree from:
Martin Dalecki [Mon, 18 Feb 2002 01:05:04 +0000 (17:05 -0800)]
[PATCH] Re: IDE cleanup for 2.5.4-pre3
The end_request() function familiy (not the global one, but the IDE
specific ones), did bear a permuted parameter ordering. After fixing
this it turned out that at all places the huk parameter wasn't the
hwgroup, but just the drive in question itself. I have changed this to
be more sane, which allowed to remove many unneccessary code
duplication, or rather obfuscation, in between the __ide_end_request()
and ide_end_request() functions. This simplification is actually the
"spreading" part of the game.
Andrew Morton [Mon, 18 Feb 2002 01:01:56 +0000 (17:01 -0800)]
[PATCH] ENOSPC correctness
A forward-port. This is the code which prevents ENOSPC
errors from exposing stale data within filesystems.
- in generic_file_write(), if prepare_write() fails, truncate
the file to drop any part-added blocks.
- in __block_write_full_page(), if we hit an error, push
whatever buffers we _have_ mapped into the file out to disk.
- in __block_prepare_write(), if we hit an error, zero out
any blocks which we did manage to map into the file. This
is because the caller won't be doing any writing to those
blocks due to the error.
Andrew Morton [Mon, 18 Feb 2002 01:01:52 +0000 (17:01 -0800)]
[PATCH] msync correctness
A forward port. At present, msync() does not report errors
from EIO or ENOSPC. fsync() has the same bug for mapped pages
against the affected fd.
The patch correctly propagates these errors back up from
writepage so that fsync and msync correctly report errors.
It's fairly important - msync is the only way we have
of reporting ENOSPC against sparse mappings.
Of course, you can still silently lose your data if it's kswapd who
gets ENOSPC during writepage. I have 3/4 of a patch for that. It
records the data loss so that a later msync() will report the bad
news.
This patch also adds an implementation of msync(MS_ASYNC), because
it was easy.
Andrew Morton [Mon, 18 Feb 2002 01:01:48 +0000 (17:01 -0800)]
[PATCH] IS_SYNC diretory handling
A forward-port. ext2, minix and sysv aren't handling directories
correctly when IS_SYNC is in place. They call waitfor_one_page(),
but forgot to start the I/O.
The patch also moves waitfor_one_page and writeout_one_page
into fs/buffer.c, so mm/filemap.c now does not mention buffer_head
at all.
Andrew Morton [Mon, 18 Feb 2002 00:44:37 +0000 (16:44 -0800)]
[PATCH] BUG register preservation
Here's the x86 BUG() implementation we discussed the other day.
I also have the rework of the header files which avoids
instantiation of strings in headers and saves 100-200k.
However that is only needed for gcc 2.X. I assume that
by the time 2.6 is in use, gcc-3.x will be the preferred
compiler.
move nfsd_init into an initcall with other module
startup. This means that "initialized" isn't needed for
any of the files that use it, as the bits are always initialised if
in use.
1/ add an "owner" field to the nfsd_linkage structure
2/ grab a reference to that module before calling the syscall
3/ Remove the reference counting from inside the module
4/ Always allow nfsd module to be called, even if compile with
CONFIG_NFSD == N
( but not if CONFIG_MODULES also == N)
1/ changes to sys_fsync had not also been made to nfsd_sync.
Now nfsd_sync calls filemap_fdatasync and filemap_fdatawait.
2/ change nfsd_readdir to use vfs_readdir instead of i_op->readdir
Neil Brown [Mon, 18 Feb 2002 00:40:02 +0000 (16:40 -0800)]
[PATCH] PATCH 3/7: knfsd cleanups - incorrect use of inode_change_ok
Get nfsd_setattr to not put too much weight on inode_change_ok
nfsd_currently calls inode_change_ok and does not try setattr if this fails.
However this is wrong. If a filesystem defines it's own i_op->setattr, then
it might use a completely different mechanisim for determining what is ok.
nfsd shouldn't assume...
We still use inode_change_ok when normalising NFSv2 "touch" requests, but
only in passing.
the fh_to_dentry routines should never return NULL.
The caller expects an ERR_PTR or a valid (possibly negative)
dentry. fat did the wrong thing and so could oops.
Neil Brown [Mon, 18 Feb 2002 00:39:53 +0000 (16:39 -0800)]
[PATCH] PATCH 1/7: knfsd cleanups - big fixes
Fix bugs recently introduced into kNFSd
When searching a list.h list, we cannot export
to find NULL at the end. Instead we return a pointer
when found, or NULL if nothing found. Same bug, 4 times.
The seq_file improvements to /proc/fs/nfs/exports got the counting
wrong so that some clients would get reported twice, always the last.
Alexander Viro [Mon, 18 Feb 2002 00:35:06 +0000 (16:35 -0800)]
[PATCH] dnotify race fix
A bunch of places dereferences ->d_parent->d_inode with no
protection whatsoever (e.g. on return from read()). It's an
SMP race on all boxen and pretty wide UP race if we have dnotify
set on parent (race between read() and rename() and similar beasts).
Patch below is the first one in a series of ->d_parent-related
fixes. It adds a helper (dnotify_parent(dentry, event)) and converts
places that did inode_dir_notify(dentry->d_parent->d_inode,...) to it.
Please, apply. Notice that problem exists in 2.4 and unlike 2.5
there we can't switch to saner API (basically, reporting file events on
file, not on a parent directory).
Some of the further fixes depend on Pat's and Greg's (driverfs and usbdevfs
resp.) patches, so getting them merged would make life easier. And yes,
some of further chunks (e.g. smbfs ->revalidate() and friends) will also
have to go into 2.4 - they are independent from any threading projects ;-/
J. A. Magallon [Thu, 14 Feb 2002 09:33:14 +0000 (01:33 -0800)]
[PATCH] pid allocator bugfix
This patch fixes a bug in the Linux process ID allocator. It isn't quite
SMP safe since it references "last_pid" after releasing the lock protecting
it. This can result in two processes getting assigned the same process ID.
Nathan Scott [Wed, 13 Feb 2002 13:45:51 +0000 (05:45 -0800)]
[PATCH] xattr updates (minor, 4/4)
This final patch is a simple documentation fixup patch filling
in the blanks for the extended attribute interfaces; and fixes
a typo in the same spot: "permission".
Nathan Scott [Wed, 13 Feb 2002 13:45:45 +0000 (05:45 -0800)]
[PATCH] xattr updates (minor, 3/4)
This next incremental patch tidies up the data types passed back
from the `list' and `get' extended attribute syscalls - these now
match the design (ie. using ssize_t) rather than simply using long
or int everywhere; also now use const types in the VFS interface,
where appropriate.
Nathan Scott [Wed, 13 Feb 2002 13:45:40 +0000 (05:45 -0800)]
[PATCH] xattr updates (minor, 2/4)
This incremental patch fixes copying out of an extended attribute
value or name list. Previously we copied out the entire buffer
passed in from userspace, now we only copy out the size which the
underlying filesystem tells us to (ie. we will no longer include
potentialy-initialised data as well).
Nathan Scott [Wed, 13 Feb 2002 13:45:35 +0000 (05:45 -0800)]
[PATCH] xattr updates (minor, 1/4)
This first patch fixes the copying in of extended attribute
names from userspace in the extended attribute syscalls (a
problem found when using electric fence on the user tools).