Daniel Mack [Tue, 11 May 2010 16:57:37 +0000 (18:57 +0200)]
ALSA: include/sound/asound.h whitespace fixups
This fixes some whitespace/indentation flaws I stumbled over.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Krzysztof Helt [Mon, 10 May 2010 07:47:32 +0000 (09:47 +0200)]
ALSA: Merge es1688 and es968 drivers
The ESS ES968 chip is nothing more then a PnP companion
for a non-PnP audio chip. It was paired with non-PnP ESS' chips:
ES688 and ES1688. The ESS' audio chips are handled by the es1688
driver in native mode. The PnP cards are handled by the ES968
driver in SB compatible mode.
Move the ES968 chip handling to the es1688 driver so the driver
can handle both PnP and non-PnP cards. The es968 is removed.
Also, a new PnP id is added for the card I acquired (the change
was tested on this card).
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Krzysztof Helt [Sun, 9 May 2010 18:35:44 +0000 (20:35 +0200)]
ALSA: es1688: allocate snd_es1688 structure as a part of snd_card structure
Allocate the snd_es1688 during the snd_card allocation.
This allows to remove the card pointer from the snd_es1688 structure.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 10 May 2010 07:48:47 +0000 (09:48 +0200)]
Merge branch 'fix/misc' into topic/misc
Ville Syrjälä [Thu, 6 May 2010 21:12:13 +0000 (00:12 +0300)]
ALSA: maestro3: Clear interrupts before enabling them
Avoid spurious interrupts when initializing the device.
Signed-off-by: Ville Syrjälä <syrjala@sci.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ville Syrjälä [Thu, 6 May 2010 21:12:12 +0000 (00:12 +0300)]
ALSA: es1968: Clear interrupts before enabling them
Avoid spurious interrupts when initializing the device.
Signed-off-by: Ville Syrjälä <syrjala@sci.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dan Carpenter [Wed, 28 Apr 2010 08:29:14 +0000 (10:29 +0200)]
ALSA: take tu->qlock with irqs disabled
We should disable irqs when we take the tu->qlock because it is used in
the irq handler. The only place that doesn't is
snd_timer_user_ccallback(). Most of the time snd_timer_user_ccallback()
is called with interrupts disabled but the the first ti->ccallback()
call in snd_timer_notify1() has interrupts enabled.
This was caught by lockdep which generates the following message:
> =================================
> [ INFO: inconsistent lock state ]
> 2.6.34-rc5 #5
> ---------------------------------
> inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
> dolphin/4003 [HC1[1]:SC0[0]:HE0:SE1] takes:
> (&(&tu->qlock)->rlock){?.+...}, at: [<
f84ec472>] snd_timer_user_tinterrupt+0x28/0x132 [snd_timer]
> {HARDIRQ-ON-W} state was registered at:
> [<
c1048de9>] __lock_acquire+0x654/0x1482
> [<
c1049c73>] lock_acquire+0x5c/0x73
> [<
c125ac3e>] _raw_spin_lock+0x25/0x34
> [<
f84ec370>] snd_timer_user_ccallback+0x55/0x95 [snd_timer]
> [<
f84ecc4b>] snd_timer_notify1+0x53/0xca [snd_timer]
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Krzysztof Helt [Sun, 25 Apr 2010 11:12:45 +0000 (13:12 +0200)]
ALSA: es968: fix wrong PnP dma index
There is only one dma for the ESS ES968 based board.
Its index is 0 and not 1.
This make the es968 card working.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 23 Apr 2010 15:10:48 +0000 (17:10 +0200)]
Merge branch 'fix/misc' into for-linus
Takashi Iwai [Fri, 23 Apr 2010 15:10:44 +0000 (17:10 +0200)]
Merge branch 'fix/hda' into for-linus
Hans de Goede [Fri, 23 Apr 2010 09:26:43 +0000 (05:26 -0400)]
ALSA: snd-es1968: Make hardware volume buttons an input device (rev2)
The hardware volume handling code in essence just detects key presses, and
then does some hardcoded modification of the master volume based on which key
is pressed.
Clearly the right thing to do here is just report these keypresses to
userspace and let userspace decide what to with them.
This patch adds a Kconfig option which when enabled reports the volume
buttons as keypresses using an input device. When enabled this option
also gets rid of the ugly direct ac97 writes from the tasklet, the ac97lock
and the need for using a tasklet in general.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Hans de Goede [Fri, 23 Apr 2010 09:26:42 +0000 (05:26 -0400)]
ALSA: snd-maestro3: Make hardware volume buttons an input device (rev2)
While working on the sound suspend / resume problems with my laptop
I noticed that the hardware volume handling code in essence just detects
key presses, and then does some hardcoded modification of the master volume
based on which key is pressed.
This made me think that clearly the right thing to do here is just report
these keypresses to userspace and let userspace decide what to with them.
This patch adds a Kconfig option which when enabled reports the volume
buttons as keypresses using an input device. When enabled this option
also gets rid of the ugly direct ac97 writes from the tasklet, the ac97lock
and the need for using a tasklet in general.
As an added bonus the keys now work identical to volume keys on a (usb)
keyboard with multimedia keys, providing visual feedback of the volume
level change, and a better range of the volume control (with a properly
configured desktop environment).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Thu, 22 Apr 2010 21:54:45 +0000 (17:54 -0400)]
ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio 1558
BugLink: https://launchpad.net/bugs/568600
The OR has verified that the dell-m6 model quirk is necessary for audio
to be audible by default on the Dell Studio XPS 1645.
This change is necessary for 2.6.32.11 and 2.6.33.2 alike.
Reported-by: Andy Ross <andy@plausible.org>
Tested-by: Andy Ross <andy@plausible.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Wed, 21 Apr 2010 23:55:43 +0000 (19:55 -0400)]
ALSA: hda: Use LPIB quirk for DG965OT board version
AAD63733-203
BugLink: https://launchpad.net/bugs/459083
The OR has verified with 2.6.32.11 and the latest alsa-driver stable
daily snapshot that position_fix=1 is necessary for the external mic
to work and for PulseAudio not to crash constantly.
This patch is necessary also for 2.6.32.11 and 2.6.33.2.
Reported-by: <imwithid@yahoo.com>
Tested-by: <imwithid@yahoo.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Hans de Goede [Wed, 21 Apr 2010 15:04:07 +0000 (11:04 -0400)]
ALSA: snd-meastro3: Document hardware volume control a bit
While working on a fix for the volume being muted on the allegro in my
Compaq EVO N600C after suspend, I've learned a few things about the hardware
volume control worth documenting. The actual fix for the suspend / resume
issue is in the next patch in this set.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 22 Apr 2010 14:53:24 +0000 (16:53 +0200)]
Merge branch 'fix/misc' into topic/misc
Hans de Goede [Wed, 21 Apr 2010 15:04:08 +0000 (11:04 -0400)]
ALSA: snd-meastro3: Ignore spurious HV interrupts during suspend / resume
Ignore spurious HV interrupts during suspend / resume, this avoids
mistaking them for a mute button press. This is not very pretty but
it seems the only way to fix the master volume control gets muted
after suspend issue I'm seeing. Note that the es1968 driver is doing
exactly the same.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Hans de Goede [Wed, 21 Apr 2010 15:04:06 +0000 (11:04 -0400)]
ALSA: snd-meastro3: Add amp_gpio quirk for Compaq EVO N600C
Without this quirk sound stops working after suspend resume. With this quirk,
one still needs to manually unmute the master volume control after a suspend /
/ resume cycle. That is fixed in another patch in this set.
Note that this patch was submitted to the alsa bug tracker a long time ago:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4319
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Thu, 22 Apr 2010 11:15:26 +0000 (07:15 -0400)]
ALSA: hda: Use ALC880_F1734 quirk for Fujitsu Siemens AMILO Xi 1526
BugLink: https://launchpad.net/bugs/567494
The OR has verified that the existing model quirk, ALC880_UNIWILL,
is insufficient for audible playback and capture by default. Instead,
the ALC880_F1734 model quirk needs to be used.
This change is necessary for both 2.6.32.11 and 2.6.33.2.
Reported-by: Arnaud Malpeyre <amalpeyre@gmail.com>
Tested-by: Arnaud Malpeyre <amalpeyre@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel T Chen [Thu, 22 Apr 2010 00:41:52 +0000 (20:41 -0400)]
ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio XPS 1645
BugLink: https://launchpad.net/bugs/553002
The OR has verified that the dell-m6 model quirk is necessary for audio
to be audible by default on the Dell Studio XPS 1645.
This change is necessary for 2.6.32.11 and 2.6.33.2 alike.
Reported-by: Robert Chambers
Tested-by: Robert Chambers
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Eliot Blennerhassett [Wed, 21 Apr 2010 16:17:39 +0000 (18:17 +0200)]
ALSA: Add support of AudioScience ASI boards
Added the support of AudioScience ASI boards.
The driver has been tested for years on alsa-driver external tree,
now finally got merged to the kernel.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 19 Apr 2010 16:11:29 +0000 (18:11 +0200)]
ALSA: hda - Fix resume from StR of HP 2510p with docking-station
When HP laptop with AD1981 codec is suspended and the docking-station
is connected before the resume, the outputs get confused, and wrongly
routed still to the speaker. This is because of a change in 2.6.34-rc1
ea52bf260ecbb175339af3178c15788df21b7516
ALSA: hda: Add powerdown for Analog Devices HDA codecs
The problem was the added resume callback that doesn't consider the
modified init hook. The fix is simply remove the resume callback here
and make the resume normally. This doesn't change any behavior intended
in the commit above (for shutting down the sound at suspend) but only
fixes the resume.
Reported-and-tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 16 Apr 2010 13:20:06 +0000 (15:20 +0200)]
Merge remote branch 'alsa/devel' into topic/misc
Jaroslav Kysela [Fri, 16 Apr 2010 11:10:10 +0000 (13:10 +0200)]
ALSA: Release v1.0.23
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 16 Apr 2010 08:32:54 +0000 (10:32 +0200)]
ALSA: usb/mixer - use get_iface_desc() rather than direct structure
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Jaroslav Kysela [Fri, 16 Apr 2010 08:37:41 +0000 (10:37 +0200)]
Merge branch 'topic/usb' of git://git./linux/kernel/git/tiwai/sound-2.6 into devel
Takashi Iwai [Fri, 16 Apr 2010 08:03:48 +0000 (10:03 +0200)]
Merge branch 'fix/hda' into for-linus
Takashi Iwai [Fri, 16 Apr 2010 08:03:42 +0000 (10:03 +0200)]
Merge branch 'fix/misc' into for-linus
Takashi Iwai [Fri, 16 Apr 2010 08:03:36 +0000 (10:03 +0200)]
Merge branch 'fix/asoc' into for-linus
Linus Torvalds [Thu, 15 Apr 2010 19:20:56 +0000 (12:20 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86/gart: Disable GART explicitly before initialization
dma-debug: Cleanup for copy-loop in filter_write()
x86/amd-iommu: Remove obsolete parameter documentation
x86/amd-iommu: use for_each_pci_dev
Revert "x86: disable IOMMUs on kernel crash"
x86/amd-iommu: warn when issuing command to uninitialized cmd buffer
x86/amd-iommu: enable iommu before attaching devices
x86/amd-iommu: Use helper function to destroy domain
x86/amd-iommu: Report errors in acpi parsing functions upstream
x86/amd-iommu: Pt mode fix for domain_destroy
x86/amd-iommu: Protect IOMMU-API map/unmap path
x86/amd-iommu: Remove double NULL check in check_device
Linus Torvalds [Thu, 15 Apr 2010 18:56:20 +0000 (11:56 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: cdev: change license of exported header files to MIT license
firewire: cdev: comment fixlet
firewire: cdev: iso packet documentation
firewire: cdev: fix information leak
firewire: cdev: require quadlet-aligned headers for transmit packets
firewire: cdev: disallow receive packets without header
Linus Torvalds [Thu, 15 Apr 2010 18:49:55 +0000 (11:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - switch mode upon system resume
Revert "Input: wacom - merge out and in prox events"
Input: matrix_keypad - allow platform to disable key autorepeat
Input: ALPS - add signature for HP Pavilion dm3 laptops
Input: i8042 - spelling fix
Input: sparse-keymap - implement safer freeing of the keymap
Input: update the status of the Multitouch X driver project
Input: clarify the no-finger event in multitouch protocol
Input: bcm5974 - retract efi-broken suspend_resume
Input: sparse-keymap - free the right keymap on error
Ping Cheng [Wed, 14 Apr 2010 06:07:52 +0000 (23:07 -0700)]
Input: wacom - switch mode upon system resume
When Wacom devices wake up from a sleep, the switch mode command
(wacom_query_tablet_data) is needed before wacom_open is called.
wacom_query_tablet_data should not be executed inside wacom_open
since wacom_open is called more than once during probe.
wacom_retrieve_hid_descriptor is removed from wacom_resume due
to the fact that the required descriptors are stored properly
upon system resume.
Reported-and-tested-by: Anton Anikin <Anton@Anikin.name>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Sascha Hauer [Wed, 14 Apr 2010 07:17:30 +0000 (09:17 +0200)]
ASoC: imx-ssi: do not call hrtimer_disable in trigger function
Doing so causes a deadlock, so just signal the timer to stop
using an atomic variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stefan Richter [Sun, 11 Apr 2010 09:52:12 +0000 (11:52 +0200)]
firewire: cdev: change license of exported header files to MIT license
Among else, this allows projects like libdc1394 to carry copies of the
ABI related header files without them or distributors having to worry
about effects on the project's overall license terms. Switch to MIT
license as suggested by Kristian. Also update the year in the
copyright statement according to source history.
Cc: Jay Fenlason <fenlason@redhat.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Brian Waters [Thu, 15 Apr 2010 08:03:29 +0000 (04:03 -0400)]
ALSA: i2c: Fixed 8 checkpatch errors
Fixed 8 checkpatch errors (ERROR: do not use assignment in if condition)
in sound/i2c/i2c.c.
Signed-off-by: Brian Waters <brianmwaters@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 15 Apr 2010 07:02:41 +0000 (09:02 +0200)]
ALSA: hda - Add position_fix quirk for Biostar mobo
The Biostar mobo seems to give a wrong DMA position, resulting in
stuttering or skipping sounds on 2.6.34. Since the commit
7b3a177b0d4f92b3431b8dca777313a07533a710, "ALSA: pcm_lib: fix "something
must be really wrong" condition", makes the position check more strictly,
the DMA position problem is revealed more clearly now.
The fix is to use only LPIB for obtaining the position, i.e. passing
position_fix=1. This patch adds a static quirk to achieve it as default.
Reported-by: Frank Griffin <ftg@roadrunner.com>
Cc: Eric Piel <Eric.Piel@tremplin-utc.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Joerg Schirottke [Thu, 15 Apr 2010 06:37:41 +0000 (08:37 +0200)]
ALSA: hda - add a quirk for Clevo M570U laptop
Added the matching model for Clevo laptop M570U.
Signed-off-by: Joerg Schirottke <master@kanotix.com>
Tested-by: Maximilian Gerhard <maxbox@directbox.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Thu, 15 Apr 2010 01:46:03 +0000 (18:46 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
SELinux: Reduce max avtab size to avoid page allocation failures
Linus Torvalds [Thu, 15 Apr 2010 01:45:31 +0000 (18:45 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: use separate class for ceph sockets' sk_lock
ceph: reserve one more caps space when doing readdir
ceph: queue_cap_snap should always queue dirty context
ceph: fix dentry reference leak in dcache readdir
ceph: decode v5 of osdmap (pool names) [protocol change]
ceph: fix ack counter reset on connection reset
ceph: fix leaked inode ref due to snap metadata writeback race
ceph: fix snap context reference leaks
ceph: allow writeback of snapped pages older than 'oldest' snapc
ceph: fix dentry rehashing on virtual .snap dir
Linus Torvalds [Thu, 15 Apr 2010 01:45:14 +0000 (18:45 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (applesmc) Switch maintainers
hwmon: (applesmc) Add iMac9,1 and MacBookPro2,2 support
hwmon: (it87) Invalidate cache on temperature sensor change
hwmon: (it87) Properly handle wrong sensor type requests
hwmon: (it87) Don't arbitrarily enable temperature channels
hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n
hwmon: (sht15) Fix sht15_calc_temp interpolation function
Linus Torvalds [Thu, 15 Apr 2010 01:44:29 +0000 (18:44 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
lguest: stop using KVM hypercall mechanism
lguest: workaround cmpxchg8b_emu by ignoring cli in the guest.
Linus Torvalds [Thu, 15 Apr 2010 01:44:00 +0000 (18:44 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: Fix asm constraints for atomic_sub_and_test() and atomic_add_negative()
m68k: Fix `struct sigcontext' for ColdFire
Sascha Hauer [Wed, 14 Apr 2010 07:17:31 +0000 (09:17 +0200)]
ASoC: imx-ssi: increase minimum periods to 4
Currently the notification of elapsed periods is not very exact.
Increase minimum periods to 4 as suggested by Liam Girdwood.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stephen Smalley [Mon, 15 Mar 2010 14:42:11 +0000 (10:42 -0400)]
SELinux: Reduce max avtab size to avoid page allocation failures
Reduce MAX_AVTAB_HASH_BITS so that the avtab allocation is an order 2
allocation rather than an order 4 allocation on x86_64. This
addresses reports of page allocation failures:
http://marc.info/?l=selinux&m=
126757230625867&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=570433
Reported-by: Russell Coker <russell@coker.com.au>
Signed-off-by: Stephen D. Smalley <sds@tycho.nsa.gov>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Geert Uytterhoeven [Sun, 21 Mar 2010 09:52:21 +0000 (10:52 +0100)]
m68k: Fix asm constraints for atomic_sub_and_test() and atomic_add_negative()
Recently, we started seeing this on allmodconfig builds:
CC mm/memcontrol.o
{standard input}: Assembler messages:
{standard input}:4076: Error: operands mismatch -- statement `subl 12(%fp),170(%a0)' ignored
Correct the asm constraint, like done for m68knommu.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Maxim Kuvyrkov [Wed, 3 Mar 2010 13:53:45 +0000 (16:53 +0300)]
m68k: Fix `struct sigcontext' for ColdFire
LibSegFault uses piggybacks sc_fpstate field of the `struct sigcontext'
and this patch avoids LibSegFault overflowing this field. Also this
removes an unnecessary divergence from classic m68k.
Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Joe Perches [Wed, 14 Apr 2010 16:27:40 +0000 (09:27 -0700)]
vsprintf: Change struct printf_spec.precision from s8 to s16
Commit
ef0658f3de484bf9b173639cd47544584e01efa5 changed precision
from int to s8.
There is existing kernel code that uses a larger precision.
An example from the audit code:
vsnprintf(...,..., " msg='%.1024s'", (char *)data);
which overflows precision and truncates to nothing.
Extending precision size fixes the audit system issue.
Other changes:
Change the size of the struct printf_spec.type from u16 to u8 so
sizeof(struct printf_spec) stays as small as possible.
Reorder the struct members so sizeof(struct printf_spec) remains 64 bits
without alignment holes.
Document the struct members a bit more.
Original-patch-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Rydberg [Wed, 14 Apr 2010 14:14:11 +0000 (16:14 +0200)]
hwmon: (applesmc) Switch maintainers
Nicolas has expressed a wish to be relieved from the maintenance
of applesmc, so we simply switch maintainer with this patch.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Justin P. Mattock [Wed, 14 Apr 2010 14:14:10 +0000 (16:14 +0200)]
hwmon: (applesmc) Add iMac9,1 and MacBookPro2,2 support
Add the iMac9,1 and the MacBookPro2,2 temperature sensors to hwmon
driver applesmc to fix kernel bug #14429:
https://bugzilla.kernel.org/show_bug.cgi?id=14429
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Wed, 14 Apr 2010 14:14:10 +0000 (16:14 +0200)]
hwmon: (it87) Invalidate cache on temperature sensor change
When any temperature sensor type is changed, the corresponding
temperature value needs to be updated. The register caching mechanism
may delay this update, so we want to invalidate the cache to force an
immediate update.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Wed, 14 Apr 2010 14:14:09 +0000 (16:14 +0200)]
hwmon: (it87) Properly handle wrong sensor type requests
Currently, if someone tries to set the thermal sensor type to an
unsupported value, subsequent accesses to the chip may temporarily
show the sensor in question as disabled. Use a temporary variable
and only update the cached value on success, to prevent such
confusion.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Wed, 14 Apr 2010 14:14:09 +0000 (16:14 +0200)]
hwmon: (it87) Don't arbitrarily enable temperature channels
Temperature channels can be used in 2 different modes (thermistor and
thermal diode) and we don't know which one, if any, is correct for
every given board. So don't arbitrarily choose one. Instead, leave the
temperature channels untouched. They can be configured from user-space
if needed anyway.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Wed, 14 Apr 2010 14:14:08 +0000 (16:14 +0200)]
hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n
When CONFIG_REGULATOR isn't set, regulator_get_voltage() returns 0.
Properly handle this case by not trusting the value.
Reported-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Jerome Oufella [Wed, 14 Apr 2010 14:14:07 +0000 (16:14 +0200)]
hwmon: (sht15) Fix sht15_calc_temp interpolation function
I discovered two issues.
First the previous sht15_calc_temp() loop did not iterate through the
temppoints array since the (data->supply_uV > temppoints[i - 1].vdd)
test is always true in this direction.
Also the two-points linear interpolation function was returning biased
values due to a stray division by 1000 which shouldn't be there.
[JD: Also change the default value for d1 from 0 to something saner.]
Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Takashi Iwai [Wed, 14 Apr 2010 12:36:23 +0000 (14:36 +0200)]
ALSA: hda - Avoid invalid "Independent HP" control for VIA codecs
Some VIA codecs have no multiple source selection for headphone pins,
thus it's useless (and wrong) to create "Independent HP" control on them.
This patch adds the check of connections to skip the control in such a
case.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 14 Apr 2010 12:33:57 +0000 (14:33 +0200)]
ALSA: hda - Fix control element allocations in VIA codec parser
The commit
5b0cb1d850c26893b1468b3a519433a1b7a176be
ALSA: hda - add more NID->Control mapping
breaks the control element allocation by returning a wrong value.
Let's fix it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rusty Russell [Thu, 15 Apr 2010 03:43:54 +0000 (21:43 -0600)]
lguest: stop using KVM hypercall mechanism
This is a partial revert of
4cd8b5e2a159 "lguest: use KVM hypercalls";
we revert to using (just as questionable but more reliable) int $15 for
hypercalls. I didn't revert the register mapping, so we still use the
same calling convention as kvm.
KVM in more recent incarnations stopped injecting a fault when a guest
tried to use the VMCALL instruction from ring 1, so lguest under kvm
fails to make hypercalls. It was nice to share code with our KVM
cousins, but this was overreach.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Matias Zabaljauregui <zabaljauregui@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Rusty Russell [Thu, 15 Apr 2010 03:43:53 +0000 (21:43 -0600)]
lguest: workaround cmpxchg8b_emu by ignoring cli in the guest.
It's only used by cmpxchg8b_emu (see
db677ffa5f5a for the gory
details), and fixing that to be paravirt aware would be more work than
simply ignoring it (and AFAICT only help lguest). This makes lguest
work on machines which have cmpxchg8b, for kernels compiled for older
processors.
(We can't emulate it properly: the popf which expects to restore interrupts
does not trap).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: virtualization@lists.osdl.org
Dmitry Torokhov [Wed, 14 Apr 2010 06:08:58 +0000 (23:08 -0700)]
Revert "Input: wacom - merge out and in prox events"
This reverts commit
776943fd6f104a6e8457dc95a17282e69e963666 as it
causes issues with ISDv4 E3 touchscreens:
https://bugzilla.kernel.org/show_bug.cgi?id=15670
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Linus Torvalds [Wed, 14 Apr 2010 00:49:48 +0000 (17:49 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Hibernate: user.c, fix SNAPSHOT_SET_SWAP_AREA handling
Linus Torvalds [Tue, 13 Apr 2010 22:10:16 +0000 (15:10 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFSv4: fix delegated locking
NFS: Ensure that the WRITE and COMMIT RPC calls are always uninterruptible
NFS: Fix a race with the new commit code
NFS: Ensure that writeback_single_inode() calls write_inode() when syncing
NFS: Fix the mode calculation in nfs_find_open_context
NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR
Sage Weil [Tue, 13 Apr 2010 21:07:07 +0000 (14:07 -0700)]
ceph: use separate class for ceph sockets' sk_lock
Use a separate class for ceph sockets to prevent lockdep confusion.
Because ceph sockets only get passed kernel pointers, there is no
dependency from sk_lock -> mmap_sem. If we share the same class as other
sockets, lockdep detects a circular dependency from
mmap_sem (page fault) -> fs mutex -> sk_lock -> mmap_sem
because dependencies are noted from both ceph and user contexts. Using
a separate class prevents the sk_lock(ceph) -> mmap_sem dependency and
makes lockdep happy.
Signed-off-by: Sage Weil <sage@newdream.net>
Yehuda Sadeh [Tue, 13 Apr 2010 18:45:56 +0000 (11:45 -0700)]
ceph: reserve one more caps space when doing readdir
We were missing space for the directory cap. The result was a BUG at
fs/ceph/caps.c:2178.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil [Tue, 13 Apr 2010 18:41:22 +0000 (11:41 -0700)]
ceph: queue_cap_snap should always queue dirty context
This simplifies the calling convention, and fixes a bug where we queue a
capsnap with a context other than i_head_snapc (the one that matches the
dirty pages). The result was a BUG at fs/ceph/caps.c:2178 on writeback
completion when a capsnap matching the writeback snapc could not be found.
Signed-off-by: Sage Weil <sage@newdream.net>
Linus Torvalds [Tue, 13 Apr 2010 18:34:05 +0000 (11:34 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Add some more commentary to __raw_local_irq_save()
sparc64: Fix memory leak in pci_register_iommu_region().
sparc64: Add kmemleak annotation to sun4v_build_virq()
sparc64: Support kmemleak.
sparc64: Add function graph tracer support.
sparc64: Give a stack frame to the ftrace call sites.
sparc64: Use a seperate counter for timer interrupts and NMI checks, like x86.
sparc64: Remove profiling from some low-level bits.
sparc64: Kill unnecessary static on local var in ftrace_call_replace().
sparc64: Kill CONFIG_STACK_DEBUG code.
sparc64: Add HAVE_FUNCTION_TRACE_MCOUNT_TEST and tidy up.
sparc64: Adjust __raw_local_irq_save() to cooperate in NMIs.
sparc64: Use kstack_valid() in die_if_kernel().
Linus Torvalds [Tue, 13 Apr 2010 18:32:48 +0000 (11:32 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits)
smc91c92_cs: define multicast_table as unsigned char
can: avoids a false warning
e1000e: stop cleaning when we reach tx_ring->next_to_use
igb: restrict WoL for 82576 ET2 Quad Port Server Adapter
virtio_net: missing sg_init_table
Revert "tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb"
iwlwifi: need check for valid qos packet before free
tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb
udp: fix for unicast RX path optimization
myri10ge: fix rx_pause in myri10ge_set_pauseparam
net: corrected documentation for hardware time stamping
stmmac: use resource_size()
x.25 attempts to negotiate invalid throughput
x25: Patch to fix bug 15678 - x25 accesses fields beyond end of packet.
bridge: Fix IGMP3 report parsing
cnic: Fix crash during bnx2x MTU change.
qlcnic: fix set mac addr
r6040: fix r6040_multicast_list
vhost-net: fix vq_memory_access_ok error checking
ath9k: fix double calls to ath_radio_enable
...
Ingo Molnar [Tue, 13 Apr 2010 11:24:54 +0000 (13:24 +0200)]
Merge branch 'iommu/fixes' of git://git./linux/kernel/git/joro/linux-2.6-iommu into x86/urgent
Ken Kawasaki [Sat, 10 Apr 2010 12:50:14 +0000 (12:50 +0000)]
smc91c92_cs: define multicast_table as unsigned char
smc91c92_cs:
* define multicast_table as unsigned char
* remove unnecessary "#ifndef final_version"
Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 9 Apr 2010 23:47:31 +0000 (23:47 +0000)]
can: avoids a false warning
At this point optlen == sizeof(sfilter) but some compilers are dumb.
Reported-by: Németh Márton <nm127@freemail.h
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Terry Loftin [Fri, 9 Apr 2010 10:29:49 +0000 (10:29 +0000)]
e1000e: stop cleaning when we reach tx_ring->next_to_use
Tx ring buffers after tx_ring->next_to_use are volatile and could
change, possibly causing a crash. Stop cleaning when we hit
tx_ring->next_to_use.
Signed-off-by: Terry Loftin <terry.loftin@hp.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stefan Assmann [Fri, 9 Apr 2010 09:51:34 +0000 (09:51 +0000)]
igb: restrict WoL for 82576 ET2 Quad Port Server Adapter
Restrict Wake-on-LAN to first port on 82576 ET2 quad port NICs, as it is
only supported there.
Signed-off-by: Stefan Assmann <sassmann@redhat.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Takashi Iwai [Tue, 13 Apr 2010 09:14:43 +0000 (11:14 +0200)]
Merge branch 'fix/misc' into topic/misc
David S. Miller [Tue, 13 Apr 2010 08:50:43 +0000 (01:50 -0700)]
sparc64: Add some more commentary to __raw_local_irq_save()
Suggested by Peter Zijlstra
Signed-off-by: David S. Miller <davem@davemloft.net>
Philby John [Fri, 26 Mar 2010 16:07:51 +0000 (21:37 +0530)]
ALSA: aaci - Fix alignment faults on ARM Cortex introduced by commit
29a4f2d3
The commit
29a4f2d3 used writel() at offset 0x26 which is
half-word aligned causing unaligned exceptions on a
Cortex-A8. The original patch solved the "aaci-pl041 fpga:04:
ac97 read back fail" issue on a soft reset. Reading from any
arbitrary aaci register seems to solve this issue.
Signed-off-by: Philby John <pjohn@mvista.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
David S. Miller [Tue, 13 Apr 2010 07:28:45 +0000 (00:28 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
lib/Kconfig.debug
David S. Miller [Sun, 11 Apr 2010 03:26:55 +0000 (20:26 -0700)]
sparc64: Fix memory leak in pci_register_iommu_region().
Found by kmemleak.
If request_resource() fails, we leak the struct resource we
allocated to represent the IOMMU mapping area.
This actually happens on sun4v machines because the IOMEM area is only
reported sans the IOMMU region, unlike all previous systems. I'll
need to fix that at some point, but for now fix the leak.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 11 Apr 2010 03:24:22 +0000 (20:24 -0700)]
sparc64: Add kmemleak annotation to sun4v_build_virq()
The only reference we store to this memory is in the form of a
physical address, so kmemleak can't see it.
Add a kmemleak_not_leak() annotation.
It's probably useful to be able to look at a dump of these things
either via debugfs or similar, and thus we could at some point store
them in some kind of table and therefore get rid of this annotation.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 9 Apr 2010 07:14:35 +0000 (00:14 -0700)]
sparc64: Support kmemleak.
Only missing thing was an _sdata marker in vmlinux.lds.S
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 Apr 2010 11:41:33 +0000 (04:41 -0700)]
sparc64: Add function graph tracer support.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 Apr 2010 02:59:46 +0000 (19:59 -0700)]
sparc64: Give a stack frame to the ftrace call sites.
It's the only way we'll be able to implement the function
graph tracer properly.
A positive is that we no longer have to worry about the
linker over-optimizing the tail call, since we don't
use a tail call any more.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 Apr 2010 00:38:52 +0000 (17:38 -0700)]
sparc64: Use a seperate counter for timer interrupts and NMI checks, like x86.
This keeps us from having to use kstat_irqs_cpu() from the NMI handler,
the former of which is a profiled function.
Instead we use a currently empty slot in the cpu_data
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 Apr 2010 00:34:15 +0000 (17:34 -0700)]
sparc64: Remove profiling from some low-level bits.
These include the timer implementation, perf events support, and the
performance counter register (pcr) programming layer.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 Apr 2010 00:32:08 +0000 (17:32 -0700)]
sparc64: Kill unnecessary static on local var in ftrace_call_replace().
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 Apr 2010 05:36:03 +0000 (22:36 -0700)]
sparc64: Kill CONFIG_STACK_DEBUG code.
The generic stack tracer does this job just as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 Apr 2010 05:35:24 +0000 (22:35 -0700)]
sparc64: Add HAVE_FUNCTION_TRACE_MCOUNT_TEST and tidy up.
Check function_trace_stop at ftrace_caller
Toss mcount_call and dummy call of ftrace_stub, unnecessary.
Document problems we'll have if the final kernel image link
ever turns on relaxation.
Properly size 'ftrace_call' so it looks right when inspecting
instructions under gdb et al.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 Apr 2010 05:21:52 +0000 (22:21 -0700)]
sparc64: Adjust __raw_local_irq_save() to cooperate in NMIs.
If we are in an NMI then doing a plain raw_local_irq_disable() will
write PIL_NORMAL_MAX into %pil, which is lower than PIL_NMI, and thus
we'll re-enable NMIs and recurse.
Doing a simple:
%pil = %pil | PIL_NORMAL_MAX
does what we want, if we're already at PIL_NMI (15) we leave it at
that setting, else we set it to PIL_NORMAL_MAX (14).
This should get the function tracer working on sparc64.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 Apr 2010 05:16:22 +0000 (22:16 -0700)]
sparc64: Use kstack_valid() in die_if_kernel().
This gets rid of a local function (is_kernel_stack()) which tries to
do the same thing, yet poorly in that it doesn't handle IRQ stacks
properly.
Signed-off-by: David S. Miller <davem@davemloft.net>
Shirley Ma [Mon, 29 Mar 2010 15:19:15 +0000 (15:19 +0000)]
virtio_net: missing sg_init_table
Add missing sg_init_table for sg_set_buf in virtio_net which
induced in defer skb patch.
Reported-by: Thomas Müller <thomas@mathtm.de>
Tested-by: Thomas Müller <thomas@mathtm.de>
Signed-off-by: Shirley Ma <xma@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Tue, 13 Apr 2010 01:41:35 +0000 (18:41 -0700)]
Linux 2.6.34-rc4
Linus Torvalds [Tue, 13 Apr 2010 01:39:58 +0000 (18:39 -0700)]
Merge branch 'anonvma'
* anonvma:
anonvma: when setting up page->mapping, we need to pick the _oldest_ anonvma
anon_vma: clone the anon_vma chain in the right order
vma_adjust: fix the copying of anon_vma chains
Simplify and comment on anon_vma re-use for anon_vma_prepare()
Linus Torvalds [Tue, 13 Apr 2010 01:37:34 +0000 (18:37 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (21 commits)
ARM: Fix ioremap_cached()/ioremap_wc() for SMP platforms
ARM: 6043/1: AT91 slow-clock resume: Don't wait for a disabled PLL to lock
ARM: 6031/1: fix Thumb-2 decompressor
ARM: 6029/1: ep93xx: gpio.c: local functions should be static
ARM: 6028/1: ARM: add MAINTAINERS for U300
ARM: 6024/1: bcmring: fix missing down on semaphore in dma.c
MXC: mach_armadillo5x0: Add USB Host support.
ARM mach-mx3: duplicated include
ARM mach-mx3: duplicated include
imx31: add watchdog device on litekit board.
imx3: Add watchdog platform device support
MXC: mach-mx31_3ds: add support for freescale mc13783 power management device.
MXC: mach-mx31_3ds: Add SPI1 device support.
MXC: mach-mx31_3ds: Add support for on board NAND Flash.
MXC: mach-mx31_3ds: Update variable names over recent mach name modification.
imx31: fix parent clock for rtc
i.MX51: remove NFC AXI static mapping
i.MX51: determine silicon revision dynamically
i.MX51: map TZIC dynamically
i.MX51: Use correct clock for gpt
...
Linus Torvalds [Tue, 13 Apr 2010 01:37:04 +0000 (18:37 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/mason/btrfs-unstable
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: make sure the chunk allocator doesn't create zero length chunks
Btrfs: fix data enospc check overflow
Linus Torvalds [Tue, 13 Apr 2010 01:36:49 +0000 (18:36 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
quota: Fix possible dq_flags corruption
quota: Hide warnings about writes to the filesystem before quota was turned on
ext3: symlink must be handled via filesystem specific operation
ext2: symlink must be handled via filesystem specific operation
Linus Torvalds [Tue, 13 Apr 2010 01:36:34 +0000 (18:36 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-udf-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
udf: add speciffic ->setattr callback
udf: potential integer overflow
Linus Torvalds [Tue, 13 Apr 2010 01:36:11 +0000 (18:36 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (36 commits)
MIPS: Calculate proper ebase value for 64-bit kernels
MIPS: Alchemy: DB1200: Remove custom wait implementation
MIPS: Big Sur: Make defconfig more useful.
MIPS: Fix __vmalloc() etc. on MIPS for non-GPL modules
MIPS: Sibyte: Fix M3 TLB exception handler workaround.
MIPS: BCM63xx: Fix build failure in board_bcm963xx.c
MIPS: uasm: Add OR instruction.
MIPS: Sibyte: Apply M3 workaround only on affected chip types and versions.
MIPS: BCM63xx: Initialize gpio_out_low & out_high to current value at boot.
MIPS: BCM63xx: Register SSB SPROM fallback in board's first stage callback
MIPS: BCM63xx: Fix typo in cpu-feature-overrides file.
MIPS: BCM63xx: Add support for second uart.
MIPS: BCM63xx: Fix double gpio registration.
MIPS: BCM63xx: Add DWVS0 board
MIPS: BCM63xx: Add the RTA1025W-16 BCM6348-based board to suppported boards.
MIPS: BCM63xx: Fix BCM6338 and BCM6345 gpio count
MIPS: libgcc.h: Checkpatch cleanup
MIPS: Loongson-2F: Flush the branch target history in BTB and RAS
MIPS: Move signal trampolines off of the stack.
MIPS: Preliminary VDSO
...
Linus Torvalds [Tue, 13 Apr 2010 01:34:56 +0000 (18:34 -0700)]
Merge branch 'for-2.6.34' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.34' of git://linux-nfs.org/~bfields/linux:
svcrdma: RDMA support not yet compatible with RPC6
Linus Torvalds [Tue, 13 Apr 2010 01:34:25 +0000 (18:34 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: fix typo "numer" -> "number" in alloc.c
nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()
nilfs2: fix a wrong type conversion in nilfs_ioctl()
Linus Torvalds [Mon, 12 Apr 2010 19:44:29 +0000 (12:44 -0700)]
anonvma: when setting up page->mapping, we need to pick the _oldest_ anonvma
Otherwise we might be mapping in a page in a new mapping, but that page
(through the swapcache) would later be mapped into an old mapping too.
The page->mapping must be the case that works for everybody, not just
the mapping that happened to page it in first.
Here's the scenario:
- page gets allocated/mapped by process A. Let's call the anon_vma we
associate the page with 'A' to keep it easy to track.
- Process A forks, creating process B. The anon_vma in B is 'B', and has
a chain that looks like 'B' -> 'A'. Everything is fine.
- Swapping happens. The page (with mapping pointing to 'A') gets swapped
out (perhaps not to disk - it's enough to assume that it's just not
mapped any more, and lives entirely in the swap-cache)
- Process B pages it in, which goes like this:
do_swap_page ->
page = lookup_swap_cache(entry);
...
set_pte_at(mm, address, page_table, pte);
page_add_anon_rmap(page, vma, address);
And think about what happens here!
In particular, what happens is that this will now be the "first"
mapping of that page, so page_add_anon_rmap() used to do
if (first)
__page_set_anon_rmap(page, vma, address);
and notice what anon_vma it will use? It will use the anon_vma for
process B!
What happens then? Trivial: process 'A' also pages it in (nothing
happens, it's not the first mapping), and then process 'B' execve's
or exits or unmaps, making anon_vma B go away.
End result: process A has a page that points to anon_vma B, but
anon_vma B does not exist any more. This can go on forever. Forget
about RCU grace periods, forget about locking, forget anything like
that. The bug is simply that page->mapping points to an anon_vma
that was correct at one point, but was _not_ the one that was shared
by all users of that possible mapping.
Changing it to always use the deepest anon_vma in the anonvma chain gets
us to the safest model.
This can be improved in certain cases: if we know the page is private to
just this particular mapping (for example, it's a new page, or it is the
only swapcache entry), we could pick the top (most specific) anon_vma.
But that's a future optimization. Make it _work_ reliably first.
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Borislav Petkov <bp@alien8.de> [ "What do you know, I think you fixed it!" ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 12 Apr 2010 00:15:03 +0000 (17:15 -0700)]
anon_vma: clone the anon_vma chain in the right order
We want to walk the chain in reverse order when cloning it, so that the
order of the result chain will be the same as the order in the source
chain. When we add entries to the chain, they go at the head of the
chain, so we want to add the source head last.
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Borislav Petkov <bp@alien8.de> [ "No, it still oopses" ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>