Jens Axboe [Mon, 15 Mar 2004 13:24:51 +0000 (05:24 -0800)]
[PATCH] sys_swapon bad arg causing slab corruption
There's an error in sys_swapon() that can cause slab corruption if you
pass in a bad specialfile pointer. getname() then returns
ERR_PTR(-EFAULT), but sys_swapon() doesn't clear name before calling
putname() on it (thus freeing 0xfffffff2, corrupting slab). An ltp test
case repeatedly crashed in later tests due to thus, irk.
Paul Wagland [Mon, 15 Mar 2004 13:15:14 +0000 (05:15 -0800)]
[PATCH] Set module owner in megaraid driver
This bug was discussed on linux-scsi a few weeks back, but it appears to
have slipped through the cracks. This fix was originally proposed by
Christoph Hellwig, but I am reposting it, since I have the hardware :-)
Anyway, the problem that this fixes is that megaraid doesn't set the
moduler owner for the host_template, this means that the module can be
removed, even when it is in use.
Andrew Morton [Mon, 15 Mar 2004 13:02:26 +0000 (05:02 -0800)]
[PATCH] generic 32 bit emulation for System-V IPC
From: Arnd Bergmann <arnd@arndb.de>
Adds a generic implementation of 32 bit emulation for IPC system calls. The
code is based on the existing implementations for sparc64, ia64, mips, s390,
ppc and x86_64, which can subsequently be converted to use this.
Jeff Garzik [Mon, 15 Mar 2004 06:03:56 +0000 (01:03 -0500)]
[libata] disable clustering by default, whitespace cleanups
Disable SCSI's clustering of S/G entries, typically reducing overall
S/G list size. Although ATA S/G tables are getting smarter (64-bit
address, 32-bit length, no DMA boundary besides 4G itself), working
harder to generate large byte sizes for each S/G size is not necessarily
in our best interest:
* SATA consists of frames, much like ethernet, called "FIS". A
Data FIS consists of up to 2048 dwords (8K) of data. We don't want
generate large byte sizes in S/G entries, just to have the host controller
break them up again into smaller chunks.
* Reduces the possibility that ata_fill_sg (libata-core.c) must split
an S/G into two pieces, because it straddles a 64K boundary.
* Reduces the possibility that FIS-related errata workarounds
must be enabled. One such exists in the Silicon Image driver (sata_sil),
which is currently worked around by limiting the max-sectors-per-request
to 15.
This patch makes the w83781d driver preserve fan_min settings when the
user changes fan_divs. This isn't done "by default" because the actual
fan min value (in RPMs) depends on both the fan_min register and the
fan_div register. Only two drivers handle it properly at the moment as
far as I know (lm78 and asb100). Several other drivers would need to be
fixed the same way, but well, once at a time ;)
Tested on my AS99127F rev.1.
Credits go to Philip Pokorny, since I think I remember he is the one who
introduced the method in the lm78 driver in the first place.
This tends to increase the size of the three set_store_regs_fan_div
functions, and I am considering refactoring them at some point. Later
though.
Note that in any case, the worst that could happen (but then again, it
cannot happen) is that the chip name would be set to an empty string,
which doesn't hurt much.
The patch also cleans up a few things in it87, w83627hf and w83781d,
which are tightly related to the rest of the changes and necessary for
them to be safe.
it87: There is only really one "kind" in this driver, so I removed all
references to other kinds.
w83627hf: The driver did not handle unknown chips.
w83781d: The user shouldn't be allowed to force a kind that doesn't
match the chip's bus type (I2C or ISA). The code was not meant to handle
that case, although no check was done so far.
Jean Delvare [Mon, 15 Mar 2004 05:08:29 +0000 (21:08 -0800)]
[PATCH] I2C: fix forced i2c chip drivers have no name
I just noticed that I am doing something wrong in the i2c chip drivers I
ported to Linux 2.6. If these drivers are forced to a specific chip type
("kind" as we call it internally), then the device doesn't have its name
set (and defaults to an empty string).
Affected drivers: gl518sm, lm83, lm90, w83l785ts.
I could verify the problem on my ADM1032 chip (lm90 driver). I also
verified that the proposed patch fixes the issue.
You may notice that I fix the problem differently for gl518sm and
w83l785ts on the one hand, and lm83 and lm90 on the other hand. This is
because the first two drivers are not expected to support more a single
chip in the future, while lm90 already does and lm83 could someday (for
example, support for the LM82 could be added on request).
When Tun initialization fails it shouldn't obscure the error return,
There are several reasons it could fail, and when diagnosing user problems
the error code might provide more info.
Jaroslav Kysela [Mon, 15 Mar 2004 12:04:42 +0000 (13:04 +0100)]
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
AC97 Codec Core
Kevin Mack <kevmack@accesscomm.ca>
Here's a quick and dirty patch that's given me basic sound from
my Gateway M675 notebook (Sigmatel 9758 AC97 codec).
Set ide_task_t fields (command_type, handler and prehandler) directly.
Remove unused ide_task_t->posthandler and all ide_cmd_type_parser() logic.
ide_cmd_type_parser() was meant to be used for ioctls but
ended up checking validity of kernel generated requests (doh!).
Rationale for removal:
- it can't be used for existing ioctls (changes the way they work)
- kernel shouldn't check validity of (root only) user-space requests
(it can and should be done in user-space)
- it wastes CPU cycles on going through parsers
- it makes code harder to understand/follow
(now info about request is localized)
Many thanks to Promise for their support.
Expect more updates/fixes for Promise PATA support soon.
- fix PIO (auto-)tuning - use pdcnew_new_tune_chipset()
and always tune PIO mode even if (U)DMA is used
- cleanup cable verification code a bit
- remove leftovers from driver split-up
- remove duplicate DISPLAY_PDC202XX_TIMINGS define
Russell King [Sun, 14 Mar 2004 20:37:39 +0000 (20:37 +0000)]
[PCMCIA] socket user operations should take pcmcia_socket
Patch from Dominik Brodowski, updated by Russell King.
The pcmcia_{suspend,resume,eject,insert}_card calls are only issued
by the userspace cardctl tool via ds.c. There's no need to verify the
caller (ds) has a valid "handle", as long as it knows the proper
struct pcmcia_socket.
Russell King [Sun, 14 Mar 2004 20:20:33 +0000 (20:20 +0000)]
[PCMCIA] Rename driver services constants.
Driver services constants clash with similar constants defined
by Card services. Prefix them all with DS_.
This patch started out as Dominik Brodowski's 2.6.0-test9
ds_includes_cs_internal patch, which only changed one constant
and attempted to fix PCMCIA debugging.
Russell King [Sun, 14 Mar 2004 20:12:21 +0000 (20:12 +0000)]
[PCMCIA] Add, fix, update PCMCIA debugging.
The PCMCIA core debugging assumes that "pc_debug" is a global. If
pc_debug were to be a global, it would pollute the kernel's global
name space, potentially clashing with PCMCIA drivers and even ds.c.
We also get rid of PCMCIA using the "DEBUG" macro, which is the
standard macro to enable debugging in the kernel. Instead, we
introduce cs_dbg() for core PCMCIA debugging, ds_dbg() for driver
services debugging, and similar macros in the socket drivers.
Jeff Garzik [Sun, 14 Mar 2004 18:32:20 +0000 (13:32 -0500)]
[libata sata_sil] remove incorrect limit on drive quirk
The original submittor of the quirk code noted that the errata
of a lockup creating when the condition "sector % 15 == 1" is
true only on chip revisions <= 1. This is limitation on chip
revision is apparently not correct, therefore we apply to all
affected drives in the quirk list.
This is a sledgehammer fix, limiting max-sectors to 15. A much better
fix would split the hardware request into two taskfiles, issuing
an additional command, thereby avoiding "sectors % 15 == 1"
Given the errata is limited to "sil 311x + <these drives>", it is hoped
that some janitor cares enough to do a real fix.