Kyle McMartin [Sat, 16 Aug 2003 00:36:53 +0000 (17:36 -0700)]
[IPSEC]: Add support for Twofish and Serpent.
This patch adds support for the use of twofish and serpent as
ESP algorithms. The ESP index numbers given are in accordance
with RFC2407, draft-ietf-ipsec-ciph-aes-cbc-00 (before Rijndael
was selected), and KAME which assigns 253 to twofishcbc.
Support for using twofish was requested on linux-kernel, and
since I noticed serpent was missing too, included that as well.
Driver Core: add warnings if .release functions are not set for objects.
This has been in the -mm tree for a while and has helped a lot in finding
lots of improper users of the driver core. It also moves the driver core
code up quite a few levels on the "Rusty's guide to kernel APIs".
David Brownell [Fri, 15 Aug 2003 03:01:55 +0000 (20:01 -0700)]
[PATCH] USB: usb_start_wait_urb() rewrite
The code that manges the synchronous control/bulk calls has
been a mess for ages. This patch rewrites it using:
- "struct completion" instead of a usb-internal clone therof,
- prepare_to_wait()/finish_wait() instead of the tangled
mess it now uses (or a new wait_event_timeout call, as in
previous versions of this patch).
Dave Jones [Fri, 15 Aug 2003 15:31:32 +0000 (16:31 +0100)]
[AGPGART] Move ATI PCI IDs to pci_ids.h
- sort some of the ATI entries. (note, there are dupes in there
that could be fixed up at some point).
- Rename PCI_DEVICE_ID_RADEON_IGP to ATI_RS100.
RadeonIGP is the family, not the specific chip.
Andrew Morton [Thu, 14 Aug 2003 18:31:12 +0000 (11:31 -0700)]
[PATCH] AS: update as_requeue_request()
- Ensure that arq->state is always set (ie. even if io context
allocation failed).
- Call as_antic_stop() unconditionally - which checks for the same
condition. There are other callers which make the same check and should
be changed too...
Ingo Molnar [Thu, 14 Aug 2003 18:26:03 +0000 (11:26 -0700)]
[PATCH] More timer race fixes
Patch from Julie DeWandel.
This patch has solved the crashes observed during TPC-C runs on the
16-way box. (I'm confident it will fix the other reported cases as
well.)
The race is the setting of timer->base to NULL, by del_timer() or
__run_timers(). If new_base == old_base in __mod_timer() then we do not
re-check timer->base after getting the lock. (the only case where we do
not have to re-check the base is in the !old_base case, but the else
branch also includes the old_base==new_base case.)
The __run_timers() case made the lock_timer() patch not work fully - we
cannot use lock_timer() in __run_timers() due to lock ordering.
Andrew Morton [Thu, 14 Aug 2003 17:25:29 +0000 (10:25 -0700)]
[PATCH] SELinux inode security init
From: Stephen Smalley <sds@epoch.ncsc.mil>
This patch reworks the SELinux module code that handles inodes initialized
before the policy is initially loaded to also cover the case where a pseudo
filesystem such as selinuxfs or nfsd directly populate themselves.
The list of inode security structures is split into per-superblock lists
associated with each superblock security structure, and the initialization
is performed by superblock_doinit.
Andrew Morton [Thu, 14 Aug 2003 17:25:14 +0000 (10:25 -0700)]
[PATCH] Docbook: Make mandocs output more terse
From: Michael Still <mikal@stillhq.com>
This patch takes into account requests from various LKML members for the
mandocs output to be more terse. Information about the copyright, and
formatting of the man page is moved into a comment at the start of the
groff output.
Sample output can be found at:
http://www.stillhq.com/linux/mandocs/2.6.0-test3-bk1/
Andrew Morton [Thu, 14 Aug 2003 17:24:59 +0000 (10:24 -0700)]
[PATCH] Use mark_page_accessed() in follow_page()
Touching a page via follow_page() counts as a reference so we should be
either setting the referenced bit in the pte or running mark_page_accessed().
Altering the pte is tricky because we haven't implemented an atomic
pte_mkyoung(). And mark_page_accessed() is better anyway because it has more
aging state: it can move the page onto the active list.
Andrew Morton [Thu, 14 Aug 2003 17:24:35 +0000 (10:24 -0700)]
[PATCH] bugfix for initialization bug in adm1021 driver
From: Rusty Lynch <rusty@linux.co.intel.com>
While initializing the adm1021 device, the driver is performing a conversion
from fixed point to Celcius on values that were declaired as Celcius. On my
Dell Precision 220 this results in a shutdown after a couple of minutes
running.
Andrew Morton [Thu, 14 Aug 2003 17:24:28 +0000 (10:24 -0700)]
[PATCH] Better argument size tracking in fs/exec.c
From: Matthew Wilcox <willy@debian.org>
Introduce a new variable "arg_size" and set it appropriately in each arm of
the CONFIG_STACK_GROWSUP. This patch fixes a bug for PA-RISC and makes the
code cleaner for everyone.
Andrew Morton [Thu, 14 Aug 2003 17:23:58 +0000 (10:23 -0700)]
[PATCH] Make 16-way x440's boot
From: Matthew Dobson <colpatch@us.ibm.com>
16 proc x440 boxen aren't booting mainline kernels right now for many valid
configs. This patch makes sure NUMA codepaths aren't executed for SMP
configs. It also adds some sane error messages to the code, and cleans up
some #ifdefs.
Andrew Morton [Thu, 14 Aug 2003 17:23:22 +0000 (10:23 -0700)]
[PATCH] ipmi_kcs_intf.c compile warning
From: Zwane Mwaikambo <zwane@linuxpower.ca>
drivers/char/ipmi/ipmi_kcs_intf.c: In function `acpi_find_bmc':
drivers/char/ipmi/ipmi_kcs_intf.c:1088: warning: long unsigned int format, different type arg (arg 2)
drivers/char/ipmi/ipmi_kcs_intf.c:1088: warning: long unsigned int format, different type arg (arg 2)
Andrew Morton [Thu, 14 Aug 2003 17:23:06 +0000 (10:23 -0700)]
[PATCH] keyboard.c warning fix
drivers/char/keyboard.c: In function `k_fn':
drivers/char/keyboard.c:665: warning: comparison is always true due
to limited range of data type
I didn't want to just delete the code because one day the size of func_table
may get smaller, or the type of `value' may get larger. When that happens,
the test becomes valid again.
Andrew Morton [Thu, 14 Aug 2003 17:22:44 +0000 (10:22 -0700)]
[PATCH] request_firmware fix
From: Manuel Estrada Sainz <ranty@debian.org>
- undo recent change, made in the believe that "buffer" was the size of
the whole file, it is just PAGE_SIZE in size. This was causing kernel
memory corruption.
- Since files are allowed to have unknown sizes, by setting their
size to 0, we can't preallocate a buffer of their size on open.
- Adapt request_firmware() to the sysfs change.
- Adapt drivers/pci/pci-sysfs.c to the sysfs change.
Andrew Morton [Thu, 14 Aug 2003 17:22:37 +0000 (10:22 -0700)]
[PATCH] loop oops fix
loop-on-file oopses during unmount. This is because lo_queue is now freed
during lo_ioctl(LOOP_CLR_FD). I think the scenario is:
1: umount(8) opens /dev/loop0
2: umount(8) runs lo_ioctl(LOOP_CLR_FD) (this frees the queue)
3: umount(8) closes the /dev/loop0 handle. The blockdev layer syncs the
blockdev, but its mapping->backing_dev_info now points into la-la-land.
We shouldn't be freeing the queue until all refs to it have gone away. This
patch gives the queue the same lifetime as the controlling loop_device
itself. It also makes the loop driver's queue appear in sysfs again.
It would be better to free the queue when the device is not in use, but I'm
not sure how we can hook into the blockdev layer to do that.
Andrew Morton [Thu, 14 Aug 2003 17:22:18 +0000 (10:22 -0700)]
[PATCH] fix hugetlbfs slab corruption on umount
From: Zwane Mwaikambo <zwane@linuxpower.ca>
hugetlbfs was accessing super_block->s_fs_info after free'ing it. This was
because it was being free'd prematurely. I have deferred free until
->put_super(). I have also removed hugetlbfs_kill_super since it now is
simply a kill_litter_super.
Andrew Morton [Thu, 14 Aug 2003 17:21:45 +0000 (10:21 -0700)]
[PATCH] Make MTRR init conform with recommended procedure
From: Zwane Mwaikambo <zwane@linuxpower.ca>
This is a patch to make the MTRR initialisation more conformant with what
is stated in volume 3 of (10-36 Memory Cache Control). The most notable
change is entering the no-fill cache mode before clearing the PGE bit in
cr4. Intel also states that we should do the cache flush via the cr3
register shuffle. If there is a problem with the patch please don't
hesitate to beat me vigorously with a clue-by-four.
It has been tested on a 3x Pentium 133, 8x PIII Xeon 700, 1x Celeron 550 and 32x
PIII 500 NUMAQ (hardware courtesy of OSDL)
Andrew Morton [Thu, 14 Aug 2003 17:21:10 +0000 (10:21 -0700)]
[PATCH] _devfs_walk_path fix
From: Andrey Borzenkov <arvidjaar@mail.ru>
_devfs_walk_path does not check if de it is about to scan is a directory.
Next step is spinlock on non-spinlock memory. It requires either artificial
setup or really broken driver but fairly easy to reproduce once you know how.
Andrew Morton [Thu, 14 Aug 2003 17:18:53 +0000 (10:18 -0700)]
[PATCH] BUG fix for drivers/bluetooth/hci_usb.c
From: Vinay K Nallamothu <vinay-rc@naturesoft.net>
The patch below fixes two pointer reference bugs (shows up as compile
time warnings given below) which wrongly take the address of "struct
usb_interface*".
drivers/bluetooth/hci_usb.c: In function `hci_usb_probe':
drivers/bluetooth/hci_usb.c:786: warning: assignment from incompatible pointer type
drivers/bluetooth/hci_usb.c:810: warning: assignment from incompatible pointer type
Andrew Morton [Thu, 14 Aug 2003 17:18:13 +0000 (10:18 -0700)]
[PATCH] fix ide-scsi for ide_drive_t->queue change
From: Mikael Pettersson <mikpe@csd.uu.se>
This patch fixes ide-scsi.c for the ide_drive_t->queue type change
in 2.6.0-test3.
Without the patch you'll get these new warnings in -test3:
drivers/scsi/ide-scsi.c: In function `idescsi_abort':
drivers/scsi/ide-scsi.c:875: warning: passing arg 1 of `elv_queue_empty' from incompatible pointer type
drivers/scsi/ide-scsi.c: In function `idescsi_reset':
drivers/scsi/ide-scsi.c:902: warning: passing arg 1 of `elv_next_request' from incompatible pointer type
Andrew Morton [Thu, 14 Aug 2003 17:17:34 +0000 (10:17 -0700)]
[PATCH] probe UDF after reiserfs
Bug 1065 (http://bugme.osdl.org/show_bug.cgi?id=1065) points out that there
is a risk that UDF will accidentally mount a reiserfs partition, which would
prevent a successful boot.
Andries points out that probing is unreliable and that users/admins should
always specify the root filesystem type on the kernel boot command line with
"rootfstype=resierfs".
But nobody does that, so we should be trying reiserfs before UDF.
Andrew Morton [Thu, 14 Aug 2003 17:16:41 +0000 (10:16 -0700)]
[PATCH] fix task struct refcount bug
From: Manfred Spraul <manfred@colorfullife.com>
(We think this might be the mystery bug which has been hanging about for
months)
We found a [the?] task struct refcount error: A task that dies sets
tsk->state to TASK_ZOMBIE. The next scheduled task checks prev->state, and
if it's ZOMBIE, then it decrements the reference count of prev. The
prev->state & _ZOMBIE test is not atomic with schedule, thus if prev is
scheduled again and dies between dropping the runqueue lock and checking
prev->state, then the reference it dropped twice.
This is possible with either preemption [schedule_tail is called by
ret_from_fork with preemption count 1, finish_arch_switch drops it to 0] or
profiling [profile_exit_mmap can sleep on profile_rwsem, called by
mmdrop()] enabled.
Here's the updated patch to fix several race conditions in nbd. It
requires reverting the already included (but incomplete)
nbd-race-fix.patch that's in -mm5.
This patch fixes the following race conditions:
1) adds an increment of req->ref_count to eliminate races between
do_nbd_request and nbd_end_request, which resulted in the freeing of
in-use requests -- there were races between send/receive, send/shutdown
(killall -9 nbd-client), and send/disconnect (nbd-client -d), which are
now all fixed
2) adds locking and properly orders the code in NBD_CLEAR_SOCK to
eliminate races with other code
3) adds an lo->sock check to nbd_clear_que to eliminate races between
do_nbd_request and nbd_clear_que, which resulted in the dequeuing of
active requests
4) adds an lo->sock check to NBD_DO_IT to eliminate races with
NBD_CLEAR_SOCK, which caused an Oops when "nbd-client -d" was called
Andrew Morton [Thu, 14 Aug 2003 17:11:42 +0000 (10:11 -0700)]
[PATCH] reiserfs: Fix handling of some extended inode
From: Oleg Drokin <green@namesys.com>
This patch fixes a problem in reiserfs' handling of immutable attribute,
where every user (not just root) can unset it. Also it adds "append-only"
attribute "support" (all the support is in VFS anyway, we only recognise the
bit now). Also misleading comment in reiserfs_fs.h is removed.
Andrew Morton [Thu, 14 Aug 2003 17:10:37 +0000 (10:10 -0700)]
[PATCH] reiserfs: remove unneeded kunmap
From: Oleg Drokin <green@namesys.com>
There is a leftover kunmap in reiserfs_unprepare_pages() which was not
deleted after conversion to kmap_atomic. This path is virtually never
executed, that's why it was not caught earlier. Please apply.