]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
17 years agoLinux 2.6.16.36-rc1 v2.6.16.36-rc1
Adrian Bunk [Sat, 9 Dec 2006 15:23:02 +0000 (16:23 +0100)]
Linux 2.6.16.36-rc1

17 years agobinfmt_elf: fix checks for bad address
Chuck Ebbert [Sat, 9 Dec 2006 15:21:59 +0000 (16:21 +0100)]
binfmt_elf: fix checks for bad address

Fix check for bad address; use macro instead of open-coding two checks.

Taken from RHEL4 kernel update.

From: Ernie Petrides <petrides@redhat.com>

  For background, the BAD_ADDR() macro should return TRUE if the address is
  TASK_SIZE, because that's the lowest address that is *not* valid for
  user-space mappings.  The macro was correct in binfmt_aout.c but was wrong
  for the "equal to" case in binfmt_elf.c.  There were two in-line validations
  of user-space addresses in binfmt_elf.c, which have been appropriately
  converted to use the corrected BAD_ADDR() macro in the patch you posted
  yesterday.  Note that the size checks against TASK_SIZE are okay as coded.

  The additional changes that I propose are below.  These are in the error
  paths for bad ELF entry addresses once load_elf_binary() has already
  committed to exec'ing the new image (following the tearing down of the
  task's original address space).

  The 1st hunk deals with the interp-side of the outer "if".  There were two
  problems here.  The printk() should be removed because this path can be
  triggered at will by a bogus interpreter image created and used by a
  malicious user.  Further, the error code should not be ENOEXEC, because that
  causes the loop in search_binary_handler() to continue trying other exec
  handlers (twice, in fact).  But it's too late for this to work correctly,
  because the user address space has already been torn down, and an exec()
  failure cannot be returned to the user code because the code no longer
  exists.  The only recovery is to force a SIGSEGV, but it's best to terminate
  the search loop immediately.  I somewhat arbitrarily chose EINVAL as a
  fallback error code, but any error returned by load_elf_interp() will
  override that (but this value will never be seen by user-space).

  The 2nd hunk deals with the non-interp-side of the outer "if".  There were
  two problems here as well.  The SIGSEGV needs to be forced, because a prior
  sigaction() syscall might have set the associated disposition to SIG_IGN.
  And the ENOEXEC should be changed to EINVAL as described above.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.
David S. Miller [Sat, 9 Dec 2006 15:16:56 +0000 (16:16 +0100)]
[IPSEC]: Fix inetpeer leak in ipv4 xfrm dst entries.

We grab a reference to the route's inetpeer entry but
forget to release it in xfrm4_dst_destroy().

Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[XFRM]: Use output device disable_xfrm for forwarded packets
Patrick McHardy [Sat, 9 Dec 2006 15:14:39 +0000 (16:14 +0100)]
[XFRM]: Use output device disable_xfrm for forwarded packets

Currently the behaviour of disable_xfrm is inconsistent between
locally generated and forwarded packets. For locally generated
packets disable_xfrm disables the policy lookup if it is set on
the output device, for forwarded traffic however it looks at the
input device. This makes it impossible to disable xfrm on all
devices but a dummy device and use normal routing to direct
traffic to that device.

Always use the output device when checking disable_xfrm.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agorevert the quirk_via_irq changes
Adrian Bunk [Fri, 8 Dec 2006 16:00:35 +0000 (17:00 +0100)]
revert the quirk_via_irq changes

This patch reverts the quirk_via_irq changes in 2.6.16.17 that
caused regressions for several people.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPCI: add ICH7/8 ACPI/GPIO io resource quirks
Daniel Ritz [Wed, 6 Dec 2006 19:36:32 +0000 (20:36 +0100)]
PCI: add ICH7/8 ACPI/GPIO io resource quirks

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPCI: fix ICH6 quirks
Daniel Ritz [Wed, 6 Dec 2006 19:19:36 +0000 (20:19 +0100)]
PCI: fix ICH6 quirks

- add the ICH6(R) LPC to the ICH6 ACPI quirks.  currently only the ICH6-M
  is handled.  [ PCI_DEVICE_ID_INTEL_ICH6_1 is the ICH6-M LPC, ICH6_0 is
  the ICH6(R) ]

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPCI: Unhide the SMBus on Asus PU-DLS
Jean Delvare [Wed, 6 Dec 2006 19:18:09 +0000 (20:18 +0100)]
PCI: Unhide the SMBus on Asus PU-DLS

Unhide the SMBus controller on the Asus PU-DLS board.
This fixes bug #6763.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPCI: quirk to disable e100 interrupt if RESET failed to
Bjorn Helgaas [Wed, 6 Dec 2006 19:17:30 +0000 (20:17 +0100)]
PCI: quirk to disable e100 interrupt if RESET failed to

Without this quirk, e100 can be pulling on a shared
interrupt line when another device (eg. USB) loads,
causing the interrupt to scream and get disabled.

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

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoAdd PIIX4 APCI quirk for the 440MX chipset too
Linus Torvalds [Wed, 6 Dec 2006 19:16:59 +0000 (20:16 +0100)]
Add PIIX4 APCI quirk for the 440MX chipset too

This is confirmed to fix a hang due to PCI resource conflicts with
setting up the Cardbus bridge on old laptops with the 440MX chipsets.
Original report by Alessio Sangalli, lspci debugging help by Pekka
Enberg, and trial patch suggested by Daniel Ritz:

  "From the docs available i would _guess_ this thing is really similar
   to the 82443BX/82371AB combination.  at least the SMBus base address
   register is hidden at the very same place (32bit at 0x90 in function
   3 of the "south" brigde)"

The dang thing is largely undocumented, but the patch was corroborated
by Asit Mallick:

 "I am trying to find the register information. 440MX is an integration of
  440BX north-bridge without AGP and PIIX4E (82371EB).  PIIX4 quirk
  should cover the ACPI and SMBus related I/O registers."

and verified to fix the problem by Alessio.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoPCI: nVidia quirk to make AER PCI-E extended capability visible
Brice Goglin [Wed, 6 Dec 2006 19:15:55 +0000 (20:15 +0100)]
PCI: nVidia quirk to make AER PCI-E extended capability visible

The nVidia CK804 PCI-E chipset supports the AER extended capability
but sometimes fails to link it (with some BIOS or after a warm reboot).
It makes the AER cap invisible to pci_find_ext_capability().

The patch adds a quirk to set the missing bit that controls the
linking of the capability.
By the way, it removes the corresponding code in the myri10ge driver.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agopci_ids.h: correct naming of 1022:7450 (AMD 8131 Bridge)
John W. Linville [Wed, 6 Dec 2006 18:06:04 +0000 (19:06 +0100)]
pci_ids.h: correct naming of 1022:7450 (AMD 8131 Bridge)

The naming of the constant defined for PCI ID 1022:7450 does not seem
to match the information at http://pciids.sourceforge.net/:

    http://pci-ids.ucw.cz/iii/?i=1022

There 1022:7450 is listed as "AMD-8131 PCI-X Bridge" while 1022:7451
is listed as "AMD-8131 PCI-X IOAPIC".  Yet, the current definition for
0x7450 is PCI_DEVICE_ID_AMD_8131_APIC.      It seems to me like that name
should map to 0x7451, while a name like PCI_DEVICE_ID_AMD_8131_BRIDGE
should map to 0x7450.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix mempolicy.h build error
Ralf Baechle [Wed, 6 Dec 2006 17:49:53 +0000 (18:49 +0100)]
Fix mempolicy.h build error

<linux/mempolicy.h> uses struct mm_struct and relies on a definition or
declaration somehow magically being dragged in which may result in a
build:

  CC      mm/mempolicy.o
In file included from mm/mempolicy.c:69:
include/linux/mempolicy.h:150: warning: 'struct mm_struct' declared inside parameter list
include/linux/mempolicy.h:150: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/mempolicy.h:174: warning: 'struct mm_struct' declared inside parameter list
mm/mempolicy.c:673: error: conflicting types for 'do_migrate_pages'
include/linux/mempolicy.h:174: error: previous declaration of 'do_migrate_pages' was here
mm/mempolicy.c:1696: error: conflicting types for 'mpol_rebind_mm'
include/linux/mempolicy.h:150: error: previous declaration of 'mpol_rebind_mm' was here
make[1]: *** [mm/mempolicy.o] Error 1
make: *** [mm] Error 2
$

Including <linux/sched.h> is a step into direction of include hell so
fixed by adding a forward declaration of struct mm_struct instead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoLinux 2.6.16.35 v2.6.16.35
Adrian Bunk [Wed, 6 Dec 2006 17:38:58 +0000 (18:38 +0100)]
Linux 2.6.16.35

17 years agoLinux 2.6.16.35-rc1 v2.6.16.35-rc1
Adrian Bunk [Mon, 4 Dec 2006 18:45:53 +0000 (19:45 +0100)]
Linux 2.6.16.35-rc1

17 years agobridge: fix possible overflow in get_fdb_entries (CVE-2006-5751)
Chris Wright [Mon, 4 Dec 2006 18:44:59 +0000 (19:44 +0100)]
bridge: fix possible overflow in get_fdb_entries (CVE-2006-5751)

Make sure to properly clamp maxnum to avoid overflow (CVE-2006-5751).

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Stephen Hemminger <shemminger@osdl.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agofcntl(F_SETSIG) fix
Trond Myklebust [Mon, 4 Dec 2006 18:43:11 +0000 (19:43 +0100)]
fcntl(F_SETSIG) fix

fcntl(F_SETSIG) no longer works on leases because
lease_release_private_callback() gets called as the lease is copied in
order to initialise it.

The problem is that lease_alloc() performs an unnecessary initialisation,
which sets the lease_manager_ops.  Avoid the problem by allocating the
target lease structure using locks_alloc_lock().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agocciss: fix iostat
Jens Axboe [Mon, 4 Dec 2006 13:30:27 +0000 (14:30 +0100)]
cciss: fix iostat

cciss needs to call disk_stat_add() for iostat to work.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agocpqarray: fix iostat
Jens Axboe [Mon, 4 Dec 2006 13:29:45 +0000 (14:29 +0100)]
cpqarray: fix iostat

cpqarray needs to call disk_stat_add() for iostat to work.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoalim15x3.c: M5229 (rev c8) support for DMA cd-writer
Michael De Backer [Mon, 4 Dec 2006 13:24:41 +0000 (14:24 +0100)]
alim15x3.c: M5229 (rev c8) support for DMA cd-writer

Configuration bits are not set properly for DMA on some chipset revisions.
It has already been corrected for M5229 (rev c7) but not for M5229 (rev
c8).  This leads to the bug described at
http://bugzilla.kernel.org/show_bug.cgi?id=5786 (lost interrupt + ide bus
hangs).

Signed-off-by: Michael De Backer <micdb@skynet.be>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoalpha: Fix ALPHA_EV56 dependencies typo
Fernando J. Pereda [Mon, 4 Dec 2006 13:21:29 +0000 (14:21 +0100)]
alpha: Fix ALPHA_EV56 dependencies typo

There appears to be a typo in the EV56 config option. NORITAKE and PRIMO are
be able to set a variation of either.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoChar: isicom, fix close bug
Jiri Slaby [Mon, 4 Dec 2006 13:06:36 +0000 (14:06 +0100)]
Char: isicom, fix close bug

port is dereferenced even if it is NULL.  Dereference it _after_ the
check if (!port)...  Thanks Eric <ef87@yahoo.com> for reporting this.

This fixes

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

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoInput: logips2pp - fix button mapping for MX300
Roberto Castagnola [Mon, 4 Dec 2006 13:02:47 +0000 (14:02 +0100)]
Input: logips2pp - fix button mapping for MX300

MX300 does not have an EXTRA_BTN - it is a simple wheel mouse with
an additional task-switcher button, which is reported as side button
(and not task button).

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoInput: psmouse - add detection of Logitech TrackMan Wheel trackball
Zbigniew Luszpinski [Mon, 4 Dec 2006 13:01:50 +0000 (14:01 +0100)]
Input: psmouse - add detection of Logitech TrackMan Wheel trackball

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoRemove redundant up() in stop_machine()
Zhou Yingchao [Mon, 4 Dec 2006 12:58:06 +0000 (13:58 +0100)]
Remove redundant up() in stop_machine()

An up() is called in kernel/stop_machine.c on failure, and also in the
caller (unconditionally).

Signed-off-by: Zhou Yingchao <yingchao.zhou@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[EBTABLES]: Prevent wraparounds in checks for entry components' sizes.
Al Viro [Mon, 4 Dec 2006 12:13:23 +0000 (13:13 +0100)]
[EBTABLES]: Prevent wraparounds in checks for entry components' sizes.

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[EBTABLES]: Deal with the worst-case behaviour in loop checks.
Al Viro [Mon, 4 Dec 2006 12:12:43 +0000 (13:12 +0100)]
[EBTABLES]: Deal with the worst-case behaviour in loop checks.

No need to revisit a chain we'd already finished with during
the check for current hook.  It's either instant loop (which
we'd just detected) or a duplicate work.

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[EBTABLES]: Verify that ebt_entries have zero ->distinguisher.
Al Viro [Mon, 4 Dec 2006 12:12:06 +0000 (13:12 +0100)]
[EBTABLES]: Verify that ebt_entries have zero ->distinguisher.

We need that for iterator to work; existing check had been too weak.

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[EBTABLES]: Fix wraparounds in ebt_entries verification.
Al Viro [Mon, 4 Dec 2006 12:11:24 +0000 (13:11 +0100)]
[EBTABLES]: Fix wraparounds in ebt_entries verification.

We need to verify that
    a) we are not too close to the end of buffer to dereference
    b) next entry we'll be checking won't be _before_ our

While we are at it, don't subtract unrelated pointers...

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[NET_SCHED]: policer: restore compatibility with old iproute binaries
Patrick McHardy [Mon, 4 Dec 2006 11:46:48 +0000 (12:46 +0100)]
[NET_SCHED]: policer: restore compatibility with old iproute binaries

The tc actions increased the size of struct tc_police, which broke
compatibility with old iproute binaries since both the act_police
and the old NET_CLS_POLICE code check for an exact size match.

Since the new members are not even used, the simple fix is to also
accept the size of the old structure. Dumping is not affected since
old userspace will receive a bigger structure, which is handled fine.

Signed-off-by: Patrick McHardy <kaber@trash.net>
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_gact: division by zero
Kim Nordlund [Mon, 4 Dec 2006 11:44:22 +0000 (12:44 +0100)]
[PKT_SCHED] act_gact: division by zero

Not returning -EINVAL, because someone might want to use the value
zero in some future gact_prob algorithm?

Signed-off-by: Kim Nordlund <kim.nordlund@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoJFS: pageno needs to be long
Dave Kleikamp [Mon, 4 Dec 2006 11:40:56 +0000 (12:40 +0100)]
JFS: pageno needs to be long

diRead and diWrite are representing the page number as an unsigned int.
This causes file system corruption on volumes larger than 16TB.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[IPV6]: Fix address/interface handling in UDP and DCCP, according to the scoping...
YOSHIFUJI Hideaki [Mon, 4 Dec 2006 11:20:41 +0000 (12:20 +0100)]
[IPV6]: Fix address/interface handling in UDP and DCCP, according to the scoping architecture.

TCP and RAW do not have this issue.  Closes Bug #7432.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoremove garbage the sneaked into the ext3 fix
Adrian Bunk [Mon, 4 Dec 2006 11:18:43 +0000 (12:18 +0100)]
remove garbage the sneaked into the ext3 fix

Spotted by Thomas Voegtle.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agofreevxfs: Add missing lock_kernel() to vxfs_readdir
Josh Triplett [Wed, 29 Nov 2006 13:26:18 +0000 (14:26 +0100)]
freevxfs: Add missing lock_kernel() to vxfs_readdir

Commit 7b2fd697427e73c81d5fa659efd91bd07d303b0e in the historical GIT tree
stopped calling the readdir member of a file_operations struct with the big
kernel lock held, and fixed up all the readdir functions to do their own
locking.  However, that change added calls to unlock_kernel() in
vxfs_readdir, but no call to lock_kernel().  Fix this by adding a call to
lock_kernel().

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix incorrent type of flags in <asm/semaphore.h>
Kyle McMartin [Wed, 29 Nov 2006 13:24:16 +0000 (14:24 +0100)]
Fix incorrent type of flags in <asm/semaphore.h>

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agosgiioc4: Disable module unload
Jeremy Higdon [Wed, 29 Nov 2006 13:22:11 +0000 (14:22 +0100)]
sgiioc4: Disable module unload

This patch removes a module_exit function that sgiioc4 should not have had.

It seems that the IDE layer doesn't support submodule unloading. sgiioc4
was the only driver in drivers/ide/pci that had an exit function.
After an unload, the devices would stay around and the next attempt to
reference would crash...

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoproper flags type of spin_lock_irqsave()
Alexey Dobriyan [Wed, 29 Nov 2006 13:17:58 +0000 (14:17 +0100)]
proper flags type of spin_lock_irqsave()

Convert various spin_lock_irqsave() callers to correctly use `unsigned long'

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agodrivers/usb/input/ati_remote.c: fix cut'n'paste error
Adrian Bunk [Wed, 29 Nov 2006 13:15:25 +0000 (14:15 +0100)]
drivers/usb/input/ati_remote.c: fix cut'n'paste error

Backported from a patch by Mariusz Kozlowski <m.kozlowski@tuxland.pl>
in 2.6.19.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoblock layer: elv_iosched_show should get elv_list_lock
Vasily Tarasov [Wed, 29 Nov 2006 13:04:14 +0000 (14:04 +0100)]
block layer: elv_iosched_show should get elv_list_lock

elv_iosched_show function iterates other elv_list,
hence elv_list_lock should be got.

Also the question is: in elv_iosched_show, elv_iosched_store
q->elevator->elevator_type construction is used without locking q->queue_lock.
Is it expected?..

Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoblock: Fix bad data direction in SG_IO
Jens Axboe [Wed, 29 Nov 2006 13:01:40 +0000 (14:01 +0100)]
block: Fix bad data direction in SG_IO

Contrary to what the name misleads you to believe, SG_DXFER_TO_FROM_DEV
is really just a normal read seen from the device side.

This patch fixes http://lkml.org/lkml/2006/10/13/100

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoUSB: failure in usblp's error path
Oliver Neukum [Wed, 29 Nov 2006 11:45:29 +0000 (12:45 +0100)]
USB: failure in usblp's error path

if urb submission fails due to a transient error here eg. ENOMEM,
the driver is dead. This fixes it.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agonvidiafb: fix unreachable code in nv10GetConfig
Nathan Lynch [Wed, 29 Nov 2006 11:17:37 +0000 (12:17 +0100)]
nvidiafb: fix unreachable code in nv10GetConfig

Fix binary/logical operator typo which leads to unreachable code.  Noticed
while looking at other issues; I don't have the relevant hardware to test
this.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix divide by zero error for nvidia 7600 pci-express card
Wink Saville [Wed, 29 Nov 2006 11:15:49 +0000 (12:15 +0100)]
Fix divide by zero error for nvidia 7600 pci-express card

The following patch resolves the divide by zero error I encountered on my
system:

        http://marc.10east.com/?l=linux-fbdev-devel&m=116058257024413&w=2

I accomplished this by merging what I thought was appropriate from:

        http://webcvs.freedesktop.org/xorg/driver/xf86-video-nv/src/

Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoMMC: Always use a sector size of 512 bytes
Pierre Ossman [Wed, 29 Nov 2006 11:10:52 +0000 (12:10 +0100)]
MMC: Always use a sector size of 512 bytes

Both MMC and SD specifications specify (although a bit unclearly in the MMC
case) that a sector size of 512 bytes must always be supported by the card.

Cards can report larger "native" size than this, and cards >= 2 GB even
must do so. Most other readers use 512 bytes even for these cards. We should
do the same to be compatible.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoSCTP: Always linearise packet on input
Herbert Xu [Wed, 29 Nov 2006 11:06:04 +0000 (12:06 +0100)]
SCTP: Always linearise packet on input

I was looking at a RHEL5 bug report involving Xen and SCTP
(https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=212550).
It turns out that SCTP wasn't written to handle skb fragments at
all.  The absence of any calls to skb_may_pull is testament to
that.

It just so happens that Xen creates fragmented packets more often
than other scenarios (header & data split when going from domU to
dom0).  That's what caused this bug to show up.

Until someone has the time sits down and audits the entire net/sctp
directory, here is a conservative and safe solution that simply
linearises all packets on input.

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 agoadd forgotten ->b_data in memcpy() call in ext3/resize.c (oopsable)
Al Viro [Wed, 29 Nov 2006 10:40:22 +0000 (11:40 +0100)]
add forgotten ->b_data in memcpy() call in ext3/resize.c (oopsable)

sbi->s_group_desc is an array of pointers to buffer_head.  memcpy() of
buffer size from address of buffer_head is a bad idea - it will generate
junk in any case, may oops if buffer_head is close to the end of slab
page and next page is not mapped and isn't what was intended there.
IOW, ->b_data is missing in that call.  Fortunately, result doesn't go
into the primary on-disk data structures, so only backup ones get crap
written to them; that had allowed this bug to remain unnoticed until
now.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years agoFix a masking bug in the 6pack driver.
Jean Delvare [Wed, 29 Nov 2006 10:00:25 +0000 (11:00 +0100)]
Fix a masking bug in the 6pack driver.

Looks like a broken masking to me, binary not is used where bitwise
not was intended.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
17 years ago[UDP]: Make udp_encap_rcv use pskb_may_pull
Olaf Kirch [Wed, 29 Nov 2006 09:59:22 +0000 (10:59 +0100)]
[UDP]: Make udp_encap_rcv use pskb_may_pull

Make udp_encap_rcv use pskb_may_pull

IPsec with NAT-T breaks on some notebooks using the latest e1000 chipset,
when header split is enabled. When receiving sufficiently large packets, the
driver puts everything up to and including the UDP header into the header
portion of the skb, and the rest goes into the paged part. udp_encap_rcv
forgets to use pskb_may_pull, and fails to decapsulate it. Instead, it
passes it up it to the IKE daemon.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
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>