14 years agoMerge branch 'fixes-20090312' of git://
Linus Torvalds [Thu, 12 Mar 2009 23:22:51 +0000 (16:22 -0700)]
Merge branch 'fixes-20090312' of git://git./linux/kernel/git/willy/pci

* 'fixes-20090312' of git://
  PCIe: portdrv: call pci_disable_device during remove
  pci: Fix typo in message while disabling HT MSI mapping
  pci: don't disable too many HT MSI mapping
  powerpc/pseries: The RPA PCI hotplug driver depends on EEH
  PCIe: AER: during disable, check subordinate before walking
  PCI: Add PCI quirk to disable L0s ASPM state for 82575 and 82598

14 years agoRDMA/nes: Don't allow userspace QPs to use STag zero
Faisal Latif [Thu, 12 Mar 2009 21:34:59 +0000 (14:34 -0700)]
RDMA/nes: Don't allow userspace QPs to use STag zero

STag zero is a special STag that allows consumers to access any bus
address without registering memory.  The nes driver unfortunately
allows STag zero to be used even with QPs created by unprivileged
userspace consumers, which means that any process with direct verbs
access to the nes device can read and write any memory accessible to
the underlying PCI device (usually any memory in the system).  Such
access is usually given for cluster software such as MPI to use, so
this is a local privilege escalation bug on most systems running this

The driver was using STag zero to receive the last streaming mode
data; to allow STag zero to be disabled for unprivileged QPs, the
driver now registers a special MR for this data.

Cc: <>
Signed-off-by: Faisal Latif <>
Signed-off-by: Roland Dreier <>
Signed-off-by: Linus Torvalds <>
14 years agofs: new inode i_state corruption fix
Nick Piggin [Thu, 12 Mar 2009 21:31:38 +0000 (14:31 -0700)]
fs: new inode i_state corruption fix

There was a report of a data corruption  There is a script included to
reproduce the problem.

During testing, I encountered a number of strange things with ext3, so I
tried ext2 to attempt to reduce complexity of the problem.  I found that
fsstress would quickly hang in wait_on_inode, waiting for I_LOCK to be
cleared, even though instrumentation showed that unlock_new_inode had
already been called for that inode.  This points to memory scribble, or
synchronisation problme.

i_state of I_NEW inodes is not protected by inode_lock because other
processes are not supposed to touch them until I_LOCK (and I_NEW) is
cleared.  Adding WARN_ON(inode->i_state & I_NEW) to sites where we modify
i_state revealed that generic_sync_sb_inodes is picking up new inodes from
the inode lists and passing them to __writeback_single_inode without
waiting for I_NEW.  Subsequently modifying i_state causes corruption.  In
my case it would look like this:

CPU0                            CPU1
unlock_new_inode()              __sync_single_inode()
 reg <- inode->i_state
 reg -> reg & ~(I_LOCK|I_NEW)   reg <- inode->i_state
 reg -> inode->i_state          reg -> reg | I_SYNC
                                reg -> inode->i_state

Non-atomic RMW on CPU1 overwrites CPU0 store and sets I_LOCK|I_NEW again.

Fix for this is rather than wait for I_NEW inodes, just skip over them:
inodes concurrently being created are not subject to data integrity
operations, and should not significantly contribute to dirty memory

After this change, I'm unable to reproduce any of the added warnings or
hangs after ~1hour of running.  Previously, the new warnings would start
immediately and hang would happen in under 5 minutes.

I'm also testing on ext3 now, and so far no problems there either.  I
don't know whether this fixes the problem reported above, but it fixes a
real problem for me.

Cc: "Jorge Boncompte [DTI2]" <>
Reported-by: Adrian Hunter <>
Cc: Jan Kara <>
Cc: <>
Signed-off-by: Nick Piggin <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agomemcg: use correct scan number at reclaim
KOSAKI Motohiro [Thu, 12 Mar 2009 21:31:36 +0000 (14:31 -0700)]
memcg: use correct scan number at reclaim

Even when page reclaim is under mem_cgroup, # of scan page is determined by
status of global LRU. Fix that.

Signed-off-by: KOSAKI Motohiro <>
Signed-off-by: KAMEZAWA Hiroyuki <>
Cc: Daisuke Nishimura <>
Cc: Balbir Singh <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agomfd: add support for WM8351 revision B
Mark Brown [Thu, 12 Mar 2009 21:31:36 +0000 (14:31 -0700)]
mfd: add support for WM8351 revision B

No software visible difference from revision A.

Signed-off-by: Mark Brown <>
Cc: Samuel Ortiz <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agoacer-wmi: fix regression in backlight detection
Michael Spang [Thu, 12 Mar 2009 21:31:34 +0000 (14:31 -0700)]
acer-wmi: fix regression in backlight detection

Currently we disable the Acer WMI backlight device if there is no ACPI
backlight device.  As a result, we end up with no backlight device at all.
 We should instead disable it if there is an ACPI device, as the other
laptop drivers do.  This regression was introduced in febf2d9 ("Acer-WMI:
fingers off backlight if video.ko is serving this functionality").

Each laptop driver with backlight support got a similar change around
febf2d9.  The changes to the other drivers look correct; see e.g.
a598c82f for a similar but correct change.  The regression is also in

Signed-off-by: Michael Spang <>
Acked-by: Thomas Renninger <>
Cc: Zhang Rui <>
Cc: Andi Kleen <>
Cc: Carlos Corbacho <>
Cc: Len Brown <>
Cc: "Rafael J. Wysocki" <>
Cc: <> [2.6.28.x]
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agommc: s3cmci: fix s3c2410_dma_config() arguments.
Ben Dooks [Thu, 12 Mar 2009 21:31:33 +0000 (14:31 -0700)]
mmc: s3cmci: fix s3c2410_dma_config() arguments.

The s3cmci driver is calling s3c2410_dma_config with incorrect data for
the DCON register.  The S3C2410_DCON_HWTRIG is implicit in the channel
configuration and the device selection of S3C2410_DCON_CH0_SDI is
incorrect as the DMA system may not select channel 0.

Signed-off-by: Ben Dooks <>
Acked-by: Pierre Ossman <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agoMAINTAINERS: downgrade support for man-pages
Michael Kerrisk [Thu, 12 Mar 2009 21:31:32 +0000 (14:31 -0700)]
MAINTAINERS: downgrade support for man-pages

Unfortunately, Linux Foundation funding for my work on
man-pages/testing/doc under the auspices of the LF documentation
fellowship unfortunately ran out a short while ago (after earlier attempts
to seek funding, only Google stepped forward with a bit of further funding
for the position), so the patch below acknowledges something closer to

Unfortunately, there will (probably very) soon be a further downgrade from
"Maintained" to "Odd Fixes" or "Orphan", unless some funding miracle
occurs.  So, if anyone is looking to become man-pages maintainer, there
may soon be an opening (okay, don't trample me in the rush ;-).)

Signed-off-by: Michael Kerrisk <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agods2760_battery.c: fix division by zero
Daniel Mack [Thu, 12 Mar 2009 21:31:30 +0000 (14:31 -0700)]
ds2760_battery.c: fix division by zero

The 'battery remaining capacity' calculation in
drivers/power/ds2760_battery.c lacks a parameter check to a division
operation which causes the kernel to oops on my board.

[   21.233750] Division by zero in kernel.
[   21.237646] [<c002955c>] (__div0+0x0/0x20) from [<c012561c>] (Ldiv0+0x8/0x10)
[   21.244816] [<c01bef34>] (ds2760_battery_read_status+0x0/0x2a4) from [<c01bf3a4>] (ds2760_battery_get_property+0x30/0xdc)
[   21.255803]  r8:c03a22c0 r7:c7886100 r6:00000009 r5:c782fe7c r4:c7886084
[   21.262518] [<c01bf374>] (ds2760_battery_get_property+0x0/0xdc) from [<c01bde98>] (power_supply_show_property+0x48/0x114)
[   21.273480]  r6:c7996000 r5:00000009 r4:00000000
[   21.278111] [<c01bde50>] (power_supply_show_property+0x0/0x114) from [<c01be158>] (power_supply_uevent+0x188/0x280)
[   21.288537]  r8:00000001 r7:c7886100 r6:c7996000 r5:000000b4 r4:00000000
[   21.295222] [<c01bdfd0>] (power_supply_uevent+0x0/0x280) from [<c015c664>] (dev_uevent+0xd4/0x10c)
[   21.304199] [<c015c590>] (dev_uevent+0x0/0x10c) from [<c0128440>] (kobject_uevent_env+0x180/0x390)
[   21.313170]  r5:00000000 r4:c78860ac
[   21.316725] [<c01282c0>] (kobject_uevent_env+0x0/0x390) from [<c0128664>] (kobject_uevent+0x14/0x18)
[   21.325850] [<c0128650>] (kobject_uevent+0x0/0x18) from [<c01bdc34>] (power_supply_changed_work+0x5c/0x70)
[   21.335506] [<c01bdbd8>] (power_supply_changed_work+0x0/0x70) from [<c004d290>] (run_workqueue+0xbc/0x144)
[   21.345167]  r4:c7812040
[   21.347716] [<c004d1d4>] (run_workqueue+0x0/0x144) from [<c004d94c>] (worker_thread+0xa8/0xbc)
[   21.356296]  r7:c7812040 r6:c7820b00 r5:c782ffa4 r4:c7812048
[   21.361957] [<c004d8a4>] (worker_thread+0x0/0xbc) from [<c0051008>] (kthread+0x5c/0x94)
[   21.369971]  r7:00000000 r6:c004d8a4 r5:c7812040 r4:c782e000
[   21.375612] [<c0050fac>] (kthread+0x0/0x94) from [<c00403d0>] (do_exit+0x0/0x688)

Signed-off-by: Daniel Mack <>
Cc: Szabolcs Gyurko <>
Acked-by: Matt Reimer <>
Acked-by: Anton Vorontsov <>
Cc: David Woodhouse <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agovfs: add missing unlock in sget()
Li Zefan [Thu, 12 Mar 2009 21:31:29 +0000 (14:31 -0700)]
vfs: add missing unlock in sget()

In sget(), destroy_super(s) is called with s->s_umount held, which makes
lockdep unhappy.

Signed-off-by: Li Zefan <>
Cc: Al Viro <>
Acked-by: Peter Zijlstra <>
Cc: Paul Menage <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agopipe_rdwr_fasync: fix the error handling to prevent the leak/crash
Oleg Nesterov [Thu, 12 Mar 2009 21:31:28 +0000 (14:31 -0700)]
pipe_rdwr_fasync: fix the error handling to prevent the leak/crash

If the second fasync_helper() fails, pipe_rdwr_fasync() returns the error
but leaves the file on ->fasync_readers.

This was always wrong, but since 233e70f4228e78eb2f80dc6650f65d3ae3dbf17c
"saner FASYNC handling on file close" we have the new problem.  Because in
this case setfl() doesn't set FASYNC bit, __fput() will not do
->fasync(0), and we leak fasync_struct with ->fa_file pointing to the
freed file.

Signed-off-by: Oleg Nesterov <>
Cc: Al Viro <>
Cc: Andi Kleen <>
Cc: Jonathan Corbet <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agodrivers/w1/masters/w1-gpio.c: fix read_bit()
Daniel Mack [Thu, 12 Mar 2009 21:31:25 +0000 (14:31 -0700)]
drivers/w1/masters/w1-gpio.c: fix read_bit()

W1 master implementations are expected to return 0 or 1 from their
read_bit() function.  However, not all platforms do return these values
from gpio_get_value() - namely PXAs won't.  Hence the w1 gpio-master needs
to break the result down to 0 or 1 itself.

Signed-off-by: Daniel Mack <>
Cc: Ville Syrjala <>
Cc: Evgeniy Polyakov <>
Cc: David Brownell <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agouml: fix WARNING: vmlinux: 'memcpy' exported twice [Thu, 12 Mar 2009 21:31:24 +0000 (14:31 -0700)]
uml: fix WARNING: vmlinux: 'memcpy' exported twice

Fix the following warning on x86_64:

LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux: 'memcpy' exported twice. Previous export was in vmlinux

For x86_64, this symbol is already exported from arch/um/sys-x86_64/ksyms.c.

Reported-by: Boaz Harrosh <>
Signed-off-by: WANG Cong <>
Tested-by: Boaz Harrosh <>
Cc: Jeff Dike <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agoUML on UML fixed: it did not start
Renzo Davoli [Thu, 12 Mar 2009 21:31:23 +0000 (14:31 -0700)]
UML on UML fixed: it did not start

It is currently impossible to run a user-mode linux machine inside another
user-mode linux (UML on UML).  It breaks after a few instructions.  When
it tries to check whether SYSEMU is installed (the inner) UML receives an
inconsistent result (from the outer UML).

This is the output of a broken attempt:
$ ./linux mem=256m ubd0=cow
Locating the bottom of the address space ... 0x0
Locating the top of the address space ... 0xc0000000
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking ptrace new tags for syscall emulation...unsupported
Checking syscall emulation patch for ptrace...check_sysemu : expected SIGTRAP, got status = 256

The problem is the following:

PTRACE_SYSCALL/SINGLESTEP is currently managed inside arch_ptrace for ARCH=um.

PTRACE_SYSEMU/SUSEMU_SINGLESTEP is not captured in arch_ptrace's switch,
therefore it is erroneously passed back to ptrace_request (in

This simple patch simply forces ptrace to return an error on
PTRACE_SYSEMU/SUSEMU_SINGLESTEP as it is unsupported on ARCH=um, and fixes
the problem.

[ coding-style fixes]
Signed-off-by: Renzo Davoli <>
Reviewed-by: WANG Cong <>
Cc: Jeff Dike <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agoPCIe: portdrv: call pci_disable_device during remove
Alex Chiang [Sun, 8 Mar 2009 02:35:47 +0000 (19:35 -0700)]
PCIe: portdrv: call pci_disable_device during remove

The PCIe port driver calls pci_enable_device() during probe but
never calls pci_disable_device() during remove.

Signed-off-by: Alex Chiang <>
Signed-off-by: Matthew Wilcox <>
14 years agopci: Fix typo in message while disabling HT MSI mapping
Prakash Punnoor [Fri, 6 Mar 2009 09:10:35 +0000 (10:10 +0100)]
pci: Fix typo in message while disabling HT MSI mapping

"Enabling" should read "Disabling"

Signed-off-by: Prakash Punnoor <>
Signed-off-by: Matthew Wilcox <>
14 years agopci: don't disable too many HT MSI mapping
Prakash Punnoor [Thu, 5 Mar 2009 23:45:12 +0000 (00:45 +0100)]
pci: don't disable too many HT MSI mapping

Prakash's system needs MSI disabled on some bridges, but not all.
This seems to be the minimal fix for 2.6.29, but should be replaced
during 2.6.30.

Signed-off-by: Prakash Punnoor <>
Signed-off-by: Matthew Wilcox <>
14 years agopowerpc/pseries: The RPA PCI hotplug driver depends on EEH
Michael Ellerman [Fri, 6 Mar 2009 03:39:14 +0000 (14:39 +1100)]
powerpc/pseries: The RPA PCI hotplug driver depends on EEH

The RPA PCI hotplug driver calls EEH routines, so should depend on
EEH. Also PPC_PSERIES implies PPC64, so remove that.

Signed-off-by: Michael Ellerman <>
Signed-off-by: Matthew Wilcox <>
14 years agoPCIe: AER: during disable, check subordinate before walking
Alex Chiang [Fri, 6 Mar 2009 02:28:40 +0000 (19:28 -0700)]
PCIe: AER: during disable, check subordinate before walking

Commit 47a8b0cc (Enable PCIe AER only after checking firmware
support) wants to walk the PCI bus in the remove path to disable
AER, and calls pci_walk_bus for downstream bridges.

Unfortunately, in the remove path, we remove devices and bridges
in a depth-first manner, starting with the furthest downstream
bridge and working our way backwards.

The furthest downstream bridges will not have a dev->subordinate,
and we hit a NULL deref in pci_walk_bus.

Check for dev->subordinate first before attempting to walk the
PCI hierarchy below us.

Acked-by: Andrew Patterson <>
Signed-off-by: Alex Chiang <>
Signed-off-by: Matthew Wilcox <>
14 years agoPCI: Add PCI quirk to disable L0s ASPM state for 82575 and 82598
Alexander Duyck [Thu, 5 Mar 2009 18:57:28 +0000 (13:57 -0500)]
PCI: Add PCI quirk to disable L0s ASPM state for 82575 and 82598

This patch is intended to disable L0s ASPM link state for 82598 (ixgbe)
parts due to the fact that it is possible to corrupt TX data when coming
back out of L0s on some systems.  The workaround had been added for 82575
(igb) previously, but did not use the ASPM api.  This quirk uses the ASPM
api to prevent the ASPM subsystem from re-enabling the L0s state.

Instead of adding the fix in igb to the ixgbe driver as well it was
decided to move it into a pci quirk.  It is necessary to move the fix out
of the driver and into a pci quirk in order to prevent the issue from
occuring prior to driver load to handle the possibility of the device being
passed to a VM via direct assignment.

Signed-off-by: Alexander Duyck <>
Signed-off-by: Jeff Kirsher <>
CC: Jesse Barnes <>
Signed-off-by: Matthew Wilcox <>
14 years agoMerge git://
Linus Torvalds [Thu, 12 Mar 2009 16:27:53 +0000 (09:27 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://
  sunhme: Fix qfe parent detection.
  sparc64: Fix lost interrupts on sun4u.
  sparc64: wait_event_interruptible_timeout may return -ERESTARTSYS
  jsflash: stop defining MAJOR_NR

14 years agoMerge branch 'upstream' of git://
Linus Torvalds [Thu, 12 Mar 2009 16:25:10 +0000 (09:25 -0700)]
Merge branch 'upstream' of git://

* 'upstream' of git://
  MIPS: IP27: Enable RAID5 module
  MIPS: TXx9: update defconfigs
  MIPS: NEC VR5500 processor support fixup
  MIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipc

14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Wed, 11 Mar 2009 21:29:03 +0000 (14:29 -0700)]
Merge branch 'for-linus' of git://

* 'for-linus' of git://
  xfs: only issues a cache flush on unmount if barriers are enabled
  xfs: prevent lockdep false positive in xfs_iget_cache_miss
  xfs: prevent kernel crash due to corrupted inode log format

14 years agoMIPS: IP27: Enable RAID5 module
Ralf Baechle [Wed, 11 Mar 2009 20:08:50 +0000 (21:08 +0100)]
MIPS: IP27: Enable RAID5 module

Signed-off-by: Ralf Baechle <>
14 years agoMIPS: TXx9: update defconfigs
Atsushi Nemoto [Wed, 4 Mar 2009 14:45:44 +0000 (23:45 +0900)]
MIPS: TXx9: update defconfigs

Enable following features:
* RBTX4939
* IDE (IDE_TX4938, IDE_TX4939)
* SMC91X
* RTC_DRV_TX4939

Signed-off-by: Atsushi Nemoto <>
Signed-off-by: Ralf Baechle <>
14 years agoMIPS: NEC VR5500 processor support fixup
Shinya Kuribayashi [Tue, 3 Mar 2009 09:05:51 +0000 (18:05 +0900)]
MIPS: NEC VR5500 processor support fixup

Current VR5500 processor support lacks of some functions which are
expected to be configured/synthesized on arch initialization.

Here're some VR5500A spec notes:

* All execution hazards are handled in hardware.

* Once VR5500A stops the operation of the pipeline by WAIT instruction,
  it could return from the standby mode only when either a reset, NMI
  request, or all enabled interrupts is/are detected.  In other words,
  if interrupts are disabled by Status.IE=0, it keeps in standby mode
  even when interrupts are internally asserted.

  Notes on WAIT: The operation of the processor is undefined if WAIT
  insn is in the branch delay slot.  The operation is also undefined
  if WAIT insn is executed when Status.EXL and Status.ERL are set to 1.

* VR5500A core only implements the Load prefetch.

With these changes, it boots fine.

Signed-off-by: Shinya Kuribayashi <>
Signed-off-by: Ralf Baechle <>
14 years agoMIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipc
Xiaotian Feng [Mon, 9 Mar 2009 01:45:12 +0000 (09:45 +0800)]
MIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipc

Signed-off-by: Xiaotian Feng <>
Signed-off-by: Ralf Baechle <>
14 years agoMerge branch 'drm-fixes' of git://
Linus Torvalds [Wed, 11 Mar 2009 19:14:55 +0000 (12:14 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://
  drm: fix EDID parser problem with positive/negative hsync/vsync

14 years agoMerge branch 'merge' of git://
Linus Torvalds [Wed, 11 Mar 2009 19:14:04 +0000 (12:14 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://
  radeonfb/aty128fb: Disable broken early resume hook for PowerBooks
  hvc_console: Remove tty->low_latency on pseries backends
  powerpc: fix linkstation and storcenter compilation breakage
  powerpc/4xx: Enable SERIAL_OF support by default for Virtex platforms

14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Wed, 11 Mar 2009 19:09:45 +0000 (12:09 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/anholt/drm-intel

* 'for-linus' of git://
  drm/i915: fix 945 fence register writes for fence 8 and above.
  drm/i915: Protect active fences on i915
  drm/i915: Check to see if we've pinned all available fences
  drm/i915: Check fence status on every pin.
  drm/i915: First recheck for an empty fence register.
  drm/i915: Fix bad \n in MTRR failure notice.
  drm/i915: Don't restore palettes through VGA registers.
  i915: add newline to i915_gem_object_pin failure msg
  drm: Return EINVAL on duplicate objects in execbuffer object list

14 years agoMerge branch 'x86-fixes-for-linus' of git://
Linus Torvalds [Wed, 11 Mar 2009 19:04:51 +0000 (12:04 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://
  x86: work around Fedora-11 x86-32 kernel failures on Intel Atom CPUs

14 years agoFix _fat_bmap() locking
OGAWA Hirofumi [Wed, 11 Mar 2009 17:03:23 +0000 (02:03 +0900)]
Fix _fat_bmap() locking

On swapon() path, it has already i_mutex. So, this uses i_alloc_sem
instead of it.

Signed-off-by: OGAWA Hirofumi <>
Reported-by: Laurent GUERBY <>
Signed-off-by: Linus Torvalds <>
14 years agodrm/i915: fix 945 fence register writes for fence 8 and above.
Eric Anholt [Wed, 11 Mar 2009 05:34:49 +0000 (22:34 -0700)]
drm/i915: fix 945 fence register writes for fence 8 and above.

The last 8 fence registers sit at a different offset, so when we went to set
fence number 8 in the lower offset, we instead set PGETBL_CTL, and the GPU
got all sorts of angry at us.

fd.o bug #20567.  Easily reproducible by running glxgears and killing it about
6 times.

Signed-off-by: Eric Anholt <>
14 years agodrm/i915: Protect active fences on i915
Chris Wilson [Wed, 11 Feb 2009 14:26:47 +0000 (14:26 +0000)]
drm/i915: Protect active fences on i915

The i915 also uses the fence registers for GPU access to tiled buffers so
we cannot reallocate one whilst it is on the active list. By performing a
LRU scan of the fenced buffers we also avoid waiting the possibility of
waiting on a pinned, or otherwise unusable, buffer.

Signed-off-by: Chris Wilson <>
Signed-off-by: Eric Anholt <>
14 years agox86: work around Fedora-11 x86-32 kernel failures on Intel Atom CPUs
Ingo Molnar [Tue, 10 Mar 2009 21:31:03 +0000 (22:31 +0100)]
x86: work around Fedora-11 x86-32 kernel failures on Intel Atom CPUs

Impact: work around boot crash

Work around Intel Atom erratum AAH41 (probabilistically) - it's triggering
in the field.

Reported-by: Linus Torvalds <>
Tested-by: Kyle McMartin <>
Signed-off-by: Ingo Molnar <>
14 years agoproc: fix kflags to uflags copying in /proc/kpageflags
Wu Fengguang [Wed, 11 Mar 2009 01:00:04 +0000 (09:00 +0800)]
proc: fix kflags to uflags copying in /proc/kpageflags

Fix kpf_copy_bit(src,dst) to be kpf_copy_bit(dst,src) to match the
actual call patterns, e.g. kpf_copy_bit(kflags, KPF_LOCKED, PG_locked).

This misplacement of src/dst only affected reporting of PG_writeback,
PG_reclaim and PG_buddy. For others kflags==uflags so not affected.

Signed-off-by: Wu Fengguang <>
Reviewed-by: KOSAKI Motohiro <>
Signed-off-by: Linus Torvalds <>
14 years agodrm/i915: Check to see if we've pinned all available fences
Chris Wilson [Wed, 11 Feb 2009 14:26:46 +0000 (14:26 +0000)]
drm/i915: Check to see if we've pinned all available fences

We need to check and report if there are no available fences - or else we
spin endlessly waiting for a buffer to magically unpin itself.

Signed-off-by: Chris Wilson <>
Signed-off-by: Eric Anholt <>
14 years agodrm/i915: Check fence status on every pin.
Chris Wilson [Wed, 11 Feb 2009 14:26:45 +0000 (14:26 +0000)]
drm/i915: Check fence status on every pin.

As we may steal the fence register of an unpinned buffer for another,
every time we repin the buffer we need to recheck whether it needs to be
allocated a fence.

Signed-off-by: Chris Wilson <>
Signed-off-by: Eric Anholt <>
14 years agodrm/i915: First recheck for an empty fence register.
Chris Wilson [Wed, 11 Feb 2009 14:26:44 +0000 (14:26 +0000)]
drm/i915: First recheck for an empty fence register.

If we wait upon a request and successfully unbind a buffer occupying a
fence register, then that slot will be freed and cause a NULL derefrence
upon rescanning.

Signed-off-by: Chris Wilson <>
Signed-off-by: Eric Anholt <>
14 years agodrm: fix EDID parser problem with positive/negative hsync/vsync
Pantelis Koukousoulas [Tue, 10 Mar 2009 11:16:14 +0000 (13:16 +0200)]
drm: fix EDID parser problem with positive/negative hsync/vsync

Comparing the layouts of struct detail_pixel_timing with's struct detailed_timings and how those are handled,
it appears that the hsync_positive and vsync_positive
fields are backwards.

This patch fixes
for me. It was tested on 2 monitors, LG FLATRON L225WS 22" and
a YAKUMO 17" for which more details are unknown.

Signed-off-by: Pantelis Koukousoulas <>
Signed-off-by: Dave Airlie <>
14 years agoradeonfb/aty128fb: Disable broken early resume hook for PowerBooks
Benjamin Herrenschmidt [Tue, 10 Mar 2009 23:45:17 +0000 (10:45 +1100)]
radeonfb/aty128fb: Disable broken early resume hook for PowerBooks

radeonfb and aty128fb have a special hook called by the PowerMac platform
code very very early on resume from sleep to bring the screen back. This
is useful for debugging wakup problems, but unfortunately, this also became
a source of problems of its own.

The hook is called extremely early, with interrupts still off, and the code
path involved with that code nowadays rely on things like taking mutexes,
GFP_KERNEL allocations, etc...

In addition, the driver now relies on the PCI core to restore the standard
config space before calling resume which doesn't happen with this early
code path.

I'm keeping the code in but commented out along with a fixup call to
pci_restore_state(). The reason is that I still want to make it easy to
re-enable temporarily to track wake up problems, and it's possible that
I can revive it at some stage if we make sleeping things save to call
in early resume using a system state.

In the meantime, this should fix several reported regressions.

Signed-off-by: Benjamin Herrenschmidt <>
14 years agohvc_console: Remove tty->low_latency on pseries backends
Benjamin Herrenschmidt [Mon, 9 Mar 2009 14:36:15 +0000 (14:36 +0000)]
hvc_console: Remove tty->low_latency on pseries backends

The hvcs and hvsi backends both set tty->low_latency to one, along
with more or less scary comments regarding bugs or races that would
happen if not doing so.

However, they also both call tty_flip_buffer_push() in conexts where
it's illegal to do so since some recent tty changes (or at least it
may have been illegal always but it nows blows) when low_latency is
set (ie, hard interrupt or with spinlock held and irqs disabled).

This removes the setting for now to get them back to working condition,
we'll have to address the races described in the comments separately
if they are still an issue (some of this might have been fixed already).

Signed-off-by: Benjamin Herrenschmidt <>
14 years agoMerge commit 'gcl/merge' into merge
Benjamin Herrenschmidt [Tue, 10 Mar 2009 23:40:29 +0000 (10:40 +1100)]
Merge commit 'gcl/merge' into merge

14 years agoi810: fix kernel crash fix when struct fb_var_screeninfo is supplied
Samuel CUELLA [Tue, 10 Mar 2009 19:56:00 +0000 (12:56 -0700)]
i810: fix kernel crash fix when struct fb_var_screeninfo is supplied

Prevent the kernel from being crashed by a divide-by-zero operation when
supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.

Previously i810_main.c:1005 (i810_check_params) was using the global
'yres' symbol previously defined at i810_main.c:145 as a module parameter
value holder (i810_main.c:2174).  If i810fb is compiled-in or if this
param doesn't get a default value, this direct usage leads to a
divide-by-zero at i810_main.c:1005 (i810_check_params).  The patch simply
replace the 'yres' global, perhaps undefined symbol usage by a given
parameter structure lookup.

This problem occurs with directfb, mplayer -vo fbdev, SDL library.
It was also reported ( but non solved ) at:

Signed-off-by: Samuel CUELLA <>
Cc: Jiri Kosina <>
Cc: Krzysztof Helt <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agom68knommu: m528x build fix
Steven King [Tue, 10 Mar 2009 19:55:58 +0000 (12:55 -0700)]
m68knommu: m528x build fix

There isn't any mcfqspi.h in the tree, and without it everything inside the
#ifdef CONFIG_SPI is uncompilable.

Signed-off-by: Steven King <>
Acked-by: Greg Ungerer <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agom68knommu: m5206e build fix
Steven King [Tue, 10 Mar 2009 19:55:57 +0000 (12:55 -0700)]
m68knommu: m5206e build fix

Signed-off-by: Steven King <>
Acked-by: Greg Ungerer <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agorcu: documentation 1Q09 update
Paul E. McKenney [Tue, 10 Mar 2009 19:55:57 +0000 (12:55 -0700)]
rcu: documentation 1Q09 update

Update the RCU documentation to call out the need for callers of
primitives like call_rcu() and synchronize_rcu() to prevent subsequent RCU
readers from hazard.

Signed-off-by: Paul E. McKenney <>
Cc: Ingo Molnar <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agokernel/user.c: fix a memory leak when freeing up non-init usernamespaces users
Dhaval Giani [Tue, 10 Mar 2009 19:55:56 +0000 (12:55 -0700)]
kernel/user.c: fix a memory leak when freeing up non-init usernamespaces users

We were returning early in the sysfs directory cleanup function if the
user belonged to a non init usernamespace.  Due to this a lot of the
cleanup was not done and we were left with a leak.  Fix the leak.

Reported-by: Serge Hallyn <>
Signed-off-by: Dhaval Giani <>
Acked-by: Serge Hallyn <>
Tested-by: Serge Hallyn <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agomtd: physmap: fix NULL pointer dereference in error path
Atsushi Nemoto [Tue, 10 Mar 2009 19:55:55 +0000 (12:55 -0700)]
mtd: physmap: fix NULL pointer dereference in error path

commit e480814f138cd5d78a8efe397756ba6b6518fdb6 ("[MTD] [MAPS] physmap:
fix wrong free and del_mtd_{partition,device}") introduces a NULL pointer
dereference in physmap_flash_remove when called from the error path in
physmap_flash_probe (if map_probe failed).

Call del_mtd_{partition,device} only if info->cmtd was not NULL.

Reported-by: pHilipp Zabel <>
Signed-off-by: Atsushi Nemoto <>
Cc: David Woodhouse <>
Cc: "Rafael J. Wysocki" <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agointel-agp: fix a panic with 1M of shared memory, no GTT entries
Lubomir Rintel [Tue, 10 Mar 2009 19:55:54 +0000 (12:55 -0700)]
intel-agp: fix a panic with 1M of shared memory, no GTT entries

When GTT size is equal to amount of video memory, the amount of GTT
entries is computed lower than zero, which is invalid and leads to
off-by-one error in intel_i915_configure()

Originally posted here:

Signed-off-by: Lubomir Rintel <>
Cc: Lubomir Rintel <>
Cc: Dave Airlie <>
Reviewed-by: Eric Anholt <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agomtd_dataflash: fix probing of AT45DB321C chips.
Will Newton [Tue, 10 Mar 2009 19:55:53 +0000 (12:55 -0700)]
mtd_dataflash: fix probing of AT45DB321C chips.

Commit 771999b65f79264acde4b855e5d35696eca5e80c ("[MTD] DataFlash: bugfix,
binary page sizes now handled") broke support for probing AT45DB321C flash
chips.  These chips do not support the "page size" status bit, so if we
match the JEDEC id return early.

[ coding-style fixes]
Signed-off-by: Will Newton <>
Cc: David Woodhouse <>
Acked-by: David Brownell <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agoidr: make idr_remove_all() do removal -before- free_layer()
Paul E. McKenney [Tue, 10 Mar 2009 19:55:52 +0000 (12:55 -0700)]
idr: make idr_remove_all() do removal -before- free_layer()

Fix a problem in the IDR system, where an idr_remove_all() hands a data
element to call_rcu() (via free_layer()) before making that data element
inaccessible to new readers.  This is very bad, and results in readers
still having a reference to this data element at the end of the grace

Tests on large machines that concurrently map and unmap user-space memory
within the same multithreaded process result in crashes within about five
minutes.  Applying this patch increases the kernel's longevity to the
three-to-eight-hour range.

There appear to be other similar problems in idr_get_empty_slot() and
sub_remove(), but I fixed the easy one in idr_remove_all() first.  It is
therefore no surprise that failures still occur.

Located-by: Milton Miller II <>
Tested-by: Milton Miller II <>
Signed-off-by: Paul E. McKenney <>
Cc: Manfred Spraul <>
Cc: Ingo Molnar <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agodevpts: remove graffiti
Alexey Dobriyan [Tue, 10 Mar 2009 19:55:51 +0000 (12:55 -0700)]
devpts: remove graffiti

Very annoying when working with containters.

Signed-off-by: Alexey Dobriyan <>
Cc: Alan Cox <>
Cc: "H. Peter Anvin" <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agox86/agp: tighten check to update amd nb aperture
Yinghai Lu [Tue, 10 Mar 2009 19:55:50 +0000 (12:55 -0700)]
x86/agp: tighten check to update amd nb aperture

Impact: fix bug to make agp work with dri

Jeffrey reported that dri does work with 64bit, but doesn't work with
32bit it turns out NB aperture is 32M, aperture on agp is 128M

64bit is using 64M for vaidation for 64 iommu/gart 32bit is only using
32M..., and will not update the nb aperture.

So try to compare nb apterture and agp apterture before leaving not
touch nb aperture.

Reported-by: Jeffrey Trull <>
Tested-by: Jeffrey Trull <>
Signed-off-by: Yinghai Lu <>
Acked-by: Dave Airlie <>
Cc: Ingo Molnar <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agoxtensa: fix compilation somewhat
Alexey Dobriyan [Tue, 10 Mar 2009 19:55:49 +0000 (12:55 -0700)]
xtensa: fix compilation somewhat

* ->put_char changes
 * HIGHMEM is bogus it seems, there is no kmap_atomic() et al
 * some includes

Signed-off-by: Alexey Dobriyan <>
Acked-by: Chris Zankel <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agolm85: add VRM10 support for adt7468 chip
Darrick J. Wong [Tue, 10 Mar 2009 19:55:48 +0000 (12:55 -0700)]
lm85: add VRM10 support for adt7468 chip

The adt7468 chip supports VRM10 sensors just like the adt7463; add a
missing check for it.

Signed-off-by: Darrick J. Wong <>
Cc: Jean Delvare <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agolm85: fix the version check that broke adt7468 probing
Darrick J. Wong [Tue, 10 Mar 2009 19:55:47 +0000 (12:55 -0700)]
lm85: fix the version check that broke adt7468 probing

The verstep check in the lm85 driver fails because the upper nibble of
the version register is 0x7, not 0x6, on the adt7468 chip.  Probing of
all adt7468s was broken by 69fc1feba2d5856ff74dedb6ae9d8c490210825c
("hwmon: (lm85) Rework the device detection"), and this patch fixes
that.  Also add in a missing i2c_device_id that accidentally got dropped
from the original patch.

Signed-off-by: Darrick J. Wong <>
Cc: Jean Delvare <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agomenu: fix embedded menu snafu
Randy Dunlap [Tue, 10 Mar 2009 19:55:46 +0000 (12:55 -0700)]
menu: fix embedded menu snafu

The COMPAT_BRK kconfig symbol does not depend on EMBEDDED, but it is in
the midst of the EMBEDDED menu symbols, so it mucks up the EMBEDDED menu.
Fix by moving it to just after all of the EMBEDDED menu symbols.  Also,
ANON_INODES has a similar problem, so move it to just above the EMBEDDED
menu items since it is used in the EMBEDDED menu.

Signed-off-by: Randy Dunlap <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agomm: get_nid_for_pfn() returns int
Roel Kluin [Tue, 10 Mar 2009 19:55:45 +0000 (12:55 -0700)]
mm: get_nid_for_pfn() returns int

get_nid_for_pfn() returns int

Presumably the (nid < 0) case has never happened.

We do know that it is happening on one system while creating a symlink for
a memory section so it should also happen on the same system if
unregister_mem_sect_under_nodes() were called to remove the same symlink.

The test was actually added in response to a problem with an earlier
version reported by Yasunori Goto where one or more of the leading pages
of a memory section on the 2nd node of one of his systems was
uninitialized because I believe they coincided with a memory hole.

That earlier version did not ignore uninitialized pages and determined
the nid by considering only the 1st page of each memory section.  This
caused the symlink to the 1st memory section on the 2nd node to be
incorrectly created in /sys/devices/system/node/node0 instead of
/sys/devices/system/node/node1.  The problem was fixed by adding the
test to skip over uninitialized pages.

I suspect we have not seen any reports of the non-removal
of a symlink due to the incorrect declaration of the nid
variable in unregister_mem_sect_under_nodes() because
  - systems where a memory section could have an uninitialized
    range of leading pages are probably rare.
  - memory remove is probably not done very frequently on the
    systems that are capable of demonstrating the problem.
  - lingering symlink(s) that should have been removed may
    have simply gone unnoticed.

[ wrote changelog]
Signed-off-by: Roel Kluin <>
Cc: Gary Hade <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
14 years agodrm/i915: Fix bad \n in MTRR failure notice.
Eric Anholt [Tue, 10 Mar 2009 19:31:12 +0000 (12:31 -0700)]
drm/i915: Fix bad \n in MTRR failure notice.

Signed-off-by: Eric Anholt <>
14 years agodrm/i915: Don't restore palettes through VGA registers.
Pierre Willenbrock [Wed, 25 Feb 2009 16:49:51 +0000 (17:49 +0100)]
drm/i915: Don't restore palettes through VGA registers.

The VGA registers just hit the pipe registers that we already set through
MMIO.  This fixes strange colors on resume.

Signed-off-by: Pierre Willenbrock <>
Signed-off-by: Eric Anholt <>
14 years agoi915: add newline to i915_gem_object_pin failure msg
Kyle McMartin [Sat, 28 Feb 2009 20:01:16 +0000 (15:01 -0500)]
i915: add newline to i915_gem_object_pin failure msg

Prevents formatting nasty as below:

[drm:i915_gem_object_pin] *ERROR* Failure to bind: -12<3>[drm:i915_gem_evict_something] *ERROR* inactive empty 1 request empty 1 flushing empty 1

Signed-off-by: Kyle McMartin <>
Signed-off-by: Eric Anholt <>
14 years agodrm: Return EINVAL on duplicate objects in execbuffer object list
Kristian Høgsberg [Tue, 3 Mar 2009 19:45:57 +0000 (14:45 -0500)]
drm: Return EINVAL on duplicate objects in execbuffer object list

If userspace passes an object list with the same object appearing more
than once, we end up hitting the BUG_ON() in
i915_gem_object_set_to_gpu_domain() as it gets called a second time
for the same object.

Signed-off-by: Kristian Høgsberg <>
Signed-off-by: Eric Anholt <>
14 years agoMerge branch 'x86-fixes-for-linus' of git://
Linus Torvalds [Tue, 10 Mar 2009 19:03:30 +0000 (12:03 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://
  x86 mmiotrace: fix remove_kmmio_fault_pages()

14 years agoMerge branch 'sh/for-2.6.29' of git://
Linus Torvalds [Tue, 10 Mar 2009 16:31:19 +0000 (09:31 -0700)]
Merge branch 'sh/for-2.6.29' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.29' of git://
  video: deferred io cleanup fix for sh_mobile_lcdcfb
  sh: Add media/soc_camera.h to board setup of Renesas AP325RXA

14 years agovideo: deferred io cleanup fix for sh_mobile_lcdcfb
Magnus Damm [Tue, 10 Mar 2009 06:08:49 +0000 (06:08 +0000)]
video: deferred io cleanup fix for sh_mobile_lcdcfb

Fix deferred io cleanup patch in the sh_mobile_lcdcfb driver.

If probe() fails early the sh_mobile_lcdc_stop() function will
be called to clean up deferred io. This patch modifies the
code to only call fb_deferred_io_cleanup() after deferred io
has been initialized.

With this patch applied we no longer hit BUG_ON() inside
fb_deferred_io_cleanup(). Triggers on a Migo-R with the
SYS QVGA panel board unmounted.

Signed-off-by: Magnus Damm <>
Signed-off-by: Paul Mundt <>
14 years agosh: Add media/soc_camera.h to board setup of Renesas AP325RXA
Nobuhiro Iwamatsu [Fri, 6 Mar 2009 02:51:14 +0000 (02:51 +0000)]
sh: Add media/soc_camera.h to board setup of Renesas AP325RXA

Other compilation errors were revised by commit of
"sh: ap325rxa: Revert ov772x support"
(08c2f5b4d76f83213e379b12df504269d21c9e7c) but other compilation
errors are given.
We revert this commit and need to add new header(media/soc_camera.h).
This change revises new compilation error.

Signed-off-by: Nobuhiro Iwamatsu <>
Signed-off-by: Paul Mundt <>
14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Tue, 10 Mar 2009 03:50:11 +0000 (20:50 -0700)]
Merge branch 'for-linus' of git://

* 'for-linus' of git://
  md: fix deadlock when stopping arrays

14 years agoMerge branch 'fixes' of git://
Linus Torvalds [Mon, 9 Mar 2009 20:23:59 +0000 (13:23 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq

* 'fixes' of git://
  [CPUFREQ] Add p4-clockmod sysfs-ui removal to feature-removal schedule.
  Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod."

14 years agocopy_process: fix CLONE_PARENT && parent_exec_id interaction
Oleg Nesterov [Mon, 2 Mar 2009 21:58:45 +0000 (22:58 +0100)]
copy_process: fix CLONE_PARENT && parent_exec_id interaction

CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use ->parent_exec_id to make
sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed
task exits.

Also, move down the "p->parent_exec_id = p->self_exec_id" thing, to place
two different cases together.

Signed-off-by: Oleg Nesterov <>
Cc: Roland McGrath <>
Cc: Andrew Morton <>
Cc: David Howells <>
Cc: Serge E. Hallyn <>
Signed-off-by: Linus Torvalds <>
14 years ago[CPUFREQ] Add p4-clockmod sysfs-ui removal to feature-removal schedule.
Dave Jones [Mon, 9 Mar 2009 19:14:37 +0000 (15:14 -0400)]
[CPUFREQ] Add p4-clockmod sysfs-ui removal to feature-removal schedule.

Signed-off-by: Matthew Garrett <>
Signed-off-by: Dave Jones <>
14 years agoRevert "[CPUFREQ] Disable sysfs ui for p4-clockmod."
Dave Jones [Mon, 9 Mar 2009 19:07:33 +0000 (15:07 -0400)]
Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod."

This reverts commit e088e4c9cdb618675874becb91b2fd581ee707e6.

Removing the sysfs interface for p4-clockmod was flagged as a
regression in bug 12826.

Course of action:
 - Find out the remaining causes of overheating, and fix them
   if possible. ACPI should be doing the right thing automatically.
   If it isn't, we need to fix that.
 - mark p4-clockmod ui as deprecated
 - try again with the removal in six months.

It's not really feasible to printk about the deprecation, because
it needs to happen at all the sysfs entry points, which means adding
a lot of strcmp("p4-clockmod".. calls to the core, which.. bleuch.

Signed-off-by: Dave Jones <>
14 years agoMerge git://
Linus Torvalds [Mon, 9 Mar 2009 16:15:40 +0000 (09:15 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git:// (29 commits)
  p54: fix race condition in memory management
  cfg80211: test before subtraction on unsigned
  iwlwifi: fix error flow in iwl*_pci_probe
  rt2x00 : more devices to rt73usb.c
  rt2x00 : more devices to rt2500usb.c
  bonding: Fix device passed into ->ndo_neigh_setup().
  vlan: Fix vlan-in-vlan crashes.
  net: Fix missing dev->neigh_setup in register_netdevice().
  tmspci: fix request_irq race
  pkt_sched: act_police: Fix a rate estimator test.
  tg3: Fix 5906 link problems
  SCTP: change sctp_ctl_sock_init() to try IPv4 if IPv6 fails
  IPv6: add "disable" module parameter support to ipv6.ko
  sungem: another error printed one too early
  aoe: error printed 1 too early
  net pcmcia: worklimit reaches -1
  net: more timeouts that reach -1
  net: fix tokenring license
  dm9601: new vendor/product IDs
  netlink: invert error code in netlink_set_err()

14 years agoMerge git://
Linus Torvalds [Mon, 9 Mar 2009 16:14:17 +0000 (09:14 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://
  lguest: fix for CONFIG_SPARSE_IRQ=y
  lguest: fix crash 'unhandled trap 13 at <native_read_msr_safe>'

14 years agoMerge git://
Linus Torvalds [Mon, 9 Mar 2009 16:13:16 +0000 (09:13 -0700)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable

* git://
  Btrfs: fix spinlock assertions on UP systems

14 years agopowerpc: fix linkstation and storcenter compilation breakage
Guennadi Liakhovetski [Thu, 5 Mar 2009 13:25:06 +0000 (13:25 +0000)]
powerpc: fix linkstation and storcenter compilation breakage

Defining flash partition table in platform code is deprecated, and due to
recent changes linkstation and storcenter do not compile any more with
their default configurations because of undefined references to
physmap_set_partitions(). Instead of fixing them by using the correct
kernel configuration macro in preprocessor conditional, remove partition
table definitions altogether. Instead add support for partition definition
on the command-line and in device tree to the default configurations.

Signed-off-by: Guennadi Liakhovetski <>
Signed-off-by: Kumar Gala <>
14 years agoBtrfs: fix spinlock assertions on UP systems
Chris Mason [Mon, 9 Mar 2009 15:45:38 +0000 (11:45 -0400)]
Btrfs: fix spinlock assertions on UP systems

btrfs_tree_locked was being used to make sure a given extent_buffer was
properly locked in a few places.  But, it wasn't correct for UP compiled

This switches it to using assert_spin_locked instead, and renames it to
btrfs_assert_tree_locked to better reflect how it was really being used.

Signed-off-by: Chris Mason <>
14 years agoFix fixpoint divide exception in acct_update_integrals
Heiko Carstens [Mon, 9 Mar 2009 12:31:59 +0000 (13:31 +0100)]
Fix fixpoint divide exception in acct_update_integrals

Frans Pop reported the crash below when running an s390 kernel under Hercules:

  Kernel BUG at 000738b4  verbose debug info unavailable!
  fixpoint divide exception: 0009  #1! SMP
  Modules linked in: nfs lockd nfs_acl sunrpc ctcm fsm tape_34xx
     cu3088 tape ccwgroup tape_class ext3 jbd mbcache dm_mirror dm_log dm_snapshot
     dm_mod dasd_eckd_mod dasd_mod
  CPU: 0 Not tainted #13
  Process awk (pid: 2069, task: 0f9ed9b8, ksp: 0f4f7d18)
  Krnl PSW : 070c1000 800738b4 (acct_update_integrals+0x4c/0x118)
             R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0
  Krnl GPRS: 00000000 000007d0 7fffffff fffff830
             00000000 ffffffff 00000002 0f9ed9b8
             00000000 00008ca0 00000000 0f9ed9b8
             0f9edda4 8007386e 0f4f7ec8 0f4f7e98
  Krnl Code: 800738aaa71807d0         lhi     %r1,2000
             800738ae8c200001         srdl    %r2,1
             800738b2: 1d21             dr      %r2,%r1
            >800738b45810d10e         l       %r1,270(%r13)
             800738b8: 1823             lr      %r2,%r3
             800738ba4130f060         la      %r3,96(%r15)
             800738be: 0de1             basr    %r14,%r1
             800738c05800f060         l       %r0,96(%r15)
  Call Trace:
  ( <000000000004fdea>! blocking_notifier_call_chain+0x1e/0x2c)
    <0000000000038502>! do_exit+0x106/0x7c0
    <0000000000038c36>! do_group_exit+0x7a/0xb4
    <0000000000038c8e>! SyS_exit_group+0x1e/0x30
    <0000000000021c28>! sysc_do_restart+0x12/0x16
    <0000000077e7e924>! 0x77e7e924

Reason for this is that cpu time accounting usually only happens from
interrupt context, but acct_update_integrals gets also called from
process context with interrupts enabled.

So in acct_update_integrals we may end up with the following scenario:

Between reading tsk->stime/tsk->utime and tsk->acct_timexpd an interrupt
happens which updates accouting values.  This causes acct_timexpd to be
greater than the former stime + utime.  The subsequent calculation of

dtime = cputime_sub(time, tsk->acct_timexpd);

will be negative and the division performed by


will generate an exception since the result won't fit into a 32 bit

In order to fix this just always disable interrupts while accessing any
of the accounting values.

Reported by: Frans Pop <>
Tested by: Frans Pop <>
Cc: Martin Schwidefsky <>
Signed-off-by: Heiko Carstens <>
Signed-off-by: Linus Torvalds <>
14 years agosunhme: Fix qfe parent detection.
Friedrich Oslage [Mon, 9 Mar 2009 03:13:42 +0000 (20:13 -0700)]
sunhme: Fix qfe parent detection.

Signed-off-by: Friedrich Oslage <>
Signed-off-by: David S. Miller <>
14 years agolguest: fix for CONFIG_SPARSE_IRQ=y
Rusty Russell [Mon, 9 Mar 2009 16:06:28 +0000 (10:06 -0600)]
lguest: fix for CONFIG_SPARSE_IRQ=y

Impact: remove lots of lguest boot WARN_ON() when CONFIG_SPARSE_IRQ=y

We now need to call irq_to_desc_alloc_cpu() before
set_irq_chip_and_handler_name(), but we can't do that from init_IRQ (no
kmalloc available).

So do it as we use interrupts instead.  Also means we only alloc for
irqs we use, which was the intent of CONFIG_SPARSE_IRQ anyway.

Signed-off-by: Rusty Russell <>
Cc: Ingo Molnar <>
14 years agolguest: fix crash 'unhandled trap 13 at <native_read_msr_safe>'
Rusty Russell [Mon, 9 Mar 2009 16:06:22 +0000 (10:06 -0600)]
lguest: fix crash 'unhandled trap 13 at <native_read_msr_safe>'

Impact: fix lguest boot crash on modern Intel machines

The code in early_init_intel does:

if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) {
u64 misc_enable;

rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable);

And that rdmsr faults (not allowed from non-0 PL).  We can get around
this by mugging the family ID part of the cpuid.  5 seems like a good

Of course, this is a hack (how very lguest!).  We could just indicate
that we don't support MSRs, or implement lguest_rdmst.

Reported-by: Patrick McHardy <>
Signed-off-by: Rusty Russell <>
Tested-by: Patrick McHardy <>
14 years agox86 mmiotrace: fix remove_kmmio_fault_pages()
Stuart Bennett [Sun, 8 Mar 2009 18:21:35 +0000 (20:21 +0200)]
x86 mmiotrace: fix remove_kmmio_fault_pages()

Impact: fix race+crash in mmiotrace

The list manipulation in remove_kmmio_fault_pages() was broken. If more
than one consecutive kmmio_fault_page was re-added during the grace
period between unregister_kmmio_probe() and remove_kmmio_fault_pages(),
the list manipulation failed to remove pages from the release list.

After a second grace period the pages get into rcu_free_kmmio_fault_pages()
and raise a BUG_ON() kernel crash.

The list manipulation is fixed to properly remove pages from the release

This bug has been present from the very beginning of mmiotrace in the
mainline kernel. It was introduced in 0fd0e3da ("x86: mmiotrace full
patch, preview 1");

An urgent fix for Linus. Tested by Stuart (on 32-bit) and Pekka
(on amd and intel 64-bit systems, nouveau and nvidia proprietary).

Signed-off-by: Stuart Bennett <>
Signed-off-by: Pekka Paalanen <>
LKML-Reference: <>
Signed-off-by: Ingo Molnar <>
14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:37:57 +0000 (10:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://
  mmc: fix data timeout for SEND_EXT_CSD

14 years agoMerge branch 'core-fixes-for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:30:18 +0000 (10:30 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://
  rcu: increment quiescent state counter in ksoftirqd()

14 years agoMerge branch 'x86-fixes-for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:27:13 +0000 (10:27 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://
  x86, pebs: correct qualifier passed to ds_write_config() from ds_request_pebs()
  x86, bts: remove bad warning
  x86: add Dell XPS710 reboot quirk
  x86, math-emu: fix init_fpu for task != current
  x86: EFI: Back efi_ioremap with init_memory_mapping instead of FIX_MAP
  x86: fix DMI on EFI

14 years agoMerge git://
Linus Torvalds [Sun, 8 Mar 2009 17:25:13 +0000 (10:25 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://
  [WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared
  [WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed
  [WATCHDOG] ks8695_wdt.c: 'CLOCK_TICK_RATE' undeclared
  [WATCHDOG] rc32434_wdt: fix sections
  [WATCHDOG] rc32434_wdt: fix watchdog driver

14 years agoMerge branch 'for_linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:24:57 +0000 (10:24 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://
  ext4: fix ext4_free_inode() vs. ext4_claim_inode() race

14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:24:39 +0000 (10:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git:// (28 commits)
  Blackfin arch: SPI_MMC is now mainlined MMC_SPI
  Blackfin arch: disable legacy /proc/scsi/ support by default
  Blackfin arch: remove duplicated ANOMALY_05000448 ifdef check
  Blackfin arch: add stubs for anomalies 447 and 448
  Blackfin arch: cleanup bfin_sport.h header and export it to userspace
  Blackfin arch: fix bug - gdb signull case make trunk kernel panic frequently
  Blackfin arch: remove spurious dash when dcache is off
  Blackfin arch: mark init_pda as __init as only __init funcs all it
  Blackfin arch: fix bug - On bf548-ezkit, ethernet fails to work after wakeup from "mem"
  Blackfin arch: Random read/write errors are a bad thing
  Blackfin arch: update default kernel config, select KSZ8893M driver for BF518
  Blackfin arch: Fix bug - KGDB single step into the middle of a 4 bytes instruction on bf561 after soft bp is hit
  Blackfin arch: Fix bug - make ksz8893m driver available when bfin_mac is enabled
  Blackfin arch: make sure people do not set the kernel load address too high
  Blackfin arch: fix bug - The SPORT_HYS bit is not set for BF561 0.5
  Blackfin arch: update anomaly sheets to match latest public info
  Blackfin arch: Fix BUG - kernel fails to build in pm.c when allow wakeup fromi standby by GPIO
  Blackfin arch: PM_BFIN_WAKE_GP: update help
  Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561-ezkit kernel with smp patch
  Blackfin arch: Enable Write Back Cache on all Blackfin Boards

14 years agoMerge branch 'fixes' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:23:05 +0000 (10:23 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://
  dmatest: fix use after free in dmatest_exit
  ipu_idmac: fix spinlock type
  iop-adma, mv_xor: fix mem leak on self-test setup failure
  fsldma: fix off by one in dma_halt
  I/OAT: fail self-test if callback test reaches timeout
  I/OAT: update driver version and copyright dates
  I/OAT: list usage cleanup
  I/OAT: set tcp_dma_copybreak to 256k for I/OAT ver.3
  I/OAT: cancel watchdog before dma remove
  I/OAT: fail initialization on zero channels detection
  I/OAT: do not set DCACTRL_CMPL_WRITE_ENABLE for I/OAT ver.3
  I/OAT: add verification for proper APICID_TAG_MAP setting by BIOS
  dmaengine: update kerneldoc

14 years agoMerge git://
Linus Torvalds [Sun, 8 Mar 2009 17:22:22 +0000 (10:22 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://
  ata: add CFA specific identify data words
  remove stale comment from <linux/hdreg.h>
  AT91: initialize Compact Flash on AT91SAM9263 cpu
  ide: add at91_ide driver
  ide: allow to wrap interrupt handler
  ide-iops: fix odd-length ATAPI PIO transfers
  ide: NULL noise: drivers/ide/ide-*.c
  ide: expiry() returns int, negative expiry() return values won't be noticed

14 years agoMerge branch 'upstream-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:22:01 +0000 (10:22 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://
  libata: Don't trust current capacity values in identify words 57-58
  libata: make sure port is thawed when skipping resets
  sata_nv: fix module parameter description
  ahci: Add the Device IDs for MCP89 and remove IDs of MCP7B to/from ahci.c
  libata: don't use on-stack sense buffer
  libata: align ap->sector_buf
  libata: fix dma_unmap_sg misuse
  libata: change drive ready wait after hard reset to 5s

14 years agoMerge git://
Linus Torvalds [Sun, 8 Mar 2009 17:21:31 +0000 (10:21 -0700)]
Merge git://git./linux/kernel/git/pkl/squashfs-linus

* git://
  Squashfs: frag_size should be signed, as it can hold an error result
  Squashfs: fix documentation typo, Cramfs filesystem limit is 256 MiB
  Squashfs: Fix oops when reading fsfuzzer corrupted filesystems

14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:21:10 +0000 (10:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://
  smack: fixes for unlabeled host support

14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:14:19 +0000 (10:14 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://
  Input: serio - fix protocol number for TouchIT213

14 years agoMerge branch 'release' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:13:28 +0000 (10:13 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://
  [IA64] fix PCI DMA flag propagation on SN (Altix) with PICs

14 years agoMerge branch 'for-linus' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:08:57 +0000 (10:08 -0700)]
Merge branch 'for-linus' of git://

* 'for-linus' of git://
  block: fix missing bio back/front segment size setting in blk_recount_segments()
  loop: don't increment p->offset with (size_t) -EINVAL
  cciss: remove 30 second initial timeout on controller reset
  Fix kernel NULL pointer dereference in xen-blkfront

14 years agoMerge branch 'fix/hda' of git://
Linus Torvalds [Sun, 8 Mar 2009 17:03:31 +0000 (10:03 -0700)]
Merge branch 'fix/hda' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'fix/hda' of git://
  ALSA: hda - Fix headphone-detect regression with multiple HP jacks
  ALSA: hda - Fix typos in slave controls in patch_sigmatel.c

14 years agoMIPS: compat: Implement is_compat_task.
Ralf Baechle [Thu, 5 Mar 2009 10:45:48 +0000 (11:45 +0100)]
MIPS: compat: Implement is_compat_task.

This is a build fix required after "x86-64: seccomp: fix 32/64 syscall
hole" (commit 5b1017404aea6d2e552e991b3fd814d839e9cd67).  MIPS doesn't
have the issue that was fixed for x86-64 by that patch.

This also doesn't solve the N32 issue which is that N32 seccomp processes
will be treated as non-compat processes thus only have access to N64

Signed-off-by: Ralf Baechle <>
Signed-off-by: Linus Torvalds <>
14 years agommc: fix data timeout for SEND_EXT_CSD
Adrian Hunter [Tue, 10 Feb 2009 14:32:33 +0000 (16:32 +0200)]
mmc: fix data timeout for SEND_EXT_CSD

Commit 0d3e0460f307e84904968aad6cff97bd688583d8
"MMC: CSD and CID timeout values" inadvertently broke
the timeout for the MMC command SEND_EXT_CSD.

This patch puts it back again.

Depending on the characteristics of the controller,
this bug may prevent the use of MMC cards.

Signed-off-by: Adrian Hunter <>
Signed-off-by: Pierre Ossman <>
14 years agoInput: serio - fix protocol number for TouchIT213
Dmitry Torokhov [Sat, 7 Mar 2009 21:39:22 +0000 (13:39 -0800)]
Input: serio - fix protocol number for TouchIT213

Protocol 0x37 has been reserved for iNexio devices and Sahara
was supposed to get 0x38.

Reported-by: Claudio Nieder <>
Signed-off-by: Dmitry Torokhov <>