Andrew Morton [Mon, 10 Feb 2003 15:37:12 +0000 (07:37 -0800)]
[PATCH] fix current->user->processes leak
Patch from: Eric Lammerts <eric@lammerts.org>
Every time you do a loop mount, a kernel thread is started (those
processes are called "loop0", "loop1", etc.). The problem is that when
it starts, it's counted as one of your processes. Then, it's
changed to be a root-owned process without correcting that count.
Patch below fixes the problem. It moves the bookkeeping of changing
current->user to a new function switch_uid() (which is now also used
by exec_usermodehelper() in kmod.c). The patch is tested.
Andrew Morton [Mon, 10 Feb 2003 15:37:03 +0000 (07:37 -0800)]
[PATCH] remove the buffer_head mempool
mempools have the wrong semantics for use by buffer_heads. The problem
scenario:
- Process A calls mempool_alloc(), asking for a buffer_head.
- While process A sleeps, process B frees up a ton of memory.
That's it. There is no longer any memory pressure, so nobody frees any
buffer_heads, so process A does not get woken up. I managed to trigger this
in some testing recently.
One approach would be to use a schedule_timeout(2) in mempool_alloc().
Anyway, the importance of buffer_head allocation was lessened when swapout
stopped using them, so let's just drop the mempool out of it for now.
Andrew Morton [Mon, 10 Feb 2003 15:36:23 +0000 (07:36 -0800)]
[PATCH] nforce2 IDE support for the amd74xx driver
Patch from James Curbo <phoenix@sandwich.net>
The amd74xx IDE driver in 2.5.59 has support for the nforce IDE controller,
but not explicitly for the nforce2 IDE controller (which has a different PCI
ID, which is in the kernel already). I'm not sure if the nforce and nforce2
controllers are identical, but I made a small patch that made the amd74xx
driver recognize the nforce2 IDE, and it boots for me, seems to work fine, as
my drives were tuned to their highest transfer rate automatically (udma5).
I don't know if this patch is proper or correct, but it Works for Me [tm].
Patch is attached.
Andrew Morton [Mon, 10 Feb 2003 15:36:07 +0000 (07:36 -0800)]
[PATCH] DAC960 Stanford Checker fix
Patch from Dave Olien <dmo@osdl.org>
This was found by the Standford Checker.
The LogicalDeviceNumber bad range test was changed from > to >=
I also replaced a couple of panic() calls with error messages,
since panic-ing seemed a little extreme.
Andrew Morton [Mon, 10 Feb 2003 15:36:00 +0000 (07:36 -0800)]
[PATCH] ext3: Remove journal_try_start()
journal_try_start() is a function which nonblockingly attempts to open a JBD
transaction handle. It was added a long time ago when there were concerns
that ext3_writepage() could block kswapd for too long.
It was never clearly necessary.
So the patch throws it all away and just calls the blocking journal_start()
from ext3_writepage().
the problem is that if the buffer was locked on entry to this code sequence
(due to in-progress I/O), ll_rw_block() will not wait, and start new I/O. So
this code will wait on the _old_ I/O, and will then continue execution,
leaving the buffer dirty.
It turns out that all callers were only writing one buffer, and they were all
waiting on that writeout. So I added a new sync_dirty_buffer() function:
Dave Jones [Mon, 10 Feb 2003 17:45:11 +0000 (16:45 -0100)]
[AGPGART] Merge VIA KT400 AGP3 support into main via-agp module.
This removes lots of annoying problems trying to prevent both modules
from being loaded, and also shares quite a bit of code.
CONFIG_AGP3 will disable AGP3 mode operation of KT400s.
Dave Jones [Mon, 10 Feb 2003 16:53:30 +0000 (15:53 -0100)]
[AGPGART] Add extra VIA GART IDs.
Based upon information from VIA, this also adds a bunch of placeholder
entries that will get filled in over time when they have been proven
to work with the code with no extra modification.
Dave Jones [Mon, 10 Feb 2003 16:53:24 +0000 (15:53 -0100)]
[AGPGART] First step towards multiple AGP buses.
The AGP3 spec allows for >1 AGP bus. This is the first of several patches
from Jeff Hartmann towards a context-using agp_bridge, by replacing
agp_bridge.foo accesses with agp_bridge->foo accesses. For now, there
should be no functional differences, as there is still only a single
agp_bridge_data struct defined.
Steven Cole [Mon, 10 Feb 2003 01:40:33 +0000 (17:40 -0800)]
[PATCH] Finish job of trimming ".o" module extension in Kconfig files
Most of the instances of <module>.o in Kconfig files have had the ".o"
extension trimmed. This change came from GertJan Spoelman through Rusty
"Trivial" Russell.
However, there are a few files that didn't get trimmed. This brings
them line with the rest of the tree.
Linus Torvalds [Sun, 9 Feb 2003 23:58:04 +0000 (15:58 -0800)]
Wake up a stopped task _after_ having marked the SIGCONT pending,
so that there isn't any window for running before the signal
handler has been invoced.
Rusty Russell [Sun, 9 Feb 2003 11:01:17 +0000 (03:01 -0800)]
[PATCH] Write with buffer>2GB returns broken errno (2)
[ Acked by AKPM --RR ]
From: Kazuto MIYOSHI <miyoshi@hpc.bs1.fc.nec.co.jp>
On 64-bit platforms, issuing write(2) with buffer larger than
2GB will return -1 and broken errno (such as 2147483640)
Requested data itself is written correctly.
That is because generic_file_write() and other relating functions
store 'ssize_t written' into 'int err'. Written byte is trimmed to
int and then sign-extended to a negative ssize_t value, which
wrongly indicates an error.
(On 64bit platform, current glibc defines SSIZE_MAX as 'LONG_MAX')
Rusty Russell [Sun, 9 Feb 2003 11:00:00 +0000 (03:00 -0800)]
[PATCH] remove LinuxVersionCode from de4x5.h
From: Adrian Bunk <bunk@fs.tum.de>
drivers/net/tulip/de4x5.h in 2.5.54 contains a definition of
LinuxVersionCode. LinuxVersionCode isn't used and it's anyway obsoleted
by KERNEL_VERSION in version.h.
Rusty Russell [Sun, 9 Feb 2003 10:59:46 +0000 (02:59 -0800)]
[PATCH] Fix return code of init_module in drivers_net_arlan.c (2)
From: Pablo Menichini <pablo@menichini.com.ar>
This patch returns correct error codes if init_modules fail.
Because of this, we can take the printks indicating the error as these
corrected error codes return miningfull information.
Rusty Russell [Sun, 9 Feb 2003 10:59:32 +0000 (02:59 -0800)]
[PATCH] RTC alarm and wildcards
(Included in 2.4)
From: Paul Gortmaker <p_gortmaker@yahoo.com>
Summary: Wildcards in RTC alarm settings failed to work
Description:
The RTC has provision for wildcards when setting the alarm; to
use them you have to write a value higher than 0xc0 to the
appropriate hr/min/sec entry. The driver used 0xff, which is
fine, but it mistakenly fed the 0xff through BIN_TO_BCD before
writing them (which is < 0xc0) and so wildcards didn't work.
(Thanks to Gerhard Kurz for reporting the bug.)
Rusty Russell [Sun, 9 Feb 2003 10:58:40 +0000 (02:58 -0800)]
[PATCH] scripts_ver_linux
From: Frank Davis <fdavis@si.rr.com>
The ver_linux script is still using rmmod to determine
module-init-tools version. The following patch uses depmod,
which produces the appropriate result.
Rusty Russell [Sun, 9 Feb 2003 10:58:12 +0000 (02:58 -0800)]
[PATCH] remove check_region from drivers_net_irda_irport.c
From: william stinson <wstinson@wanadoo.fr>
this patch for drivers/net/irda/irport.c IRDA driver removes one call
to check_region using request_region instead. The patch also moves
the call to request_region to before the allocation of the driver
instance.
Jaroslav Kysela [Sun, 9 Feb 2003 20:47:59 +0000 (21:47 +0100)]
ALSA update
- moved inclusion of <linux/interrupt.h> from <sound/asound.h> to <sound/timer.h>
- pmac driver - removed beep stuff for 2.5 kernels
- USB driver - fixed compilation
James Bottomley [Sun, 9 Feb 2003 04:07:51 +0000 (22:07 -0600)]
[SCSI] Migrate sim710 to 53c700 chip driver
This should add synchronous support and Tagged Command Queueing.
At the moment, it cuts down on the number of command line options,
but we can add those back in later.
This patch also migrates the driver to the new device model for
both MCA and EISA.
James Bottomley [Sun, 9 Feb 2003 03:36:18 +0000 (21:36 -0600)]
Restore device command queue functionality
The recent slab allocation changes mean that we no longer keep a
permanent list of commands on the device_queue list. However,
certain pieces of SCSI code relied on being able to traverse this
list to find details of all outstanding commands (the error handler
being the prime example). This code adds back a new dynamic cmd_list
which keeps the list of commands currently allocated to the device.
Since the list is dynamic, it is protected by a lock (list_lock).
Jamie Lokier [Sat, 8 Feb 2003 18:41:34 +0000 (10:41 -0800)]
[PATCH] CONFIG_PREEMPT fix of do_debug()
If CONFIG_PREEMPT is enabled, and the kernel is preempted just before
do_debug() has a chance to save the debug register values, DR6 could be
read from the wrong CPU.
It is exactly the same problem as reading %cr2 in the page fault
handler. Same fix: make the handler a interrupt gate, and enable
interrupts only once safe.