]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
17 years agoLinux 2.6.16.34 v2.6.16.34
Adrian Bunk [Wed, 29 Nov 2006 05:47:00 +0000 (06:47 +0100)]
Linux 2.6.16.34

17 years agoLinux 2.6.16.34-rc1 v2.6.16.34-rc1
Adrian Bunk [Sat, 25 Nov 2006 21:23:42 +0000 (22:23 +0100)]
Linux 2.6.16.34-rc1

17 years ago[ALSA] echoaudio - Remove kfree_nocheck()
Takashi Iwai [Sat, 25 Nov 2006 21:22:08 +0000 (22:22 +0100)]
[ALSA] echoaudio - Remove kfree_nocheck()

Remove obsoleted kfree_nochec() (for debug).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[ALSA] echoaudio - Fix Makefile
Takashi Iwai [Sat, 25 Nov 2006 21:21:14 +0000 (22:21 +0100)]
[ALSA] echoaudio - Fix Makefile

Fix missing makefile entries for echoaudio drivers

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[ALSA] Fix a typo in echoaudio/midi.c
Takashi Iwai [Sat, 25 Nov 2006 21:20:26 +0000 (22:20 +0100)]
[ALSA] Fix a typo in echoaudio/midi.c

Fixed a typo in echoaudio/midi.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[ALSA] Add echoaudio sound drivers
Giuliano Pochini pochini@shiny.it [Sat, 25 Nov 2006 21:17:19 +0000 (22:17 +0100)]
[ALSA] Add echoaudio sound drivers

Add echoaudio sound drivers (darla20, darla24, echo3g, gina20, gina24,
indigo, indigodj, indigoio, layla20, lala24, mia, mona)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoCIFS: report rename failure when target file is locked by Windows
Steve French [Sat, 25 Nov 2006 21:14:02 +0000 (22:14 +0100)]
CIFS: report rename failure when target file is locked by Windows

Fixes Samba bugzilla bug # 4182

Rename by handle failures (retry after rename by path) were not
being returned back.

Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoi2c: Handle i2c_add_adapter failure in i2c algorithm drivers
Mark M. Hoffman [Sat, 25 Nov 2006 02:02:49 +0000 (03:02 +0100)]
i2c: Handle i2c_add_adapter failure in i2c algorithm drivers

It is possible for i2c_add_adapter() to fail.  Several I2C algorithm
drivers ignore that fact.  This (compile-tested only) patch fixes them.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IGMP]: Fix IGMPV3_EXP() normalization bit shift value.
David L Stevens [Sat, 25 Nov 2006 01:51:50 +0000 (02:51 +0100)]
[IGMP]: Fix IGMPV3_EXP() normalization bit shift value.

The IGMPV3_EXP() macro doesn't correctly shift the normalization bit, so
time-out values are longer than they should be.

Thanks to Dirk Ooms for finding the problem in IGMPv3 - MLDv2 had a
similar problem that was already fixed a year ago. :-(

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoUSB: UHCI: Increase port-reset completion delay for HP controllers
Alan Stern [Sat, 25 Nov 2006 01:47:52 +0000 (02:47 +0100)]
USB: UHCI: Increase port-reset completion delay for HP controllers

This patch (as657) increases the port-reset completion delay in uhci-hcd
for HP's embedded controllers.  Unlike other UHCI controllers, the HP
chips can take as long as 250 us to carry out the processing associated
with finishing a port reset.

This fixes Novell bug #148761.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] hptiop: backout ioctl mess
Christoph Hellwig [Fri, 24 Nov 2006 03:38:58 +0000 (04:38 +0100)]
[SCSI] hptiop: backout ioctl mess

The hptiop just got merged with a horrible amount of really bad ioctl
code that is against the standards for new scsi drivers.  This patch
backs it out (and fixes a small bug where scsi_add_host is called to
early).  We can re-add proper APIs once we agree on them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] hptiop: wrong register used in hptiop_reset_hba()
HighPoint Linux Team [Fri, 24 Nov 2006 03:36:33 +0000 (04:36 +0100)]
[SCSI] hptiop: wrong register used in hptiop_reset_hba()

IOP reset message should be posted to inbound message register
instead of outbound message register.

Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] hptiop: don't use cmnd->bufflen
James Bottomley [Fri, 24 Nov 2006 03:35:42 +0000 (04:35 +0100)]
[SCSI] hptiop: don't use cmnd->bufflen

use cmnd->request_bufflen instead.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
HighPoint Linux Team [Fri, 24 Nov 2006 03:34:52 +0000 (04:34 +0100)]
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver

Updates:
- don't bypass SYNCHRONIZE_CACHE command
- return SCSI_MLQUEUE_HOST_BUSY when no free request slots
- move scsi_remove_host() to the begin of hpt_remove(), or it will
  not work after resources being released.

Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
HighPoint Linux Team [Fri, 24 Nov 2006 03:34:03 +0000 (04:34 +0100)]
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver

HighPoint RocketRAID 3220/3320 series 8 channel PCI-X SATA RAID Host
Adapters.

Fixes from original submission:

Merge Andrew Morton's patches:
- Provide locking for global list
- Fix debug printks
- uninline function with multiple callsites
- coding style fixups
- remove unneeded casts of void*
- kfree(NULL) is legal
- Don't "succeed" if register_chrdev() failed - otherwise we'll later
  unregister a not-registered chrdev.
- Don't return from hptiop_do_ioctl() with the spinlock held.
- uninline __hpt_do_ioctl()

Update for Arjan van de Ven's comments:
- put all asm/ includes after the linux/ ones
- replace mdelay with msleep
- add pci posting flush
- do not set pci command reqister in map_pci_bar
- do not try merging sg elements in hptiop_buildsgl()
- remove unused outstandingcommands member from hba structure
- remove unimplemented hptiop_abort() handler
- remove typedef u32 hpt_id_t

Other updates:
- fix endianess

Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoupdate the OBSOLETE_OSS_DRIVER help text
Adrian Bunk [Fri, 24 Nov 2006 02:27:09 +0000 (03:27 +0100)]
update the OBSOLETE_OSS_DRIVER help text

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosysfs: remove duplicated dput in sysfs_update_file
Hidetoshi Seto [Fri, 24 Nov 2006 02:11:19 +0000 (03:11 +0100)]
sysfs: remove duplicated dput in sysfs_update_file

Following function can drops d_count twice against one reference
by lookup_one_len.

<SOURCE>
/**
 * sysfs_update_file - update the modified timestamp on an object attribute.
 * @kobj: object we're acting for.
 * @attr: attribute descriptor.
 */
int sysfs_update_file(struct kobject * kobj, const struct attribute * attr)
{
        struct dentry * dir = kobj->dentry;
        struct dentry * victim;
        int res = -ENOENT;

        mutex_lock(&dir->d_inode->i_mutex);
        victim = lookup_one_len(attr->name, dir, strlen(attr->name));
        if (!IS_ERR(victim)) {
                /* make sure dentry is really there */
                if (victim->d_inode &&
                    (victim->d_parent->d_inode == dir->d_inode)) {
                        victim->d_inode->i_mtime = CURRENT_TIME;
                        fsnotify_modify(victim);

                        /**
                         * Drop reference from initial sysfs_get_dentry().
                         */
                        dput(victim);
                        res = 0;
                } else
                        d_drop(victim);

                /**
                 * Drop the reference acquired from sysfs_get_dentry() above.
                 */
                dput(victim);
        }
        mutex_unlock(&dir->d_inode->i_mutex);

        return res;
}
</SOURCE>

PCI-hotplug (drivers/pci/hotplug/pci_hotplug_core.c) is only user of
this function. I confirmed that dentry of /sys/bus/pci/slots/XXX/*
have negative d_count value.

This patch removes unnecessary dput().

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agofix sys_getppid oopses on debug kernel
Kirill Korotaev [Fri, 24 Nov 2006 02:08:27 +0000 (03:08 +0100)]
fix sys_getppid oopses on debug kernel

sys_getppid() optimization can access a freed memory.  On kernels with
DEBUG_SLAB turned ON, this results in Oops.  As Dave Hansen noted, this
optimization is also unsafe for memory hotplug.

So this patch always takes the lock to be safe.

Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPX]: Annotate and fix IPX checksum
Al Viro [Fri, 24 Nov 2006 02:03:34 +0000 (03:03 +0100)]
[IPX]: Annotate and fix IPX checksum

Calculation of IPX checksum got buggered about 2.4.0.  The old variant
mangled the packet; that got fixed, but calculation itself got buggered.
Restored the correct logics, fixed a subtle breakage we used to have even
back then: if the sum is 0 mod 0xffff, we want to return 0, not 0xffff.
The latter has special meaning for IPX (cheksum disabled).  Observation
(and obvious fix) nicked from history of FreeBSD ipx_cksum.c...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPX]: Fix typo, ipxhdr() --> ipx_hdr()
David S. Miller [Fri, 24 Nov 2006 02:01:09 +0000 (03:01 +0100)]
[IPX]: Fix typo, ipxhdr() --> ipx_hdr()

Noticed by Dave Jones.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPX]: Another nonlinear receive fix
Stephen Hemminger [Fri, 24 Nov 2006 01:59:07 +0000 (02:59 +0100)]
[IPX]: Another nonlinear receive fix

Need to check some more cases in IPX receive.  If the skb is purely
fragments, the IPX header needs to be extracted. The function
pskb_may_pull() may in theory invalidate all the pointers in the skb,
so references to ipx header must be refreshed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPX]: Header length validation needed
Stephen Hemminger [Fri, 24 Nov 2006 01:57:28 +0000 (02:57 +0100)]
[IPX]: Header length validation needed

This patch will linearize and check there is enough data.
It handles the pprop case as well as avoiding a whole audit of
the routing code.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPX]: Correct return type of ipx_map_frame_type().
Alexey Dobriyan [Fri, 24 Nov 2006 01:56:20 +0000 (02:56 +0100)]
[IPX]: Correct return type of ipx_map_frame_type().

Casting BE16 to int and back may or may not work. Correct, to be sure.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix i2c-ixp4xx compilation breakage
Jean Delvare [Fri, 24 Nov 2006 01:53:16 +0000 (02:53 +0100)]
Fix i2c-ixp4xx compilation breakage

Fix recent i2c-ixp4xx compilation breakage. Sorry for overlooking it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] advansys pci tweaks.
Adrian Bunk [Thu, 23 Nov 2006 01:11:07 +0000 (02:11 +0100)]
[SCSI] advansys pci tweaks.

Remove a lot of duplicate #defines from the advansys driver,
and make them look like PCI IDs as defined elsewhere in the kernel.
Also add a module table so that it automatically gets picked up
by tools relying on modinfo output (like say, distro installers).

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoadvansys section fixes
Randy Dunlap [Thu, 23 Nov 2006 01:09:36 +0000 (02:09 +0100)]
advansys section fixes

Priority: not critical.
Mark 3 functions __init.  Saves a little memory.
This makes these functions' calls to AdvWaitEEPCmd() (which is __init)
be clean (i.e., eliminates text -> init -> text call chain).

Fix multiple section mismatch warnings:
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet3550EEPConfig' (at offset 0x7a22) and 'AdvSet38C0800EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet3550EEPConfig' (at offset 0x7a4e) and 'AdvSet38C0800EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet3550EEPConfig' (at offset 0x7a79) and 'AdvSet38C0800EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet3550EEPConfig' (at offset 0x7aa2) and 'AdvSet38C0800EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet3550EEPConfig' (at offset 0x7abb) and 'AdvSet38C0800EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C0800EEPConfig' (at offset 0x7ae0) and 'AdvSet38C1600EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C0800EEPConfig' (at offset 0x7b0c) and 'AdvSet38C1600EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C0800EEPConfig' (at offset 0x7b37) and 'AdvSet38C1600EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C0800EEPConfig' (at offset 0x7b60) and 'AdvSet38C1600EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C0800EEPConfig' (at offset 0x7b79) and 'AdvSet38C1600EEPConfig'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C1600EEPConfig' (at offset 0x7b9e) and 'AdvExeScsiQueue'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C1600EEPConfig' (at offset 0x7bca) and 'AdvExeScsiQueue'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C1600EEPConfig' (at offset 0x7bf5) and 'AdvExeScsiQueue'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C1600EEPConfig' (at offset 0x7c1e) and 'AdvExeScsiQueue'
WARNING: drivers/scsi/advansys.o - Section mismatch: reference to .init.text: from .text between 'AdvSet38C1600EEPConfig' (at offset 0x7c37) and 'AdvExeScsiQueue'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SCSI] advansys driver: limp along on x86
Linus Torvalds [Thu, 23 Nov 2006 01:01:01 +0000 (02:01 +0100)]
[SCSI] advansys driver: limp along on x86

Let people enable the advansys driver on x86-32, even though it's broken
on other architectures due to missing DMA mapping infrastructure.

It's used by Jeffrey Phillips Freeman <jeffreyfreeman@syncleus.com> and
possibly others.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoi2c-ixp4xx: fix ") != 0))" typo
Alexey Dobriyan [Thu, 23 Nov 2006 00:33:16 +0000 (01:33 +0100)]
i2c-ixp4xx: fix ") != 0))" typo

i2c_bit_add_bus() returns -E;
-E != 0             =>      err = 1
probe fails with positive error code

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoLinux 2.6.16.33 v2.6.16.33
Adrian Bunk [Wed, 22 Nov 2006 18:06:31 +0000 (19:06 +0100)]
Linux 2.6.16.33

17 years agoLinux 2.6.16.33-rc1 v2.6.16.33-rc1
Adrian Bunk [Mon, 20 Nov 2006 21:51:17 +0000 (22:51 +0100)]
Linux 2.6.16.33-rc1

17 years agoPOWERPC: Make alignment exception always check exception table
Benjamin Herrenschmidt [Mon, 20 Nov 2006 21:45:49 +0000 (22:45 +0100)]
POWERPC: Make alignment exception always check exception table

The alignment exception used to only check the exception table for
-EFAULT, not for other errors. That opens an oops window if we can
coerce the kernel into getting an alignment exception for other reasons
in what would normally be a user-protected accessor, which can be done
via some of the futex ops. This fixes it by always checking the
exception tables.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoAdd new PHY to sis900 supported list
Daniele Venzano [Mon, 20 Nov 2006 21:43:31 +0000 (22:43 +0100)]
Add new PHY to sis900 supported list

This patch adds support for a new PHY to the sis900 driver.
See also Bugzilla 6919.

Signed-off-by: Daniele Venzano <venza@brownhat.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosis900 adm7001 PHY support
Artur Skawina [Mon, 20 Nov 2006 21:32:56 +0000 (22:32 +0100)]
sis900 adm7001 PHY support

this patch is required to get a SIS964 based motherboard ethernet working
(FSC D1875) (picking the #1 transceiver, instead of the last one, in case
no known ones were found might be a better default, and would have worked
in this case too)

Signed-off-by: Artur Skawina <art_k@o2.pl>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoOld IDE, fix SATA detection for cabling
Michael-Luke Jones [Mon, 20 Nov 2006 21:30:21 +0000 (22:30 +0100)]
Old IDE, fix SATA detection for cabling

This patch is identical to that introduced in
1a1276e7b6cba549553285f74e87f702bfff6fac to the Linus' 2.6 development tree
by Alan Cox.

'This is based on the proposed patches flying around but also checks that
the device in question is new enough to have word 93 rather thanb blindly
assuming word 93 == 0 means SATA (see ATA-5, ATA-7)' -- Alan Cox

Required for my SATA drive on an Asus Pundit-R to operate above 33MBps.

Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix BeFS slab corruption
Diego Calleja [Mon, 20 Nov 2006 21:25:17 +0000 (22:25 +0100)]
Fix BeFS slab corruption

In bugzilla #6941, Jens Kilian reported:

"The function befs_utf2nls (in fs/befs/linuxvfs.c) writes a 0 byte past the
end of a block of memory allocated via kmalloc(), leading to memory
corruption.  This happens only for filenames which are pure ASCII and a
multiple of 4 bytes in length.  [...]

Without DEBUG_SLAB, this leads to further corruption and hard lockups; I
believe this is the bug which has made kernels later than 2.6.8 unusable
for me.  (This must be due to changes in memory management, the bug has
been in the BeFS driver since the time it was introduced (AFAICT).)

Steps to reproduce:
Create a directory (in BeOS, naturally :-) with files named, e.g.,
"1", "22", "333", "4444", ...  Mount it in Linux and do an "ls" or "find""

This patch implements the suggested fix. Credits to Jens Kilian for
debugging the problem and finding the right fix.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoV4L/DVB: Saa7134: rename dmasound_{init,exit}
Adrian Bunk [Mon, 20 Nov 2006 03:56:03 +0000 (04:56 +0100)]
V4L/DVB: Saa7134: rename dmasound_{init,exit}

Two different exports with the same name are not a good idea:

$ grep -r EXPORT_SYMBOL\(dmasound_init\) *
drivers/media/video/saa7134/saa7134-core.c:EXPORT_SYMBOL(dmasound_init);
sound/oss/dmasound/dmasound_core.c:EXPORT_SYMBOL(dmasound_init);
$

This patch renames the saa7134 dmasound_{init,exit} to
saa7134_dmasound_{init,exit}.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[RTNETLINK]: Fix IFLA_ADDRESS handling.
David Miller [Sun, 19 Nov 2006 23:21:04 +0000 (00:21 +0100)]
[RTNETLINK]: Fix IFLA_ADDRESS handling.

The ->set_mac_address handlers expect a pointer to a
sockaddr which contains the MAC address, whereas
IFLA_ADDRESS provides just the MAC address itself.

So whip up a sockaddr to wrap around the netlink
attribute for the ->set_mac_address call.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodrivers/scsi/psi240i.c: fix an array overrun
Adrian Bunk [Sun, 19 Nov 2006 23:15:06 +0000 (00:15 +0100)]
drivers/scsi/psi240i.c: fix an array overrun

This patch fixes an array overrun spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[TG3]: Fix array overrun in tg3_read_partno().
Michael Chan [Sun, 19 Nov 2006 23:12:55 +0000 (00:12 +0100)]
[TG3]: Fix array overrun in tg3_read_partno().

Use proper upper limits for the loops and check for all error
conditions.

The problem was noticed by Adrian Bunk.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodisable debugging version of write_lock()
Andrew Morton [Sun, 19 Nov 2006 23:11:42 +0000 (00:11 +0100)]
disable debugging version of write_lock()

We've confirmed that the debug version of write_lock() can get stuck for long
enough to cause NMI watchdog timeouts and hence a crash.

We don't know why, yet.   Disable it for now.

Also disable the similar read_lock() code.  Just in case.

Thanks to Dave Olson <olson@unixfolk.com> for reporting and testing.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix timer race in dst GC code
Dmitry Mishin [Fri, 17 Nov 2006 16:53:07 +0000 (17:53 +0100)]
Fix timer race in dst GC code

Replace add_timer() by mod_timer() in dst_run_gc
in order to avoid BUG message.

   CPU1                            CPU2
dst_run_gc()  entered           dst_run_gc() entered
spin_lock(&dst_lock)                   .....
del_timer(&dst_gc_timer)         fail to get lock
   ....                         mod_timer() <--- puts
                                             timer back
                                             to the list
add_timer(&dst_gc_timer) <--- BUG because timer is in list already.

Found during OpenVZ internal testing.

At first we thought that it is OpenVZ specific as we
added dst_run_gc(0) call in dst_dev_event(),
but as Alexey pointed to me it is possible to trigger
this condition in mainstream kernel.

F.e. timer has fired on CPU2, but the handler was preeempted
by an irq before dst_lock is tried.
Meanwhile, someone on CPU1 adds an entry to gc list and
starts the timer.
If CPU2 was preempted long enough, this timer can expire
simultaneously with resuming timer handler on CPU1, arriving
exactly to the situation described.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoext3 -nobh option causes oops
Badari Pulavarty [Fri, 17 Nov 2006 16:47:22 +0000 (17:47 +0100)]
ext3 -nobh option causes oops

For files other than IFREG, nobh option doesn't make sense.  Modifications
to them are journalled and needs buffer heads to do that.  Without this
patch, we get kernel oops in page_buffers().

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoipmi_si_intf.c: fix "&& 0xff" typos
Alexey Dobriyan [Fri, 17 Nov 2006 16:44:46 +0000 (17:44 +0100)]
ipmi_si_intf.c: fix "&& 0xff" typos

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosecurity/seclvl.c: fix time wrap (CVE-2005-4352)
Adrian Bunk [Fri, 17 Nov 2006 16:42:43 +0000 (17:42 +0100)]
security/seclvl.c: fix time wrap (CVE-2005-4352)

initlvl=2 in seclvl gives the guarantee
"Cannot decrement the system time".

But it was possible to set the time to the maximum unixtime value
(19 Jan 2038) resulting in a wrap to the minimum value.

This patch fixes this by disallowing setting the time to any date
after 2030 with initlvl=2.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosynclink_gt fix receive tty error handling
Paul Fulghum [Thu, 16 Nov 2006 23:13:41 +0000 (00:13 +0100)]
synclink_gt fix receive tty error handling

Fix receive tty error handling in synclink_gt driver.
Adrian reported compiler warning for incorrect bit test
against char variable. I determined these and other
device specific error bits were incorrectly defined.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agofix via586 irq routing for pirq 5
Daniel Ritz [Wed, 15 Nov 2006 16:07:33 +0000 (17:07 +0100)]
fix via586 irq routing for pirq 5

fix interrput routing for via 586 bridges. pirq can be 5 which needs to be
mapped to INTD. but currently the access functions can handle only pirq 1-4.
this is similar to the other via chipsets where pirq 4 and 5 are both mapped
to INTD. fixes bugzilla #7490

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosata_promise: Support FastTrak TX4300/TX4310
Daniel Drake [Wed, 15 Nov 2006 15:26:16 +0000 (16:26 +0100)]
sata_promise: Support FastTrak TX4300/TX4310

This patch adds support for the Promise FastTrak TX4300/TX4310 4-port PCI SATA
controllers based on the PDC40719 chip.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoReduce ACPI verbosity on null handle condition
Bob Moore [Wed, 15 Nov 2006 15:20:37 +0000 (16:20 +0100)]
Reduce ACPI verbosity on null handle condition

As detailed at http://bugs.gentoo.org/131534 :

2.6.16 converted many ACPI debug messages into error or warning
messages. One extraneous message was incorrectly converted, resulting in
logs being flooded by "Handle is NULL and Pathname is relative" messages
on some systems.

This patch (part of a larger ACPICA commit) converts the message back to
debug level.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoLinux 2.6.16.32 v2.6.16.32
Adrian Bunk [Wed, 15 Nov 2006 10:38:39 +0000 (11:38 +0100)]
Linux 2.6.16.32

17 years agoLinux 2.6.16.32-rc1 v2.6.16.32-rc1
Adrian Bunk [Sat, 11 Nov 2006 11:16:36 +0000 (12:16 +0100)]
Linux 2.6.16.32-rc1

17 years agoFix longstanding load balancing bug in the scheduler
Christoph Lameter [Sat, 11 Nov 2006 11:13:53 +0000 (12:13 +0100)]
Fix longstanding load balancing bug in the scheduler

The scheduler will stop load balancing if the most busy processor contains
processes pinned via processor affinity.

The scheduler currently only does one search for busiest cpu.  If it cannot
pull any tasks away from the busiest cpu because they were pinned then the
scheduler goes into a corner and sulks leaving the idle processors idle.

F.e.  If you have processor 0 busy running four tasks pinned via taskset,
there are none on processor 1 and one just started two processes on
processor 2 then the scheduler will not move one of the two processes away
from processor 2.

This patch fixes that issue by forcing the scheduler to come out of its
corner and retrying the load balancing by considering other processors for
load balancing.

This patch was originally developed by John Hawkes and discussed at

    http://marc.theaimsgroup.com/?l=linux-kernel&m=113901368523205&w=2.

I have removed extraneous material and gone back to equipping struct rq
with the cpu the queue is associated with since this makes the patch much
easier and it is likely that others in the future will have the same
difficulty of figuring out which processor owns which runqueue.

The overhead added through these patches is a single word on the stack if
the kernel is configured to support 32 cpus or less (32 bit).  For 32 bit
environments the maximum number of cpus that can be configued is 255 which
would result in the use of 32 bytes additional on the stack.  On IA64 up to
1k cpus can be configured which will result in the use of 128 additional
bytes on the stack.  The maximum additional cache footprint is one
cacheline.  Typically memory use will be much less than a cacheline and the
additional cpumask will be placed on the stack in a cacheline that already
contains other local variable.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosata_sil24: add a new PCI ID for SiI 3124
Tejun Heo [Sat, 11 Nov 2006 10:34:49 +0000 (11:34 +0100)]
sata_sil24: add a new PCI ID for SiI 3124

Add a new PCI ID for SiI 3124.  Reported by Silicon Image.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoia64/sparc: fix local DoS with corrupted ELFs (CVE-2006-4538)
Kirill Korotaev [Sat, 11 Nov 2006 00:08:49 +0000 (01:08 +0100)]
ia64/sparc: fix local DoS with corrupted ELFs (CVE-2006-4538)

This patch prevents cross-region mappings
on IA64 and SPARC which could lead to system crash.

Adrian Bunk:
Adapted to 2.6.16.

Signed-Off-By: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agonvidia fbdev: fix powerpc xmon scribbles
Paul Mackerras [Fri, 10 Nov 2006 23:28:30 +0000 (00:28 +0100)]
nvidia fbdev: fix powerpc xmon scribbles

xmon writes garbage on the screen because the nvidia console driver has
changed the line pitch from what the firmware set it to.  Fix it by making
the nvidia driver inform the btext engine (which xmon uses if the screen is
its output device) about changes to display resolution.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[POWERPC] Fix return value from memcpy
Paul Mackerras [Fri, 10 Nov 2006 23:17:57 +0000 (00:17 +0100)]
[POWERPC] Fix return value from memcpy

As pointed out by Herbert Xu <herbert@gondor.apana.org.au>, our
memcpy implementation didn't return the destination pointer as its
return value, and there is code in the kernel that expects that.
This fixes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[NET]: Update frag_list in pskb_trim
Herbert Xu [Fri, 10 Nov 2006 23:15:10 +0000 (00:15 +0100)]
[NET]: Update frag_list in pskb_trim

When pskb_trim has to defer to ___pksb_trim to trim the frag_list part of
the packet, the frag_list is not updated to reflect the trimming.  This
will usually work fine until you hit something that uses the packet length
or tail from the frag_list.

Examples include esp_output and ip_fragment.

Another problem caused by this is that you can end up with a linear packet
with a frag_list attached.

It is possible to get away with this if we audit everything to make sure
that they always consult skb->len before going down onto frag_list.  In
fact we can do the samething for the paged part as well to avoid copying
the data area of the skb.  For now though, let's do the conservative fix
and update frag_list.

Many thanks to Marco Berizzi for helping me to track down this bug.

This 4-year old bug took 3 months to track down.  Marco was very patient
indeed :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoscx200_acb: Fix the block transactions
Jean Delvare [Fri, 10 Nov 2006 23:13:32 +0000 (00:13 +0100)]
scx200_acb: Fix the block transactions

The scx200_acb i2c bus driver pretends to support SMBus block
transactions, but in fact it implements the more simple I2C block
transactions. Additionally, it lacks sanity checks on the length
of the block transactions, which could lead to a buffer overrun.

This fixes an oops reported by Alexander Atanasov:
http://marc.theaimsgroup.com/?l=linux-kernel&m=114970382125094

Thanks to Ben Gardner for fixing my bugs :)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix the scx200_acb state machine:
Thomas Andrews [Fri, 10 Nov 2006 23:09:25 +0000 (00:09 +0100)]
Fix the scx200_acb state machine:

* Nack was sent one byte too late on reads >= 2 bytes.
* Stop bit was set one byte too late on reads.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodrivers/video/nvidia/nvidia.c: Add ID for Quadro NVS280
Pavel Roskin [Thu, 9 Nov 2006 11:00:26 +0000 (12:00 +0100)]
drivers/video/nvidia/nvidia.c: Add ID for Quadro NVS280

Quadro NVS280 is a dual-head PCIe card with PCI ID 10de:00fd and subsystem I
10de:0215.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[DISKLABEL] SUN: Fix signed int usage for sector count
Jeff Mahoney [Thu, 9 Nov 2006 10:31:23 +0000 (11:31 +0100)]
[DISKLABEL] SUN: Fix signed int usage for sector count

The current sun disklabel code uses a signed int for the sector count.
When partitions larger than 1 TB are used, the cast to a sector_t causes
the partition sizes to be invalid:

 # cat /proc/paritions | grep sdan
   66   112 2146435072 sdan
   66   115 9223372036853660736 sdan3
   66   120 9223372036853660736 sdan8

This patch switches the sector count to an unsigned int to fix this.

Eric Sandeen also submitted the same patch.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[NET]: __alloc_pages() failures reported due to fragmentation
Larry Woodman [Thu, 9 Nov 2006 10:05:38 +0000 (11:05 +0100)]
[NET]: __alloc_pages() failures reported due to fragmentation

We have seen a couple of __alloc_pages() failures due to
fragmentation, there is plenty of free memory but no large order pages
available.  I think the problem is in sock_alloc_send_pskb(), the
gfp_mask includes __GFP_REPEAT but its never used/passed to the page
allocator.  Shouldnt the gfp_mask be passed to alloc_skb() ?

Signed-off-by: Larry Woodman <lwoodman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[NET]: Set truesize in pskb_copy
Herbert Xu [Thu, 9 Nov 2006 10:03:56 +0000 (11:03 +0100)]
[NET]: Set truesize in pskb_copy

Since pskb_copy tacks on the non-linear bits from the original
skb, it needs to count them in the truesize field of the new skb.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[TCP]: Don't use highmem in tcp hash size calculation.
John Heffner [Thu, 9 Nov 2006 10:01:54 +0000 (11:01 +0100)]
[TCP]: Don't use highmem in tcp hash size calculation.

This patch removes consideration of high memory when determining TCP
hash table sizes.  Taking into account high memory results in tcp_mem
values that are too large.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[AGPGART] remove unused variable
Adrian Bunk [Thu, 9 Nov 2006 08:54:54 +0000 (09:54 +0100)]
[AGPGART] remove unused variable

This patch removes an unused variable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[AGPGART] Suspend/Resume support for nVidia nForce AGP.
Dave Jones [Thu, 9 Nov 2006 08:53:22 +0000 (09:53 +0100)]
[AGPGART] Suspend/Resume support for nVidia nForce AGP.

Based on a patch from the Ubuntu kernel.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodrivers/telephony/ixj: fix an array overrun
Adrian Bunk [Thu, 9 Nov 2006 08:52:07 +0000 (09:52 +0100)]
drivers/telephony/ixj: fix an array overrun

The Coverity checker noted that in
drivers/telephony/ixj.c:ixj_build_filter_cadence(), filter_en[4] or
filter_en[5] could be written to.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agonvidiafb: Add support for Geforce 6100 and related chipsets
Antonino Daplas [Wed, 8 Nov 2006 08:08:58 +0000 (09:08 +0100)]
nvidiafb: Add support for Geforce 6100 and related chipsets

Add support for Geforce 6100 and related chipsets (PCI device id 0x024x)

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodrivers/md/md.c: update START_ARRAY printk
Adrian Bunk [Wed, 8 Nov 2006 07:19:14 +0000 (08:19 +0100)]
drivers/md/md.c: update START_ARRAY printk

START_ARRAY will not be removed in 2.6.16, therefore replace the date
reference with a kernel version reference.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoremove Documentation/feature-removal-schedule.txt
Adrian Bunk [Wed, 8 Nov 2006 07:14:17 +0000 (08:14 +0100)]
remove Documentation/feature-removal-schedule.txt

The information in Documentation/feature-removal-schedule.txt
doesn't apply to the 2.6.16 branch (and most dates were already
in the past.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPV4]: Limit rt cache size properly.
Kirill Korotaev [Wed, 8 Nov 2006 07:12:01 +0000 (08:12 +0100)]
[IPV4]: Limit rt cache size properly.

During OpenVZ stress testing we found that UDP traffic with random src
can generate too much excessive rt hash growing leading finally to OOM
and kernel panics.

It was found that for 4GB i686 system (having 1048576 total pages and
225280 normal zone pages) kernel allocates the following route hash:
syslog: IP route cache hash table entries: 262144 (order: 8, 1048576
bytes) => ip_rt_max_size = 4194304 entries, i.e.  max rt size is
4194304 * 256b = 1Gb of RAM > normal_zone

Attached the patch which removes HASH_HIGHMEM flag from
alloc_large_system_hash() call.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoDon't allow chmod() on the /proc/<pid>/ files
Marcel Holtmann [Wed, 8 Nov 2006 07:10:30 +0000 (08:10 +0100)]
Don't allow chmod() on the /proc/<pid>/ files

This just turns off chmod() on the /proc/<pid>/ files, since there is no
good reason to allow it, and had we disallowed it originally, the nasty
/proc race exploit wouldn't have been possible.

The other patches already fixed the problem chmod() could cause, so this
is really just some final mop-up..

This particular version is based off a patch by Eugene and Marcel which
had much better naming than my original equivalent one.

Signed-off-by: Eugene Teo <eteo@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agofbdev: correct buffer size limit in fbmem_read_proc()
Geert Uytterhoeven [Wed, 8 Nov 2006 06:48:45 +0000 (07:48 +0100)]
fbdev: correct buffer size limit in fbmem_read_proc()

Address http://bugzilla.kernel.org/show_bug.cgi?id=7189

It should check `clen', not `len'.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[NET]: Add missing UFO initialisations
Herbert Xu [Wed, 8 Nov 2006 06:47:29 +0000 (07:47 +0100)]
[NET]: Add missing UFO initialisations

This bug was unknowingly fixed the GSO patches (or rather, its effect was
unknown at the time).

Thanks to Marco Berizzi's persistence which is documented in the thread
"ipsec tunnel asymmetrical mtu", we now know that it can have highly
non-obvious symptoms.

What happens is that uninitialised uso_size fields can cause packets to
be incorrectly identified as UFO, which means that it does not get
fragmented even if it's over the MTU.

The fix is simple enough.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago from mm/memory.c:
Dmitriy Monakhov [Tue, 7 Nov 2006 14:40:54 +0000 (15:40 +0100)]
 from mm/memory.c:
  1434  static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va)
  1435  {
  1436          /*
  1437           * If the source page was a PFN mapping, we don't have
  1438           * a "struct page" for it. We do a best-effort copy by
  1439           * just copying from the original user address. If that
  1440           * fails, we just zero-fill it. Live with it.
  1441           */
  1442          if (unlikely(!src)) {
  1443                  void *kaddr = kmap_atomic(dst, KM_USER0);
  1444                  void __user *uaddr = (void __user *)(va & PAGE_MASK);
  1445
  1446                  /*
  1447                   * This really shouldn't fail, because the page is there
  1448                   * in the page tables. But it might just be unreadable,
  1449                   * in which case we just give up and fill the result with
  1450                   * zeroes.
  1451                   */
  1452                  if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE))
  1453                          memset(kaddr, 0, PAGE_SIZE);
  1454                  kunmap_atomic(kaddr, KM_USER0);
  #### D-cache have to be flushed here.
  #### It seems it is just forgotten.

  1455                  return;
  1456
  1457          }
  1458          copy_user_highpage(dst, src, va);
  #### Ok here. flush_dcache_page() called from this func if arch need it
  1459  }

Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[MAINTAINERS]: Add proper entry for TC classifier
Stephen Hemminger [Tue, 7 Nov 2006 14:36:32 +0000 (15:36 +0100)]
[MAINTAINERS]: Add proper entry for TC classifier

Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[PKT_SCHED]: act_api: Fix module leak while flushing actions
Thomas Graf [Tue, 7 Nov 2006 14:34:27 +0000 (15:34 +0100)]
[PKT_SCHED]: act_api: Fix module leak while flushing actions

Module reference needs to be given back if message header
construction fails.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPKT_SCHED: Return ENOENT if action module is unavailable
Thomas Graf [Tue, 7 Nov 2006 14:32:51 +0000 (15:32 +0100)]
PKT_SCHED: Return ENOENT if action module is unavailable

Return ENOENT if action module is unavailable

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPKT_SCHED: Fix illegal memory dereferences when dumping actions
Thomas Graf [Tue, 7 Nov 2006 14:31:14 +0000 (15:31 +0100)]
PKT_SCHED: Fix illegal memory dereferences when dumping actions

The TCA_ACT_KIND attribute is used without checking its
availability when dumping actions therefore leading to a
value of 0x4 being dereferenced.

The use of strcmp() in tc_lookup_action_n() isn't safe
when fed with string from an attribute without enforcing
proper NUL termination.

Both bugs can be triggered with malformed netlink message
and don't require any privileges.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPKT_SCHED: Fix error handling while dumping actions
Thomas Graf [Tue, 7 Nov 2006 14:30:21 +0000 (15:30 +0100)]
PKT_SCHED: Fix error handling while dumping actions

"return -err" and blindly inheriting the error code in the netlink
failure exception handler causes errors codes to be returned as
positive value therefore making them being ignored by the caller.

May lead to sending out incomplete netlink messages.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[PATCH] md: Make sure bi_max_vecs is set properly in bio_split
Neil Brown [Tue, 7 Nov 2006 14:25:48 +0000 (15:25 +0100)]
[PATCH] md: Make sure bi_max_vecs is set properly in bio_split

Else a subsequent bio_clone might make a mess.

Signed-off-by: Neil Brown <neilb@suse.de>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[CPUFREQ] Fix powernow-k8 SMP kernel on UP hardware bug.
Randy Dunlap [Tue, 7 Nov 2006 14:15:04 +0000 (15:15 +0100)]
[CPUFREQ] Fix powernow-k8 SMP kernel on UP hardware bug.

Fix powernow-k8 doesn't load bug.
Reference:
https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/35145

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[CPUFREQ] Make powernow-k7 work on SMP kernels.
Dave Jones [Tue, 7 Nov 2006 14:14:04 +0000 (15:14 +0100)]
[CPUFREQ] Make powernow-k7 work on SMP kernels.

Even though powernow-k7 doesn't work in SMP environments,
it can work on an SMP configured kernel if there's only
one CPU present, however recalibrate_cpu_khz was returning
-EINVAL on such kernels, so we failed to init the cpufreq driver.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoLinux 2.6.16.31 v2.6.16.31
Adrian Bunk [Tue, 7 Nov 2006 13:31:00 +0000 (14:31 +0100)]
Linux 2.6.16.31

17 years agoLinux 2.6.16.31-rc1 v2.6.16.31-rc1
Adrian Bunk [Sun, 5 Nov 2006 08:48:22 +0000 (09:48 +0100)]
Linux 2.6.16.31-rc1

17 years ago[NETFILTER]: Fix ip6_tables extension header bypass bug (CVE-2006-4572)
Patrick McHardy [Sun, 5 Nov 2006 08:04:23 +0000 (09:04 +0100)]
[NETFILTER]: Fix ip6_tables extension header bypass bug (CVE-2006-4572)

As reported by Mark Dowd <Mark_Dowd@McAfee.com>, ip6_tables is susceptible
to a fragmentation attack causing false negatives on extension header
matches.

When extension headers occur in the non-first fragment after the fragment
header (possibly with an incorrect nexthdr value in the fragment header)
a rule looking for this extension header will never match.

Drop fragments that are at offset 0 and don't contain the final protocol
header regardless of the ruleset, since this should not happen normally.
Since all extension headers are before the protocol header this makes sure
an extension header is either not present or in the first fragment, where
we can properly parse it.

With help from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[NETFILTER]: Fix ip6_tables protocol bypass bug (CVE-2006-4572)
Patrick McHardy [Sun, 5 Nov 2006 08:03:48 +0000 (09:03 +0100)]
[NETFILTER]: Fix ip6_tables protocol bypass bug (CVE-2006-4572)

As reported by Mark Dowd <Mark_Dowd@McAfee.com>, ip6_tables is susceptible
to a fragmentation attack causing false negatives on protocol matches.

When the protocol header doesn't follow the fragment header immediately,
the fragment header contains the protocol number of the next extension
header. When the extension header and the protocol header are sent in
a second fragment a rule like "ip6tables .. -p udp -j DROP" will never
match.

Drop fragments that are at offset 0 and don't contain the final protocol
header regardless of the ruleset, since this should not happen normally.

With help from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoknfsd: Fix race that can disable NFS server.
Neil Brown [Sun, 5 Nov 2006 08:03:18 +0000 (09:03 +0100)]
knfsd: Fix race that can disable NFS server.

This is a long standing bug that seems to have only recently become
apparent, presumably due to increasing use of NFS over TCP - many
distros seem to be making it the default.

The SK_CONN bit gets set when a listening socket may be ready
for an accept, just as SK_DATA is set when data may be available.

It is entirely possible for svc_tcp_accept to be called with neither
of these set.  It doesn't happen often but there is a small race in
svc_sock_enqueue as SK_CONN and SK_DATA are tested outside the
spin_lock.  They could be cleared immediately after the test and
before the lock is gained.

This normally shouldn't be a problem.  The sockets are non-blocking so
trying to read() or accept() when ther is nothing to do is not a problem.

However: svc_tcp_recvfrom makes the decision "Should I accept() or
should I read()" based on whether SK_CONN is set or not.  This usually
works but is not safe.  The decision should be based on whether it is
a TCP_LISTEN socket or a TCP_CONNECTED socket.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoposix-cpu-timers: prevent signal delivery starvation
Thomas Gleixner [Sun, 5 Nov 2006 08:02:46 +0000 (09:02 +0100)]
posix-cpu-timers: prevent signal delivery starvation

The integer divisions in the timer accounting code can round the result
down to 0.  Adding 0 is without effect and the signal delivery stops.

Clamp the division result to minimum 1 to avoid this.

Problem was reported by Seongbae Park <spark@google.com>, who provided
also an inital patch.

Roland sayeth:

  I have had some more time to think about the problem, and to reproduce it
  using Toyo's test case.  For the record, if my understanding of the problem
  is correct, this happens only in one very particular case.  First, the
  expiry time has to be so soon that in cputime_t units (usually 1s/HZ ticks)
  it's < nthreads so the division yields zero.  Second, it only affects each
  thread that is so new that its CPU time accumulation is zero so now+0 is
  still zero and ->it_*_expires winds up staying zero.  For the VIRT and PROF
  clocks when cputime_t is tick granularity (or the SCHED clock on
  configurations where sched_clock's value only advances on clock ticks), this
  is not hard to arrange with new threads starting up and blocking before they
  accumulate a whole tick of CPU time.  That's what happens in Toyo's test
  case.

  Note that in general it is fine for that division to round down to zero,
  and set each thread's expiry time to its "now" time.  The problem only
  arises with thread's whose "now" value is still zero, so that now+0 winds up
  0 and is interpreted as "not set" instead of ">= now".  So it would be a
  sufficient and more precise fix to just use max(ticks, 1) inside the loop
  when setting each it_*_expires value.

  But, it does no harm to round the division up to one and always advance
  every thread's expiry time.  If the thread didn't already fire timers for
  the expiry time of "now", there is no expectation that it will do so before
  the next tick anyway.  So I followed Thomas's patch in lifting the max out
  of the loops.

  This patch also covers the reload cases, which are harder to write a test
  for (and I didn't try).  I've tested it with Toyo's case and it fixes that.

[toyoa@mvista.com: fix: min_t -> max_t]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPV6]: fix lockup via /proc/net/ip6_flowlabel (CVE-2006-5619)
James Morris [Sun, 5 Nov 2006 08:00:45 +0000 (09:00 +0100)]
[IPV6]: fix lockup via /proc/net/ip6_flowlabel (CVE-2006-5619)

There's a bug in the seqfile handling for /proc/net/ip6_flowlabel, where,
after finding a flowlabel, the code will loop forever not finding any
further flowlabels, first traversing the rest of the hash bucket then just
looping.

This patch fixes the problem by breaking after the hash bucket has been
traversed.

Note that this bug can cause lockups and oopses, and is trivially invoked
by an unpriveleged user.

Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoACPI: enable SMP C-states on x86_64
Shaohua Li [Sun, 5 Nov 2006 07:23:24 +0000 (08:23 +0100)]
ACPI: enable SMP C-states on x86_64

http://bugzilla.kernel.org/show_bug.cgi?id=5653

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agofix RARP ic_servaddr breakage
Al Viro [Sun, 5 Nov 2006 07:15:37 +0000 (08:15 +0100)]
fix RARP ic_servaddr breakage

memcpy 4 bytes to address of auto unsigned long variable followed
by comparison with u32 is a bloody bad idea.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[S390] fix user readable uninitialised kernel memory, take 2.
Martin Schwidefsky [Sun, 5 Nov 2006 07:03:01 +0000 (08:03 +0100)]
[S390] fix user readable uninitialised kernel memory, take 2.

The previous patch to correct the copy_from_user padding is quite
broken. The execute instruction needs to be done via the register %r4,
not via %r2 and 31 bit doesn't know the instructions lgr and ahji.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[S390] fix user readable uninitialised kernel memory (CVE-2006-5174)
Martin Schwidefsky [Sun, 5 Nov 2006 07:01:53 +0000 (08:01 +0100)]
[S390] fix user readable uninitialised kernel memory (CVE-2006-5174)

A user space program can read uninitialised kernel memory
by appending to a file from a bad address and then reading
the result back. The cause is the copy_from_user function
that does not clear the remaining bytes of the kernel
buffer after it got a fault on the user space address.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoLinux 2.6.16.30 v2.6.16.30
Adrian Bunk [Thu, 2 Nov 2006 07:30:27 +0000 (08:30 +0100)]
Linux 2.6.16.30

17 years agoLinux 2.6.16.30-rc1 v2.6.16.30-rc1
Adrian Bunk [Tue, 17 Oct 2006 12:52:16 +0000 (14:52 +0200)]
Linux 2.6.16.30-rc1

17 years ago[IA64] correct file descriptor reference counting in perfmon (CVE-2006-3741)
Stephane Eranian [Tue, 17 Oct 2006 12:50:56 +0000 (14:50 +0200)]
[IA64] correct file descriptor reference counting in perfmon (CVE-2006-3741)

Fix a bug in sys_perfmonctl() whereby it was not correctly
decrementing the file descriptor reference count.

Signed-off-by: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[PPPOE]: Advertise PPPoE MTU
Michal Ostrowski [Sat, 14 Oct 2006 17:20:16 +0000 (19:20 +0200)]
[PPPOE]: Advertise PPPoE MTU

PPPoE must advertise the underlying device's MTU via the ppp channel
descriptor structure, as multilink functionality depends on it.

Signed-off-by: Michal Ostrowski <mostrows@earthlink.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPKT_SCHED: cls_basic: Use unsigned int when generating handle
Kim Nordlund [Sat, 14 Oct 2006 08:39:40 +0000 (10:39 +0200)]
PKT_SCHED: cls_basic: Use unsigned int when generating handle

Prevents filters from being added if the first generated
handle already exists.

Signed-off-by: Kim Nordlund <kim.nordlund@nokia.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SPARC64]: Kill bogus check from bootmem_init().
David S. Miller [Sat, 14 Oct 2006 08:35:26 +0000 (10:35 +0200)]
[SPARC64]: Kill bogus check from bootmem_init().

There is an ancient and totally incorrect sanity check being
done on the ramdisk location.  The check assumes that the
kernel is always loaded to physical address zero, which is
wrong.  It was trying to validate the ramdisk value by saying that
if it fell within the kernel image address range it must be wrong.

Anyways, kill this because it actually creates problems.  The
'ramdisk_image' should always be adjusted down by KERNBASE.
SILO can easily put the ramdisk in a location which causes
this test to trigger, breaking things.

[ Based almost entirely upon a patch from Ben Collins. ]

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[SPARC64]: Fix sched_clock() wrapping every ~17 seconds.
David S. Miller [Sat, 14 Oct 2006 08:33:10 +0000 (10:33 +0200)]
[SPARC64]: Fix sched_clock() wrapping every ~17 seconds.

Unfortunately, sparc64 doesn't have an easy way to do a "64 X 64 -->
128" bit multiply like PowerPC and IA64 do.  We were doing a
"64 X 64 --> 64" bit multiple which causes overflow very quickly with
a 30-bit quotient shift.

So use a quotientshift count of 10 instead of 30, just like x86 and
ARM do.

This also fixes the wrapping of printk timestamp values every ~17
seconds.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>