linux-flexiantxendom0-natty.git
13 years agoUBUNTU: [Upstream] security: Yama LSM
Kees Cook [Mon, 21 Jun 2010 20:07:07 +0000 (13:07 -0700)]
UBUNTU: [Upstream] security: Yama LSM

This adds the Yama Linux Security Module to collect several security
features (symlink, hardlink, and PTRACE restrictions) that have existed
in various forms over the years and have been carried outside the mainline
kernel by other Linux distributions like Openwall and grsecurity.

Currently accepted in upstream security tree:
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git next

Signed-off-by: Kees Cook <kees.cook@canonical.com>
[kees: resolved AppArmor conflicts for Maverick merge]
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ARM: Adding regulator supply for vdds_sdi.
Mathieu J. Poirier [Sun, 27 Jun 2010 20:08:58 +0000 (14:08 -0600)]
UBUNTU: ARM: Adding regulator supply for vdds_sdi.

The omapfb driver couldn't locate its display sink because of
an initialisation error in the DSS subsystem.  This error was
caused by a missing 'sdi' entry in the board power regulator list.

BugLink: https://bugs.launchpad.net/bugs/597904

Signed-off-by: Mathieu Poirier <mathieu.poirier@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: [Upstream] HID: magicmouse: add param for scroll speed
Chase Douglas [Thu, 24 Jun 2010 15:37:29 +0000 (11:37 -0400)]
UBUNTU: [Upstream] HID: magicmouse: add param for scroll speed

The new scroll_speed param takes an integer value from 0 to 63, where 0
is slowest and 63 is fastest. The default of 32 remains the same. This
parameter also affects scroll acceleration linearly.

A second part of this change is a tightly coupled modification to the
scroll acceleration. Previously, scroll acceleration could be reset
without lifting the scroll finger. This is rather unintuitive and hard
to control in the case where a user wants faster scrolling, but wants to
hold the scroll touch for longer than a moment.

Note that scroll acceleration levels are now 1-7, where 7 is slowest. In
the previous implementation, there were 8 levels defined, but it was
impossible to start at the slowest level. In order to keep the default
scroll speed unchanged, only 7 levels are used now.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 0b778e76c1e7ccf49f8980b594e72f984095fd26
from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git)
Acked-by: Steve Conklin <steve.conklin@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: [Upstream] HID: magicmouse: properly account for scroll movement in state
Chase Douglas [Thu, 24 Jun 2010 15:37:28 +0000 (11:37 -0400)]
UBUNTU: [Upstream] HID: magicmouse: properly account for scroll movement in state

Before this change, sequential scroll events would take a variable
amount of movement due to incorrect accounting. This change ensures all
scroll movements require a deterministic touch movement for an action to
occur.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 8d93efb27ab8927ffc7a357f1b2d10039de50ed4
from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git)
Acked-by: Steve Conklin <steve.conklin@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: [Upstream] HID: magicmouse: disable and add module param for scroll acceleration
Chase Douglas [Thu, 24 Jun 2010 15:37:27 +0000 (11:37 -0400)]
UBUNTU: [Upstream] HID: magicmouse: disable and add module param for scroll acceleration

Scroll acceleration is unique to the magicmouse driver, and is
unintuitive to a user who is unaware of the functionality. Thus, disable
it by default, but add a module parameter to enable it for power users
who want it.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 9846f350ef4d4108c1154acfc125fe8d8630ef84
from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git)
Acked-by: Steve Conklin <steve.conklin@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: [Upstream] HID: magicmouse: scroll on entire surface, not just middle of...
Chase Douglas [Thu, 24 Jun 2010 15:37:26 +0000 (11:37 -0400)]
UBUNTU: [Upstream] HID: magicmouse: scroll on entire surface, not just middle of mouse

Previously, scroll events only occurred when the user moved a touch
along the middle of the touch surface. This is unintuitive for a normal
user who is not aware of this. The device has a uniform surface, so the
distinction is artificial. This change removes the touch area check for
a scroll event, which replicates the OS X behavior.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Michael Poole <mdpoole@troilus.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit ef566d30a702cc9b49d24edc4ad45c62208a4f5d
from git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git)
Acked-by: Steve Conklin <steve.conklin@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoperf probe: Add kernel source path option
Chase Douglas [Thu, 17 Jun 2010 21:08:11 +0000 (17:08 -0400)]
perf probe: Add kernel source path option

The probe plugin requires access to the source code for some operations.  The
source code must be in the exact same location as specified by the DWARF tags,
but sometimes the location is an absolute path that cannot be replicated by a
normal user. This change adds the -s|--source option to allow the user to
specify the root of the kernel source tree.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <1276543590-10486-1-git-send-email-chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
(cherry picked from commit 9ed7e1b85cd55dc46cb9410a23086bdaa2ff3eb9 from
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6.git)
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: SAUCE: add option to hand off all kernel parameters to init
Andy Whitcroft [Thu, 17 Jun 2010 09:46:47 +0000 (10:46 +0100)]
UBUNTU: SAUCE: add option to hand off all kernel parameters to init

BugLink: http://bugs.launchpad.net/bugs/586386

Some init packages such as upstart find having all of the kernel parameters
passed in useful.  Currently they have to open up /proc/cmdline and
reparse that to obtain this information.  Add a kernel configuration
option to enable passing of all options.

Note, enabling this option will reduce the chances that a fallback from
/sbin/init to /bin/bash or /bin/sh will succeed.  Though it should be
noted that there are commonly unknown options present which would already
break this fallback.  init=/bin/foo provides explicit control over options
which is unaffected by this change.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: [Upstream] USB: option: Remove duplicate AMOI_VENDOR_ID
Leann Ogasawara [Thu, 10 Jun 2010 21:51:54 +0000 (14:51 -0700)]
UBUNTU: [Upstream] USB: option: Remove duplicate AMOI_VENDOR_ID

AMOI_VENDOR_ID is defined twice.  Remove the duplicate entry and move
the AMOI_PRODUCT_9508 definition to be grouped with the other AMOI
product definitions.

Sent upstream:
http://thread.gmane.org/gmane.linux.usb.general/32545

Originally-by: Ben Collins <ben.collins@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: SAUCE: ndiswrapper: convert multicast list to list_head
Leann Ogasawara [Thu, 3 Jun 2010 20:34:15 +0000 (13:34 -0700)]
UBUNTU: SAUCE: ndiswrapper: convert multicast list to list_head

The following upstream commit removed mc_count from struct net_device
and converts multicast lists to list_head:

  commit 22bedad3ce112d5ca1eaf043d4990fa2ed698c87
  Author: Jiri Pirko <jpirko@redhat.com>
  Date:   Thu Apr 1 21:22:57 2010 +0000

    net: convert multicast list to list_head

Thus, we need to convert ndiscrapper to incorporate the same changes to
avoid build failures.

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: AUFS -- track changes to the arguements to fop fsync()
Andy Whitcroft [Thu, 3 Jun 2010 07:40:41 +0000 (08:40 +0100)]
UBUNTU: ubuntu: AUFS -- track changes to the arguements to fop fsync()

The file operation fsync dropped an unused struct dentry parameter,
apply this change to aufs2:

  commit 7ea8085910ef3dd4f3cad6845aaa2b580d39b115
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Wed May 26 17:53:25 2010 +0200

    drop unused dentry argument to ->fsync

WARNING: this currently removes support for syncing some forms of aufs
directory as we are now required to have a filp to sync against and aufs
does not always have them.  I have added a WARN_ON to try and track the
triggers for this mode if any.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: AUFS -- update to standalone 2.6.35-rcN as at 20100601
Andy Whitcroft [Thu, 3 Jun 2010 07:34:46 +0000 (08:34 +0100)]
UBUNTU: ubuntu: AUFS -- update to standalone 2.6.35-rcN as at 20100601

BugLink: http://bugs.launchpad.net/bugs/587888

Update to current aufs2 for v2.6.35-rcN:

  commit a9be01e5e9688018ebe9ef46ec5414bb356bc556
  Author: J. R. Okajima <hooanon05@yahoo.co.jp>
  Date:   Sun May 30 04:40:49 2010 +0900

    aufs: fi_hdir, rename au_do_refresh_file() to au_do_refresh_dir()

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: SAUCE: ndiswrapper: rename usb_buffer_alloc() and usb_buffer_free()
Leann Ogasawara [Thu, 3 Jun 2010 03:42:24 +0000 (20:42 -0700)]
UBUNTU: SAUCE: ndiswrapper: rename usb_buffer_alloc() and usb_buffer_free()

usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free()  is renamed to usb_free_coherent()

This is due to the removal of the usb_buffer_alloc() and
usb_buffer_free() macros:

  commit e26bcf37234c67624f62d9fc95f922b8dbda1363
  Author: Greg Kroah-Hartman <gregkh@suse.de>
  Date:   Thu Apr 29 15:46:07 2010 -0700

    USB: remove unused usb_buffer_alloc and usb_buffer_free macros

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: AUFS -- update to standalone 2.6.34 as at 20100601
Andy Whitcroft [Tue, 1 Jun 2010 13:23:50 +0000 (14:23 +0100)]
UBUNTU: ubuntu: AUFS -- update to standalone 2.6.34 as at 20100601

BugLink: http://bugs.launchpad.net/bugs/587888

Update to current aufs2 for v2.6.34:

  commit a9be01e5e9688018ebe9ef46ec5414bb356bc556
  Author: J. R. Okajima <hooanon05@yahoo.co.jp>
  Date:   Sun May 30 04:40:49 2010 +0900

    aufs: fi_hdir, rename au_do_refresh_file() to au_do_refresh_dir()

Also adds ubuntu/aufs/include to the include path for aufs so it can
find its types.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: AUFS -- aufs2 base patch for linux-2.6.34
Andy Whitcroft [Tue, 1 Jun 2010 13:10:55 +0000 (14:10 +0100)]
UBUNTU: ubuntu: AUFS -- aufs2 base patch for linux-2.6.34

BugLink: http://bugs.launchpad.net/bugs/587888

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: iscsitarget -- version 1.4.20.1
Leann Ogasawara [Wed, 26 May 2010 02:31:39 +0000 (19:31 -0700)]
UBUNTU: ubuntu: iscsitarget -- version 1.4.20.1

Update iscsitarget to the latest stable version (v1.4.20.1) from
sourceforge.

ExternalDriver: iscsi_trgt
Url: http://sourceforge.net/projects/iscsitarget/files/
Version: 1.4.20.1

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: SAUCE: Updated ndiswrapper to 1.56
Tim Gardner [Wed, 19 May 2010 15:17:26 +0000 (09:17 -0600)]
UBUNTU: SAUCE: Updated ndiswrapper to 1.56

BugLink: http://bugs.launchpad.net/bugs/582555

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: rtl8192se -- update to version 0015.0127.2010
Tim Gardner [Fri, 23 Apr 2010 16:55:46 +0000 (10:55 -0600)]
UBUNTU: ubuntu: rtl8192se -- update to version 0015.0127.2010

BugLink: http://bugs.launchpad.net/bugs/567016

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) dma-mapping: Remove WARN_ON in dma_free_coherent
Stefan Bader [Mon, 29 Mar 2010 17:12:36 +0000 (19:12 +0200)]
UBUNTU: SAUCE: (no-up) dma-mapping: Remove WARN_ON in dma_free_coherent

BugLink: http://bugs.launchpad.net/bugs/458201

Triggered by the following backtrace:

WARNING: at
/build/buildd/linux-2.6.32/arch/x86/include/asm/dma-mapping.h:154
___free_dma_mem_cluster+0x102/0x110()

 [<ffffffff81064f9b>] warn_slowpath_common+0x7b/0xc0
 [<ffffffff81064ff4>] warn_slowpath_null+0x14/0x20
 [<ffffffff8139a2a2>] ___free_dma_mem_cluster+0x102/0x110
 [<ffffffff8139a072>] __sym_mfree+0xd2/0x100
 [<ffffffff8139a109>] __sym_mfree_dma+0x69/0x100
 [<ffffffff8139245f>] sym_hcb_free+0x8f/0x1f0

This patch never will be accepted upstream because the WARN_ON
is supposed to perevent driver development which is only
compatible with x86 on x86 (ARM can sleep in that function).
The right way to fix it would be to make the offending function
use locks in the right way but that requires careful implementation.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid4-5 -- update to compile with 2.6.34-rc4
Leann Ogasawara [Wed, 14 Apr 2010 15:27:05 +0000 (08:27 -0700)]
UBUNTU: ubuntu: dm-raid4-5 -- update to compile with 2.6.34-rc4

Need to include linux/slab.h to prevent implicit declaration of
functions which otherwise result in build failures.

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agodrm/radeon/bo: add some fallback placements for VRAM only objects.
Dave Airlie [Fri, 19 Mar 2010 00:32:10 +0000 (10:32 +1000)]
drm/radeon/bo: add some fallback placements for VRAM only objects.

On constrained r100 systems compiz would fail to start due to a lack
of memory, we can just fallback place the objects rather than completely
failing it works a lot better.

Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>

(cherry picked from commit 924788672f9c802a4c8e6bc8d88fbc2c9b2e3089 drm-2.6)
BugLink: http://launchpad.net/bugs/507148

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid4-5 -- update to compile with 2.6.34-rc2
Leann Ogasawara [Fri, 26 Mar 2010 22:15:51 +0000 (15:15 -0700)]
UBUNTU: ubuntu: dm-raid4-5 -- update to compile with 2.6.34-rc2

The following commit removes unused params from dm_get_device().
Convert dm-raid4-5 to match:

  commit 8215d6ec5fee1e76545decea2cd73717efb5cb42
  Author: Nikanth Karthikesan <knikanth@novell.com>
  Date:   Sat Mar 6 02:32:27 2010 +0000

    dm table: remove unused dm_get_device range parameters

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: iscsitarget -- rename daddr inet_sock field
Leann Ogasawara [Wed, 24 Mar 2010 19:37:34 +0000 (12:37 -0700)]
UBUNTU: ubuntu: iscsitarget -- rename daddr inet_sock field

The following commit renames some inet_sock fields including daddr.
Update daddr to inet_daddr for iscsitarget.

  commit c720c7e8383aff1cb219bddf474ed89d850336e3
  Author: Eric Dumazet <eric.dumazet@gmail.com>
  Date:   Thu Oct 15 06:30:45 2009 +0000

    inet: rename some inet_sock fields

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid4-5 -- update to compile with 2.6.33
Leann Ogasawara [Wed, 24 Mar 2010 17:36:13 +0000 (10:36 -0700)]
UBUNTU: ubuntu: dm-raid4-5 -- update to compile with 2.6.33

The following commit adds a fn callback arguement to dm_dirty_log_create().
convert dm-raid4-5 to match:

    commit 87a8f240e9bcf025ba45e4563c842b0d59c5e8ef
    Author: Mikulas Patocka <mpatocka@redhat.com>
    Date:   Thu Dec 10 23:52:01 2009 +0000

        dm log: add flush callback fn

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) cdrom -- default to not locking the tray when in use
Andy Whitcroft [Thu, 11 Mar 2010 10:33:36 +0000 (10:33 +0000)]
UBUNTU: SAUCE: (no-up) cdrom -- default to not locking the tray when in use

BugLink: http://bugs.launchpad.net/bugs/397734

It seems that users are have a high expectation that the eject button
on their CDROM drive will eject the disk regardless of whether it is in
use or not.  To this end we are now changing the default LOCK mode for
mounted CDROMS to 0 to allow ejects.  This however does not handle the
direct open cases like music and video players.  From the launchpad bug
commentary:

    So, according to the upstream discussion David Zeuthen recommended
    to just not lock CD-ROM trays by default. Kernel/userspace already
    handles prematurely removed USB storage devices reasonably, and with
    read-only devices like CD-ROMs it is even less of an issue. So we
    should just set /proc/sys/dev/cdrom/lock to 0 by default.

Note that we still will have the drive mounted after the eject.  There is a
media change uevent generated and this will be used to trigger the unmount
of the drive in udisks.  The burner software will also have to be looked
at to ensure they are explicitly locking the drive closed during the burn.
This will all be handled under the bug above.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>

13 years agoUBUNTU: ubuntu: rtl8192se -- version 2010-0115,0014
Manoj Iyer [Tue, 2 Mar 2010 06:01:41 +0000 (00:01 -0600)]
UBUNTU: ubuntu: rtl8192se -- version 2010-0115,0014

ExternalDriver: rtl8192se_pci
Description:    Driver for RTL8191/92 or RTL8171 wifi nic
Url:            http://www.realtek.com/
Mask:
Version:        2010-0115,0014

Buglink: http://launchpad.net/bugs/530275

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) PM report driver and device suspend/resume times.
Manoj Iyer [Fri, 18 Dec 2009 00:57:47 +0000 (01:57 +0100)]
UBUNTU: SAUCE: (no-up) PM report driver and device suspend/resume times.

Based on a patch from Rafael J. Wysocki. This patch prints suspend/resume
information for each driver/device to dmesg.

[apw@canonical.com: rejigged to split config updates]
[apw@canonical.com: move the configuration item fix build when full PM
 is not enabled]
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: fsam7400: Depend on CHECK_SIGNATURE
Colin Watson [Thu, 25 Feb 2010 13:23:30 +0000 (13:23 +0000)]
UBUNTU: ubuntu: fsam7400: Depend on CHECK_SIGNATURE

Needed so that 'make defconfig && make' works.

Signed-off-by: Colin Watson <cjwatson@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid4-5: Depend on XOR_BLOCKS
Colin Watson [Thu, 25 Feb 2010 13:21:02 +0000 (13:21 +0000)]
UBUNTU: ubuntu: dm-raid4-5: Depend on XOR_BLOCKS

Needed so that 'make defconfig && make' works.

Signed-off-by: Colin Watson <cjwatson@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: khubd -- switch USB product/manufacturer/serial handling to RCU
Andy Whitcroft [Wed, 17 Feb 2010 10:13:42 +0000 (10:13 +0000)]
UBUNTU: SAUCE: khubd -- switch USB product/manufacturer/serial handling to RCU

BugLink: http://bugs.launchpad.net/bugs/510937

With the introduction of wireless USB hubs the product, manufacturer,
and serial number are now mutable.  This necessitates new locking in the
consumers of these values including the sysfs read routines in order to
prevent use-after-free acces to these values.  These extra locks create
significant lock contention leading to increased boot times (0.3s for an
example Atom based system).  Move update of these values to RCU based
locking.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agox86, mce: Make xeon75xx memory driver dependent on PCI
Andi Kleen [Sat, 23 Jan 2010 11:33:59 +0000 (12:33 +0100)]
x86, mce: Make xeon75xx memory driver dependent on PCI

commit 757fd770c649b0dfa6eeefc2d5e2ea3119b6be9c upstream (linux-2.6-tip)

Found by Ingo Molnar's automated tester.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <20100123113359.GA29555@one.firstfloor.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agox86, mce: Rename cpu_specific_poll to mce_cpu_specific_poll
H. Peter Anvin [Fri, 22 Jan 2010 02:31:54 +0000 (18:31 -0800)]
x86, mce: Rename cpu_specific_poll to mce_cpu_specific_poll

commit f91c4d2649531cc36e10c6bc0f92d0f99116b209 upstream (linux-2.6-tip)

cpu_specific_poll is a global variable, and it should have a global
namespace name.  Since it is MCE-specific (it takes a struct mce *),
rename it mce_cpu_specific_poll.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Andi Kleen <andi@firstfloor.org>
LKML-Reference: <20100121221711.GA8242@basil.fritz.box>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agox86, mce: Xeon75xx specific interface to get corrected memory error information
Andi Kleen [Thu, 21 Jan 2010 22:17:12 +0000 (23:17 +0100)]
x86, mce: Xeon75xx specific interface to get corrected memory error information

commit c773f70fd6b53ee646727f871833e53649907264 upstream (linux-2.6-tip)

Xeon 75xx doesn't log physical addresses on corrected machine check
events in the standard architectural MSRs. Instead the address has to
be retrieved in a model specific way. This makes it impossible to do
predictive failure analysis.

Implement cpu model specific code to do this in mce-xeon75xx.c using a
new hook that is called from the generic poll code. The code retrieves
the physical address/DIMM of the last corrected error from the
platform and makes the address look like a standard architectural MCA
address for further processing.

In addition the DIMM information is retrieved and put into two new
aux0/aux1 fields in struct mce.  These fields are specific to a given
CPU.  These fields can then be decoded by mcelog into specific DIMM
information.  The latest mcelog version has support for this.

Longer term this will be likely in a different output format, but
short term that seemed like the least intrusive solution. Older mcelog
can deal with an extended record.

There's no code to print this information on a panic because this only
works for corrected errors, and corrected errors do not usually result
in panics.

The act of retrieving the DIMM/PA information can take some time, so
this code has a rate limit to avoid taking too much CPU time on a
error flood.

The whole thing can be loaded as a module and has suitable PCI-IDs so
that it can be auto-loaded by a distribution.  The code also checks
explicitely for the expected CPU model number to make sure this code
doesn't run anywhere else.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <20100121221711.GA8242@basil.fritz.box>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: (no-up) arm -- enable ubuntu/ directory
Eric Miao [Mon, 25 Jan 2010 13:52:37 +0000 (21:52 +0800)]
UBUNTU: (no-up) arm -- enable ubuntu/ directory

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: Make CONFIG_{OMNIBOOK, AVERATEC_5100P, PACKARDBELL_E5} depend on X86
Eric Miao [Wed, 27 Jan 2010 04:02:24 +0000 (04:02 +0000)]
UBUNTU: SAUCE: Make CONFIG_{OMNIBOOK, AVERATEC_5100P, PACKARDBELL_E5} depend on X86

There options are really X86 specific, and the source won't compile on
ARM platforms. Make them depend on X86 and less confusing when syncing
config options to ARM.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: acpi battery -- move first lookup asynchronous
Andy Whitcroft [Thu, 24 Dec 2009 02:09:03 +0000 (02:09 +0000)]
UBUNTU: SAUCE: acpi battery -- move first lookup asynchronous

BugLink: http://bugs.launchpad.net/bugs/507211

When instantiating the battery object on to the acpi bus in the kernel
we talk to the BIOS to get the current battery state.  This can take
a long time and holds the acpi bus object locked for the duration.
This leads to any other object wishing to add itself that bus blocking.
This leads to unpredicatable delays of up to .3s when initialising the
hpet during boot depending on execution order.  Make the first update of
the battery asynchronous.  Move the acpi bus handling back synchronous.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: i915 -- disable powersave by default
Andy Whitcroft [Mon, 18 Jan 2010 16:43:11 +0000 (16:43 +0000)]
UBUNTU: SAUCE: i915 -- disable powersave by default

BugLink: http://bugs.launchpad.net/bugs/492392

Powersave move seems to trigger both flickering during normal use and
apparent hard locks of a solid colour on the whole screen.  Disabling
powersave seems to avoid both issues.  Move the default to 0 for now.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: async_populate_rootfs: move rootfs init earlier
Andy Whitcroft [Wed, 23 Dec 2009 16:43:07 +0000 (16:43 +0000)]
UBUNTU: SAUCE: async_populate_rootfs: move rootfs init earlier

Check to see if the machine has more than one active CPU, if it does
then it is worth starting the decode of the rootfs earlier.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: Increase the default prealloc buffer for HDA audio devices (non-modem)
Brad Figg [Mon, 7 Dec 2009 20:24:47 +0000 (12:24 -0800)]
UBUNTU: SAUCE: Increase the default prealloc buffer for HDA audio devices (non-modem)

This allows for buffering of up to 4 seconds of audio. This is
intended to improve the audio experience. This patch is being
carried by Fedora but is not upstream.

Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: onmibook -- Added missing BOM file
Manoj Iyer [Thu, 10 Dec 2009 18:13:15 +0000 (12:13 -0600)]
UBUNTU: ubuntu: onmibook -- Added missing BOM file

Forgot to add BOM file when I added omnibook module to ubuntu/
this patch adds it.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: fsam7400 -- Cleanup Makefile
Tim Gardner [Mon, 14 Dec 2009 23:17:34 +0000 (16:17 -0700)]
UBUNTU: ubuntu: fsam7400 -- Cleanup Makefile

Ripped out the cruft from this Makefile so as not
to confuse folks.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: iscsitarget --- version 1.4.19
Manoj Iyer [Fri, 4 Dec 2009 01:54:20 +0000 (19:54 -0600)]
UBUNTU: ubuntu: iscsitarget --- version 1.4.19

BugLink: http://bugs.launchpad.net/bugs/494693

ExternalDriver: iscsitarget
Description: iSCSI storage system on Linux
Url: svn://svn.berlios.de/iscsitarget/trunk
Mask:
Version: 1.4.19

Use filemap_write_and_wait_range() in place of sync_page_range().
This appears to better preserve the original semantics.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: ubuntu: omnibook -- support Toshiba (HP) netbooks
Manoj Iyer [Tue, 8 Dec 2009 03:20:32 +0000 (21:20 -0600)]
UBUNTU: ubuntu: omnibook -- support Toshiba (HP) netbooks

ExternalDriver: omnibook
Description: driver for HP & Toshiba laptops
Url: https://omnibook.svn.sourceforge.net/svnroot/omnibook/omnibook/trunk
Mask:
Version: 2.20070211

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>

13 years agoUBUNTU: UBUNTU: ubuntu: fsam7400 -- kill switch for Fujitsu Siemens Amilo M 7400
Manoj Iyer [Wed, 9 Dec 2009 17:54:32 +0000 (17:54 +0000)]
UBUNTU: UBUNTU: ubuntu: fsam7400 -- kill switch for Fujitsu Siemens Amilo M 7400

ExternalDriver: fsam7400
Description: SW RF kill switch for Fujitsu Siemens Amilo M7400/Maxdata
7000DX and compatible hardware.
Url: http://www.iragan.com/linux/fsam7400/
Mask:
Version: 0.5.2

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: isapnp_init: make isa PNP scans occur async
Andy Whitcroft [Wed, 2 Dec 2009 14:41:53 +0000 (14:41 +0000)]
UBUNTU: SAUCE: isapnp_init: make isa PNP scans occur async

The results of scanning for devices is to trigger udev events therefore
we can push this processing async.

This reduces kernel initialisation time (the time from bootloader to
starting userspace) by several 10ths of a second x86 32bit systems.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: Make populate_rootfs asynchronous
Surbhi Palande [Tue, 8 Dec 2009 09:44:34 +0000 (11:44 +0200)]
UBUNTU: SAUCE: Make populate_rootfs asynchronous

The expansion of the initramfs is completely independant of other
boot activities.  The original data is already present at boot and the
filesystem is not required until we are ready to start init.  It is
therefore reasonable to populate the rootfs asynchronously.  Move this
processing to an async call.

This reduces kernel initialisation time (the time from bootloader to
starting userspace) by several 10ths of a second on a selection of test
hardware particularly SMP systems, although UP system also benefit.

Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) select a v7 CPU for versatile
Loic Minier [Thu, 4 Jun 2009 13:53:41 +0000 (15:53 +0200)]
UBUNTU: SAUCE: (no-up) select a v7 CPU for versatile

This allows us to use this kernel under QEMU while still using the
main Ubuntu ARMv7 userspace.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: vfs: Add a trace point in the mark_inode_dirty function
Arjan van de Ven [Sun, 25 Oct 2009 22:37:04 +0000 (15:37 -0700)]
UBUNTU: SAUCE: vfs: Add a trace point in the mark_inode_dirty function

PowerTOP would like to be able to show who is keeping the disk
busy by dirtying data. The most logical spot for this is in the vfs
in the mark_inode_dirty() function. Doing this on the block level
is not possible because by the time the IO hits the block layer the
guilty party can no longer be found ("kjournald" and "pdflush" are not
useful answers to "who caused this file to be dirty).

The trace point follows the same logic/style as the block_dump code
and pretty much dumps the same data, just not to dmesg (and thus to
/var/log/messages) but via the trace events streams.

Note: This patch was posted to lkml and might potentially go into 2.6.33 but I
have not seen which maintainer will take it.

Signed-of-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) set /proc/acpi/video/*/DOS to 4 by default
Andy Whitcroft [Mon, 9 Nov 2009 17:30:29 +0000 (17:30 +0000)]
UBUNTU: SAUCE: (no-up) set /proc/acpi/video/*/DOS to 4 by default

BugLink: http://bugs.launchpad.net/bugs/458982

acpi_video_bus_start_devices() in drivers/acpi/video.c sets the default
ACPI DOS value to 0, which lets the OS handle toggling of display output
but still leaves the BIOS handling brightness levels automatically when
connecting/disconnecting AC.

We want the OS to handle both where possible, so a better default would
be to set this to 4.

This likely will regress systems using proprietary video drivers which
will need to change this setting back using the sysfs interfaces.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: [Upstream] add local prefix to oss local change_bits
Andy Whitcroft [Wed, 11 Nov 2009 13:29:30 +0000 (13:29 +0000)]
UBUNTU: [Upstream] add local prefix to oss local change_bits

[Fixes powerpc FTBFS]

This collides with upstream powerpc exported functions.  Rename the
local copy in the oss soundblaster mixer and ad1848 driver.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) trace: add trace events for open(), exec() and uselib()
Scott James Remnant [Tue, 27 Oct 2009 10:05:32 +0000 (10:05 +0000)]
UBUNTU: SAUCE: (no-up) trace: add trace events for open(), exec() and uselib()

BugLink: http://bugs.launchpad.net/bugs/462111

This patch uses TRACE_EVENT to add tracepoints for the open(),
exec() and uselib() syscalls so that ureadahead can cheaply trace
the boot sequence to determine what to read to speed up the next.

It's not upstream because it will need to be rebased onto the syscall
trace events whenever that gets merged, and is a stop-gap.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) raise the default console 'quiet' level to 2
Tim Gardner [Thu, 8 Oct 2009 17:42:36 +0000 (11:42 -0600)]
UBUNTU: SAUCE: (no-up) raise the default console 'quiet' level to 2

In the interests of providing a clean boot experience, i.e., a blank screen
before X starts, supress noisy driver messages.

See https://lists.ubuntu.com/archives/kernel-team/2009-October/007476.html
for the original diatribe.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid-45 -- update to compile with 2.6.32
Andy Whitcroft [Tue, 6 Oct 2009 08:33:30 +0000 (09:33 +0100)]
UBUNTU: ubuntu: dm-raid-45 -- update to compile with 2.6.32

This commit changed bio_barrier() to direct flag accessors,
convert dm-raid-4-5 to match:

  commit 1f98a13f623e0ef666690a18c1250335fc6d7ef1
  Author: Jens Axboe <jens.axboe@oracle.com>
  Date:   Fri Sep 11 14:32:04 2009 +0200

    bio: first step in sanitizing the bio->bi_rw flag testing

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) disable adding scsi headers to linux-libc-dev
Andy Whitcroft [Fri, 26 Jun 2009 09:59:30 +0000 (10:59 +0100)]
UBUNTU: SAUCE: (no-up) disable adding scsi headers to linux-libc-dev

Currently scsi headers are generated by the kernel and by libc6-dev.
We need to coordinate any switch over to the kernel.  Temporarily disabled
these headers in the kernel package.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: Sony laptop: Some Sony Vaia laptops do not enable wwan power by default.
Tim Gardner [Tue, 21 Apr 2009 17:09:10 +0000 (11:09 -0600)]
UBUNTU: Sony laptop: Some Sony Vaia laptops do not enable wwan power by default.

Bug: https://bugs.launchpad.net/bugs/364678

Added quirk to enable wwan power based on DMI information already present in the module.
Ity appears that Vaio's do not enable power to wwan from a cold boot.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: SAUCE: hotkey quirks for various Zeptro Znote and Fujitsu Amilo laptops
Andy Whitcroft [Mon, 23 Feb 2009 18:23:53 +0000 (18:23 +0000)]
UBUNTU: SAUCE: hotkey quirks for various Zeptro Znote and Fujitsu Amilo laptops

OriginalAuthor: Marius Wenderoth <scale87>
Bug: #330259

Add model specific quirks for the hotkeys for the laptops below:

Zepto Znote 6615WD
Zepto Znote 6625WD
FUJITSU SIEMENS AMILO Xi 2428

In each case the volume keys and the mute key do not correctly produce
key release events.  Quirk these to force a key release. (Patch modified
to compile with 2.6.30)

[apw@canonical.com: Track the consolidation of release quirks in the
commit below:

    commit 000c2a35b8b0485f5a872c24c4f2d0d6579951c1
    Author: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
    Date:   Fri Oct 16 16:13:59 2009 -0700

Input: atkbd - consolidate force release quirks for volume keys
]

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) nbd: Change default partitions per device to 15
Scott James Remnant [Mon, 16 Mar 2009 15:03:07 +0000 (15:03 +0000)]
UBUNTU: SAUCE: (no-up) nbd: Change default partitions per device to 15

This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated.  This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.

In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.

Bug: #342563

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) swap: Add notify_swap_entry_free callback for compcache
Tim Gardner [Sun, 15 Mar 2009 19:38:17 +0000 (13:38 -0600)]
UBUNTU: SAUCE: (no-up) swap: Add notify_swap_entry_free callback for compcache

Code is required for ubuntu/compcache

Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) hostap: Change initial operation mode to managed (infra)
Scott James Remnant [Tue, 3 Mar 2009 14:24:52 +0000 (14:24 +0000)]
UBUNTU: SAUCE: (no-up) hostap: Change initial operation mode to managed (infra)

This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated.  This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.

In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) libata: Ignore HPA by default.
Scott James Remnant [Tue, 3 Mar 2009 14:20:01 +0000 (14:20 +0000)]
UBUNTU: SAUCE: (no-up) libata: Ignore HPA by default.

This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated.  This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.

In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) version: Implement version_signature proc file.
Andy Whitcroft [Thu, 27 Nov 2008 19:12:07 +0000 (19:12 +0000)]
UBUNTU: SAUCE: (no-up) version: Implement version_signature proc file.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Tim Gardener <tim.gardner@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) Modularize vesafb
Ben Collins [Tue, 14 Oct 2008 15:30:10 +0000 (11:30 -0400)]
UBUNTU: SAUCE: (no-up) Modularize vesafb

Signed-off-by: Ben Collins <ben.collins@canonical.com>

13 years agoUBUNTU: SAUCE: Enable speedstep for sonoma processors.
cking [Wed, 13 Feb 2008 19:02:10 +0000 (19:02 +0000)]
UBUNTU: SAUCE: Enable speedstep for sonoma processors.

OriginalAuthor: Christophe Dumez, repackaged by Wolfgang Tremmel
OriginalLocation: http://launchpadlibrarian.net/11575235/speedstep-sonoma.patch
Bug: 132271

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ben Collins <ben.collins@canonical.com>

13 years agoUBUNTU: SAUCE: (no-up) Restore VT fonts on switch
Stefan Bader [Tue, 4 Mar 2008 22:10:36 +0000 (22:10 +0000)]
UBUNTU: SAUCE: (no-up) Restore VT fonts on switch

Not all X drivers save and restore fonts on text VTs. Add code to the
kernel to explicitly save and restore them on VT switches.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Ben Collins <ben.collins@canonical.com>

13 years agoUBUNTU: SAUCE: [PATCH] Add extra headers to linux-libc-dev
Tim Gardner [Wed, 2 Jan 2008 15:57:35 +0000 (08:57 -0700)]
UBUNTU: SAUCE: [PATCH] Add extra headers to linux-libc-dev

OriginalAuthor: Soren Hansen
OriginalLocation: https://lists.ubuntu.com/archives/kernel-team/2007-November/001891.html

Added
include/linux/netfilter_ipv6/ip6t_mh.h
include/linux/netfilter/xt_quota.h
to linux-libc-dev to fix iptables build of those two extensions.

Signed-off-by: Soren Hansen <soren at ubuntu.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: ubuntu: rfkill drivers -- version 1.3
Ben Collins [Fri, 18 Jul 2008 15:42:11 +0000 (11:42 -0400)]
UBUNTU: ubuntu: rfkill drivers -- version 1.3

Version: 1.3

Signed-off-by: Ben Collins <ben.collins@canonical.com>

13 years agoUBUNTU: ubuntu: ndiswrapper -- version 1.55
Andy Whitcroft [Mon, 29 Jun 2009 10:36:42 +0000 (11:36 +0100)]
UBUNTU: ubuntu: ndiswrapper -- version 1.55

ExternalDriver: ndiswrapper
Description: Windows network driver wrapper
Url: http://sourceforge.net/project/showfiles.php?group_id=93482
Version: 1.55

Update ndiswrapper to the latest version (v1.55) from sourceforge,
and renable.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid45 -- version 2009.04.24 (2.6.30-rc3)
Manoj Iyer [Wed, 1 Jul 2009 22:51:07 +0000 (17:51 -0500)]
UBUNTU: ubuntu: dm-raid45 -- version 2009.04.24 (2.6.30-rc3)

ExternalDriver: dm-raid45
Description: This software extends device-mapper by RAID4 and RAID5 mappings.
Url: http://people.redhat.com/~heinzm/sw/dm/dm-raid45/
Version: 2009.04.24 (2.6.30-rc3)

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

13 years agoUBUNTU: ubuntu: dm-raid4-5 -- (no-up) Export dm_disk function of device-mapper
Stefan Bader [Thu, 14 Feb 2008 14:55:49 +0000 (09:55 -0500)]
UBUNTU: ubuntu: dm-raid4-5 -- (no-up) Export dm_disk function of device-mapper

This function is externally used by the dm-raid4-5 module.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Ben Collins <ben.collins@canonical.com>

13 years agoUBUNTU: ubuntu: compcache -- version 0.5.3
Manoj Iyer [Sun, 5 Jul 2009 23:48:01 +0000 (17:48 -0600)]
UBUNTU: ubuntu: compcache -- version 0.5.3

ExternalDriver: ramzswap xvmalloc
Description: This is a RAM based block device which acts as swap disk.
Url: http://code.google.com/p/compcache/
Version: 0.5.3

rtg - cleaned up Kconfig, enabled BLK_DEV_COMPCACHE for all arches/flavours.
apw - further cleaned up Kconfig

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

13 years agoUBUNTU: (no-up) fold down debian for ubuntu-natty 2.6.36 rebase
Leann Ogasawara [Sat, 13 Mar 2010 01:13:25 +0000 (17:13 -0800)]
UBUNTU: (no-up) fold down debian for ubuntu-natty 2.6.36 rebase

Ignore: yes

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

13 years agoLinux 2.6.38.2
Greg Kroah-Hartman [Sun, 27 Mar 2011 18:37:20 +0000 (11:37 -0700)]
Linux 2.6.38.2

13 years agoext4: skip orphan cleanup if fs has unknown ROCOMPAT features
Amir Goldstein [Mon, 28 Feb 2011 05:53:45 +0000 (00:53 -0500)]
ext4: skip orphan cleanup if fs has unknown ROCOMPAT features

commit d39195c33bb1b5fdcb0f416e8a0b34bfdb07a027 upstream.

Orphan cleanup is currently executed even if the file system has some
number of unknown ROCOMPAT features, which deletes inodes and frees
blocks, which could be very bad for some RO_COMPAT features,
especially the SNAPSHOT feature.

This patch skips the orphan cleanup if it contains readonly compatible
features not known by this ext4 implementation, which would prevent
the fs from being mounted (or remounted) readwrite.

Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodcdbas: force SMI to happen when expected
Stuart Hayes [Wed, 2 Mar 2011 12:42:05 +0000 (13:42 +0100)]
dcdbas: force SMI to happen when expected

commit dd65c736d1b5312c80c88a64bf521db4959eded5 upstream.

The dcdbas driver can do an I/O write to cause a SMI to occur.  The SMI handler
looks at certain registers and memory locations, so the SMI needs to happen
immediately.  On some systems I/O writes are posted, though, causing the SMI to
happen well after the "outb" occurred, which causes random failures.  Following
the "outb" with an "inb" forces the write to go through even if it is posted.

Signed-off-by: Stuart Hayes <stuart_hayes@yahoo.com>
Acked-by: Doug Warzecha <douglas_warzecha@dell.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agofs: call security_d_instantiate in d_obtain_alias V2
Josef Bacik [Fri, 19 Nov 2010 01:52:55 +0000 (20:52 -0500)]
fs: call security_d_instantiate in d_obtain_alias V2

commit 24ff6663ccfdaf088dfa7acae489cb11ed4f43c4 upstream.

While trying to track down some NFS problems with BTRFS, I kept noticing I was
getting -EACCESS for no apparent reason.  Eric Paris and printk() helped me
figure out that it was SELinux that was giving me grief, with the following
denial

type=AVC msg=audit(1290013638.413:95): avc:  denied  { 0x800000 } for  pid=1772
comm="nfsd" name="" dev=sda1 ino=256 scontext=system_u:system_r:kernel_t:s0
tcontext=system_u:object_r:unlabeled_t:s0 tclass=file

Turns out this is because in d_obtain_alias if we can't find an alias we create
one and do all the normal instantiation stuff, but we don't do the
security_d_instantiate.

Usually we are protected from getting a hashed dentry that hasn't yet run
security_d_instantiate() by the parent's i_mutex, but obviously this isn't an
option there, so in order to deal with the case that a second thread comes in
and finds our new dentry before we get to run security_d_instantiate(), we go
ahead and call it if we find a dentry already.  Eric assures me that this is ok
as the code checks to see if the dentry has been initialized already so calling
security_d_instantiate() against the same dentry multiple times is ok.  With
this patch I'm no longer getting errant -EACCESS values.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoSUNRPC: Never reuse the socket port after an xs_close()
Trond Myklebust [Tue, 22 Mar 2011 22:40:10 +0000 (18:40 -0400)]
SUNRPC: Never reuse the socket port after an xs_close()

commit 246408dcd5dfeef2df437ccb0ef4d6ee87805f58 upstream.

If we call xs_close(), we're in one of two situations:
 - Autoclose, which means we don't expect to resend a request
 - bind+connect failed, which probably means the port is in use

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoNFS: Fix a hang/infinite loop in nfs_wb_page()
Trond Myklebust [Mon, 21 Mar 2011 19:37:01 +0000 (15:37 -0400)]
NFS: Fix a hang/infinite loop in nfs_wb_page()

commit b8413f98f997bb3ed7327e6d7117e7e91ce010c3 upstream.

When one of the two waits in nfs_commit_inode() is interrupted, it
returns a non-negative value, which causes nfs_wb_page() to think
that the operation was successful causing it to busy-loop rather
than exiting.
It also causes nfs_file_fsync() to incorrectly report the file as
being successfully committed to disk.

This patch fixes both problems by ensuring that we return an error
if the attempts to wait fail.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoperf: Fix tear-down of inherited group events
Peter Zijlstra [Tue, 15 Mar 2011 13:37:10 +0000 (14:37 +0100)]
perf: Fix tear-down of inherited group events

commit 38b435b16c36b0d863efcf3f07b34a6fac9873fd upstream.

When destroying inherited events, we need to destroy groups too,
otherwise the event iteration in perf_event_exit_task_context() will
miss group siblings and we leak events with all the consequences.

Reported-and-tested-by: Vince Weaver <vweaver1@eecs.utk.edu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1300196470.2203.61.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodrm/radeon/kms: fix hardcoded EDID handling
Alex Deucher [Wed, 23 Mar 2011 08:10:10 +0000 (08:10 +0000)]
drm/radeon/kms: fix hardcoded EDID handling

commit fafcf94e2b5732d1e13b440291c53115d2b172e9 upstream.

On some servers there is a hardcoded EDID provided
in the vbios so that the driver will always see a
display connected even if something like a KVM
prevents traditional means like DDC or load
detection from working properly.  Also most
server boards with DVI are not actually DVI, but
DVO connected to a virtual KVM service processor.
If we fail to detect a monitor via DDC or load
detection and a hardcoded EDID is available, use
it.

Additionally, when using the hardcoded EDID, use
a copy of it rather than the actual one stored
in the driver as the detect() and get_modes()
functions may free it if DDC is successful.

This fixes the virtual KVM on several internal
servers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodrm/radeon/kms: prefer legacy pll algo for tv-out
Alex Deucher [Tue, 22 Mar 2011 05:46:12 +0000 (01:46 -0400)]
drm/radeon/kms: prefer legacy pll algo for tv-out

commit 64146f8b2af1ba77fe3c21d9d6d7213b9bb72b40 upstream.

ntsc seems to work fine with either algo, some
pal TVs seem pickier.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=30832

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodrm: Fix use-after-free in drm_gem_vm_close()
Chris Wilson [Thu, 17 Mar 2011 22:33:33 +0000 (22:33 +0000)]
drm: Fix use-after-free in drm_gem_vm_close()

commit b74ad5ae14def5e81ad0be3dddb96e485b861b1b upstream.

As we may release the last reference, we need to store the device in a
local variable in order to unlock afterwards.

[   60.140768] BUG: unable to handle kernel paging request at 6b6b6b9f
[   60.140973] IP: [<c1536d11>] __mutex_unlock_slowpath+0x5a/0x111
[   60.141014] *pdpt = 0000000024a54001 *pde = 0000000000000000
[   60.141014] Oops: 0002 [#1] PREEMPT SMP
[   60.141014] last sysfs file: /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0/voltage_now
[   60.141014] Modules linked in: uvcvideo ath9k pegasus ath9k_common ath9k_hw hid_egalax ath3k joydev asus_laptop sparse_keymap battery input_polldev
[   60.141014]
[   60.141014] Pid: 771, comm: meego-ux-daemon Not tainted 2.6.37.2-7.1 #1 EXOPC EXOPG06411/EXOPG06411
[   60.141014] EIP: 0060:[<c1536d11>] EFLAGS: 00010046 CPU: 0
[   60.141014] EIP is at __mutex_unlock_slowpath+0x5a/0x111
[   60.141014] EAX: 00000100 EBX: 6b6b6b9b ECX: e9b4a1b0 EDX: e4a4e580
[   60.141014] ESI: db162558 EDI: 00000246 EBP: e480be50 ESP: e480be44
[   60.141014]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[   60.141014] Process meego-ux-daemon (pid: 771, ti=e480a000 task=e9b4a1b0 task.ti=e480a000)
[   60.141014] Stack:
[   60.141014]  e4a4e580 db162558 f5a2f838 e480be58 c1536dd0 e480be68 c125ab1b db162558
[   60.141014]  db1624e0 e480be78 c10ba071 db162558 f760241c e480be94 c10bb0bc 000155fe
[   60.141014]  f760241c f5a2f838 f5a2f8c8 00000000 e480bea4 c1037c24 00000000 f5a2f838
[   60.141014] Call Trace:
[   60.141014]  [<c1536dd0>] ? mutex_unlock+0x8/0xa
[   60.141014]  [<c125ab1b>] ? drm_gem_vm_close+0x39/0x3d
[   60.141014]  [<c10ba071>] ? remove_vma+0x2d/0x58
[   60.141014]  [<c10bb0bc>] ? exit_mmap+0x126/0x13f
[   60.141014]  [<c1037c24>] ? mmput+0x37/0x9a
[   60.141014]  [<c10d450d>] ? exec_mmap+0x178/0x19c
[   60.141014]  [<c1537f85>] ? _raw_spin_unlock+0x1d/0x36
[   60.141014]  [<c10d4eb0>] ? flush_old_exec+0x42/0x75
[   60.141014]  [<c1104442>] ? load_elf_binary+0x32a/0x922
[   60.141014]  [<c10d3f76>] ? search_binary_handler+0x200/0x2ea
[   60.141014]  [<c10d3ecf>] ? search_binary_handler+0x159/0x2ea
[   60.141014]  [<c1104118>] ? load_elf_binary+0x0/0x922
[   60.141014]  [<c10d56b2>] ? do_execve+0x1ff/0x2e6
[   60.141014]  [<c100970e>] ? sys_execve+0x2d/0x55
[   60.141014]  [<c1002a5a>] ? ptregs_execve+0x12/0x18
[   60.141014]  [<c10029dc>] ? sysenter_do_call+0x12/0x3c
[   60.141014]  [<c1530000>] ? init_centaur+0x9c/0x1ba
[   60.141014] Code: c1 00 75 0f ba 38 01 00 00 b8 8c 3a 6c c1 e8 cc 2e b0 ff 9c 58 8d 74 26 00 89 c7 fa 90 8d 74 26 00 e8 d2 b4 b2 ff b8 00 01 00 00 <f0> 66 0f c1 43 04 38 e0 74 07 f3 90 8a 43 04 eb f5 83 3d 64 ef
[   60.141014] EIP: [<c1536d11>] __mutex_unlock_slowpath+0x5a/0x111 SS:ESP 0068:e480be44
[   60.141014] CR2: 000000006b6b6b9f

Reported-by: Rusty Lynch <rusty.lynch@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodrm/i915: Prevent racy removal of request from client list
Herton Ronaldo Krzesinski [Thu, 17 Mar 2011 13:45:12 +0000 (13:45 +0000)]
drm/i915: Prevent racy removal of request from client list

commit 09bfa51773c1e90f13000dc2fc0c4b84047009bc upstream.

When i915_gem_retire_requests_ring calls i915_gem_request_remove_from_client,
the client_list for that request may already be removed in i915_gem_release.
So we may call twice list_del(&request->client_list), resulting in an
oops like this report:

[126167.230394] BUG: unable to handle kernel paging request at 00100104
[126167.230699] IP: [<f8c2ce44>] i915_gem_retire_requests_ring+0xd4/0x240 [i915]
[126167.231042] *pdpt = 00000000314c1001 *pde = 0000000000000000
[126167.231314] Oops: 0002 [#1] SMP
[126167.231471] last sysfs file: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT1/current_now
[126167.231901] Modules linked in: snd_seq_dummy nls_utf8 isofs btrfs zlib_deflate libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs exportfs reiserfs cryptd aes_i586 aes_generic binfmt_misc vboxnetadp vboxnetflt vboxdrv parport_pc ppdev snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep arc4 snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq uvcvideo videodev snd_timer snd_seq_device joydev iwlagn iwlcore mac80211 snd cfg80211 soundcore i915 drm_kms_helper snd_page_alloc psmouse drm serio_raw i2c_algo_bit video lp parport usbhid hid sky2 sdhci_pci ahci sdhci libahci
[126167.232018]
[126167.232018] Pid: 1101, comm: Xorg Not tainted 2.6.38-6-generic-pae #34-Ubuntu Gateway                          MC7833U /
[126167.232018] EIP: 0060:[<f8c2ce44>] EFLAGS: 00213246 CPU: 0
[126167.232018] EIP is at i915_gem_retire_requests_ring+0xd4/0x240 [i915]
[126167.232018] EAX: 00200200 EBX: f1ac25b0 ECX: 00000040 EDX: 00100100
[126167.232018] ESI: f1a2801c EDI: e87fc060 EBP: ef4d7dd8 ESP: ef4d7db0
[126167.232018]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[126167.232018] Process Xorg (pid: 1101, ti=ef4d6000 task=f1ba6500 task.ti=ef4d6000)
[126167.232018] Stack:
[126167.232018]  f1a28000 f1a2809c f1a28094 0058bd97 f1aa2400 f1a2801c 0058bd7b 0058bd85
[126167.232018]  f1a2801c f1a28000 ef4d7e38 f8c2e995 ef4d7e30 ef4d7e60 c14d1ebc f6b3a040
[126167.232018]  f1522cc0 000000db 00000000 f1ba6500 ffffffa1 00000000 00000001 f1a29214
[126167.232018] Call Trace:

Unfortunately the call trace reported was cut, but looking at debug
symbols the crash is at __list_del, when probably list_del is called
twice on the same request->client_list, as the dereferenced value is
LIST_POISON1 + 4, and by looking more at the debug symbols before
list_del call it should have being called by
i915_gem_request_remove_from_client

And as I can see in the code, it seems we indeed have the possibility
to remove a request->client_list twice, which would cause the above,
because we do list_del(&request->client_list) on both
i915_gem_request_remove_from_client and i915_gem_release

As Chris Wilson pointed out, it's indeed the case:
"(...) I had thought that the actual insertion/deletion was serialised
under the struct mutex and the intention of the spinlock was to protect
the unlocked list traversal during throttling. However, I missed that
i915_gem_release() is also called without struct mutex and so we do need
the double check for i915_gem_request_remove_from_client()."

This change does the required check to avoid the duplicate remove of
request->client_list.

Bugzilla: http://bugs.launchpad.net/bugs/733780
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodrm/i915: Disable pagefaults along execbuffer relocation fast path
Chris Wilson [Mon, 14 Mar 2011 15:11:24 +0000 (15:11 +0000)]
drm/i915: Disable pagefaults along execbuffer relocation fast path

commit d4aeee776017b6da6dcd12f453cd82a3c951a0dc upstream.

Along the fast path for relocation handling, we attempt to copy directly
from the user data structures whilst holding our mutex. This causes
lockdep to warn about circular lock dependencies if we need to pagefault
the user pages. [Since when handling a page fault on a mmapped bo, we
need to acquire the struct mutex whilst already holding the mm
semaphore, it is then verboten to acquire the mm semaphore when already
holding the struct mutex. The likelihood of the user passing in the
relocations contained in a GTT mmaped bo is low, but conceivable for
extreme pathology.] In order to force the mm to return EFAULT rather
than handle the pagefault, we therefore need to disable pagefaults
across the relocation fast path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agodrm: check for modesetting on modeset ioctls
Dave Airlie [Tue, 8 Feb 2011 03:55:21 +0000 (13:55 +1000)]
drm: check for modesetting on modeset ioctls

commit fb3b06c8a1fd1a80298f13b738ab38ef8c73baff upstream.

Noticed this while working on some other things, helps if we check for modeset
enabled on modesetting ioctls.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agox86: Cleanup highmap after brk is concluded
Yinghai Lu [Fri, 18 Feb 2011 11:30:30 +0000 (11:30 +0000)]
x86: Cleanup highmap after brk is concluded

commit e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e upstream.

Now cleanup_highmap actually is in two steps: one is early in head64.c
and only clears above _end; a second one is in init_memory_mapping() and
tries to clean from _brk_end to _end.
It should check if those boundaries are PMD_SIZE aligned but currently
does not.
Also init_memory_mapping() is called several times for numa or memory
hotplug, so we really should not handle initial kernel mappings there.

This patch moves cleanup_highmap() down after _brk_end is settled so
we can do everything in one step.
Also we honor max_pfn_mapped in the implementation of cleanup_highmap.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
LKML-Reference: <alpine.DEB.2.00.1103171739050.3382@kaball-desktop>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agofs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
Jens Axboe [Thu, 17 Mar 2011 10:13:12 +0000 (11:13 +0100)]
fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away

commit 95f28604a65b1c40b6c6cd95e58439cd7ded3add upstream.

We don't have proper reference counting for this yet, so we run into
cases where the device is pulled and we OOPS on flushing the fs data.
This happens even though the dirty inodes have already been
migrated to the default_backing_dev_info.

Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Tested-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agofix deadlock in pivot_root()
Al Viro [Fri, 18 Mar 2011 12:29:36 +0000 (08:29 -0400)]
fix deadlock in pivot_root()

commit 27cb1572e3e6bb1f8cf6bb3d74c914a87b131792 upstream.

Don't hold vfsmount_lock over the loop traversing ->mnt_parent;
do check_mnt(new.mnt) under namespace_sem instead; combined with
namespace_sem held over all that code it'll guarantee the stability
of ->mnt_parent chain all the way to the root.

Doing check_mnt() outside of namespace_sem in case of pivot_root()
is wrong anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoUSB: cdc-acm: fix potential null-pointer dereference on disconnect
Johan Hovold [Tue, 22 Mar 2011 10:12:11 +0000 (11:12 +0100)]
USB: cdc-acm: fix potential null-pointer dereference on disconnect

commit 7e7797e7f6f7bfab73fca02c65e40eaa5bb9000c upstream.

Fix potential null-pointer exception on disconnect introduced by commit
11ea859d64b69a747d6b060b9ed1520eab1161fe (USB: additional power savings
for cdc-acm devices that support remote wakeup).

Only access acm->dev after making sure it is non-null in control urb
completion handler.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoUSB: cdc-acm: fix potential null-pointer dereference
Johan Hovold [Tue, 22 Mar 2011 10:12:10 +0000 (11:12 +0100)]
USB: cdc-acm: fix potential null-pointer dereference

commit 15e5bee33ffc11d0e5c6f819a65e7881c5c407be upstream.

Must check return value of tty_port_tty_get.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoUSB: cdc-acm: fix memory corruption / panic
Johan Hovold [Tue, 22 Mar 2011 10:12:09 +0000 (11:12 +0100)]
USB: cdc-acm: fix memory corruption / panic

commit 23b80550e2aa61d0ba3af98b831b9195be0db9ee upstream.

Prevent read urbs from being resubmitted from tasklet after port close.

The receive tasklet was not disabled on port close, which could lead to
corruption of receive lists on consecutive port open. In particular,
read urbs could be re-submitted before port open, added to free list in
open, and then added a second time to the free list in the completion
handler.

cdc-acm.c: Entering acm_tty_open.
cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0
cdc-acm.c: Entering acm_rx_tasklet
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da280, rcv 0xf57fbc24, buf 0xf57fbd64
cdc-acm.c: set line: 115200 0 0 8
cdc-acm.c: acm_control_msg: rq: 0x20 val: 0x0 len: 0x7 result: 7
cdc-acm.c: acm_tty_close
cdc-acm.c: acm_port_down
cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0
cdc-acm.c: acm_ctrl_irq - urb shutting down with status: -2
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da300, rcv 0xf57fbc10, buf 0xf57fbd50
cdc-acm.c: Entering acm_read_bulk with status -2
cdc_acm 4-1:1.1: Aborting, acm not ready
cdc-acm.c: Entering acm_read_bulk with status -2
cdc_acm 4-1:1.1: Aborting, acm not ready
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da380, rcv 0xf57fbbfc, buf 0xf57fbd3c
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da400, rcv 0xf57fbbe8, buf 0xf57fbd28
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da480, rcv 0xf57fbbd4, buf 0xf57fbd14
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da900, rcv 0xf57fbbc0, buf 0xf57fbd00
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da980, rcv 0xf57fbbac, buf 0xf57fbcec
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50daa00, rcv 0xf57fbb98, buf 0xf57fbcd8
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50daa80, rcv 0xf57fbb84, buf 0xf57fbcc4
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dab00, rcv 0xf57fbb70, buf 0xf57fbcb0
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dab80, rcv 0xf57fbb5c, buf 0xf57fbc9c
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dac00, rcv 0xf57fbb48, buf 0xf57fbc88
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dac80, rcv 0xf57fbb34, buf 0xf57fbc74
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dad00, rcv 0xf57fbb20, buf 0xf57fbc60
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dad80, rcv 0xf57fbb0c, buf 0xf57fbc4c
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da880, rcv 0xf57fbaf8, buf 0xf57fbc38
cdc-acm.c: Entering acm_tty_open.
cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0
cdc-acm.c: Entering acm_rx_tasklet
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da280, rcv 0xf57fbc24, buf 0xf57fbd64
cdc-acm.c: Entering acm_tty_write to write 3 bytes,
cdc-acm.c: Get 3 bytes...
cdc-acm.c: acm_write_start susp_count: 0
cdc-acm.c: Entering acm_read_bulk with status 0
------------[ cut here ]------------
WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:57 list_del+0x10c/0x120()
Hardware name: Vostro 1520
list_del corruption. next->prev should be f57fbc10, but was f57fbaf8
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Not tainted 2.6.37+ #39
Call Trace:
 [<c103c7e2>] warn_slowpath_common+0x72/0xa0
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
 [<c11dd8ac>] list_del+0x10c/0x120
 [<f8051dbf>] acm_rx_tasklet+0xef/0x3e0 [cdc_acm]
 [<c135465d>] ? net_rps_action_and_irq_enable+0x6d/0x80
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
---[ end trace efd9a11434f0082e ]---
------------[ cut here ]------------
WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:57 list_del+0x10c/0x120()
Hardware name: Vostro 1520
list_del corruption. next->prev should be f57fbd50, but was f57fbdb0
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39
Call Trace:
 [<c103c7e2>] warn_slowpath_common+0x72/0xa0
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
 [<c11dd8ac>] list_del+0x10c/0x120
 [<f8051dd6>] acm_rx_tasklet+0x106/0x3e0 [cdc_acm]
 [<c135465d>] ? net_rps_action_and_irq_enable+0x6d/0x80
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
---[ end trace efd9a11434f0082f ]---
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da300, rcv 0xf57fbc10, buf 0xf57fbd50
cdc-acm.c: disconnected from network
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da380, rcv 0xf57fbbfc, buf 0xf57fbd3c
cdc-acm.c: Entering acm_rx_tasklet
------------[ cut here ]------------
WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:48 list_del+0xd5/0x120()
Hardware name: Vostro 1520
list_del corruption, next is LIST_POISON1 (00100100)
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39
Call Trace:
 [<c103c7e2>] warn_slowpath_common+0x72/0xa0
 [<c11dd875>] ? list_del+0xd5/0x120
 [<c11dd875>] ? list_del+0xd5/0x120
 [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
 [<c11dd875>] list_del+0xd5/0x120
 [<f8051fac>] acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
 [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
 [<c1042b30>] ? tasklet_action+0x60/0x140
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
---[ end trace efd9a11434f00830 ]---
BUG: unable to handle kernel paging request at 00200200
IP: [<c11dd7bd>] list_del+0x1d/0x120
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/tty/ttyACM0/uevent
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39 0T816J/Vostro 1520
EIP: 0060:[<c11dd7bd>] EFLAGS: 00010046 CPU: 0
EIP is at list_del+0x1d/0x120
EAX: f57fbd3c EBX: f57fb800 ECX: ffff8000 EDX: 00200200
ESI: f57fbe90 EDI: f57fbd3c EBP: f600bf54 ESP: f600bf3c
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process ksoftirqd/0 (pid: 3, ti=f600a000 task=f60791c0 task.ti=f6082000)
Stack:
 c1527e84 00000030 c1527e54 00100100 f57fb800 f57fbd3c f600bf98 f8051fac
 f8053104 f8052b94 f600bf6c c106dbab f600bf80 00000286 f60791c0 c1042b30
 f57fbda8 f57f5800 f57fbdb0 f57fbd80 f57fbe7c c1656b04 00000000 f600bfb0
Call Trace:
 [<f8051fac>] ? acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
 [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
 [<c1042b30>] ? tasklet_action+0x60/0x140
 [<c1042bb6>] ? tasklet_action+0xe6/0x140
 [<c104342f>] ? __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>
 [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
Code: ff 48 14 e9 57 ff ff ff 90 90 90 90 90 90 55 89 e5 83 ec 18 81 38 00 01 10 00 0f 84 9c 00 00 00 8b 50 04 81 fa 00 02 20 00 74 33 <8b> 12 39 d0 75 5c 8b 10 8b 4a 04 39 c8 0f 85 b5 00 00 00 8b 48
EIP: [<c11dd7bd>] list_del+0x1d/0x120 SS:ESP 0068:f600bf3c
CR2: 0000000000200200
---[ end trace efd9a11434f00831 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Pid: 3, comm: ksoftirqd/0 Tainted: G      D W   2.6.37+ #39
Call Trace:
 [<c13fede1>] ? printk+0x1d/0x24
 [<c13fecce>] panic+0x66/0x15c
 [<c10067df>] oops_end+0x8f/0x90
 [<c1025476>] no_context+0xc6/0x160
 [<c10255a8>] __bad_area_nosemaphore+0x98/0x140
 [<c103cf68>] ? release_console_sem+0x1d8/0x210
 [<c1025667>] bad_area_nosemaphore+0x17/0x20
 [<c1025a49>] do_page_fault+0x279/0x420
 [<c1006a8f>] ? show_trace+0x1f/0x30
 [<c13fede1>] ? printk+0x1d/0x24
 [<c10257d0>] ? do_page_fault+0x0/0x420
 [<c140333b>] error_code+0x5f/0x64
 [<c103007b>] ? select_task_rq_fair+0x37b/0x6a0
 [<c10257d0>] ? do_page_fault+0x0/0x420
 [<c11dd7bd>] ? list_del+0x1d/0x120
 [<f8051fac>] acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
 [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
 [<c1042b30>] ? tasklet_action+0x60/0x140
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
panic occurred, switching back to text console
------------[ cut here ]------------

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoUSB: Fix 'bad dma' problem on WDM device disconnect
Robert Lukassen [Wed, 16 Mar 2011 11:13:34 +0000 (12:13 +0100)]
USB: Fix 'bad dma' problem on WDM device disconnect

commit 878b753e32ca765cd346a5d3038d630178ec78ff upstream.

In the WDM class driver a disconnect event leads to calls to
usb_free_coherent to put back two USB DMA buffers allocated earlier.
The call to usb_free_coherent uses a different size parameter
(desc->wMaxCommand) than the corresponding call to usb_alloc_coherent
(desc->bMaxPacketSize0).

When a disconnect event occurs, this leads to 'bad dma' complaints
from usb core because the USB DMA buffer is being pushed back to the
'buffer-2048' pool from which it has not been allocated.

This patch against the most recent linux-2.6 kernel ensures that the
parameters used by usb_alloc_coherent & usb_free_coherent calls in
cdc-wdm.c match.

Signed-off-by: Robert Lukassen <robert.lukassen@tomtom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoUSB: uss720 fixup refcount position
Peter Holik [Fri, 18 Mar 2011 17:47:44 +0000 (18:47 +0100)]
USB: uss720 fixup refcount position

commit adaa3c6342b249548ea830fe8e02aa5b45be8688 upstream.

My testprog do a lot of bitbang - after hours i got following warning and my machine lockups:
WARNING: at /build/buildd/linux-2.6.38/lib/kref.c:34
After debugging uss720 driver i discovered that the completion callback was called before
usb_submit_urb returns. The callback frees the request structure that is krefed on return by
usb_submit_urb.

Signed-off-by: Peter Holik <peter@holik.at>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agousb: musb: blackfin: fix typo in new bfin_musb_vbus_status func
Mike Frysinger [Mon, 21 Mar 2011 18:06:32 +0000 (14:06 -0400)]
usb: musb: blackfin: fix typo in new bfin_musb_vbus_status func

commit 45567c28d29a8766a67c53f898d502aef71b7ef0 upstream.

The common code has a "get" in the middle, but each implementation
does not have it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agousb: musb: blackfin: fix typo in new dev_pm_ops struct
Bob Liu [Mon, 21 Mar 2011 18:06:31 +0000 (14:06 -0400)]
usb: musb: blackfin: fix typo in new dev_pm_ops struct

commit 8f7e7b87ec7c3202941ef2770bacd353ab93368b upstream.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agousb: musb: blackfin: fix typo in platform driver name
Mike Frysinger [Tue, 22 Mar 2011 18:43:37 +0000 (14:43 -0400)]
usb: musb: blackfin: fix typo in platform driver name

commit 417ddf86c8c499fada439b8ee89bb4c6f282ed6c upstream.

The modularization of the Blackfin driver set the name to "musb-blackfin"
in all the boards, but "musb-bfin" in the driver itself.  Since the driver
file name uses "blackfin", change the driver to "musb-blackfin".  This is
also easier as it's only one file to change.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoehci-hcd: Bug fix: don't set a QH's Halt bit
Alan Stern [Wed, 16 Mar 2011 14:57:15 +0000 (10:57 -0400)]
ehci-hcd: Bug fix: don't set a QH's Halt bit

commit b5a3b3d985493c173925907adfebf3edab236fe7 upstream.

This patch (as1453) fixes a long-standing bug in the ehci-hcd driver.

There is no need to set the Halt bit in the overlay region for an
unlinked or blocked QH.  Contrary to what the comment says, setting
the Halt bit does not cause the QH to be patched later; that decision
(made in qh_refresh()) depends only on whether the QH is currently
pointing to a valid qTD.  Likewise, setting the Halt bit does not
prevent completions from activating the QH while it is "stopped"; they
are prevented by the fact that qh_completions() temporarily changes
qh->qh_state to QH_STATE_COMPLETING.

On the other hand, there are circumstances in which the QH will be
reactivated _without_ being patched; this happens after an URB beyond
the head of the queue is unlinked.  Setting the Halt bit will then
cause the hardware to see the QH with both the Active and Halt bits
set, an invalid combination that will prevent the queue from
advancing and may even crash some controllers.

Apparently the only reason this hasn't been reported before is that
unlinking URBs from the middle of a running queue is quite uncommon.
However Test 17, recently added to the usbtest driver, does exactly
this, and it confirms the presence of the bug.

In short, there is no reason to set the Halt bit for an unlinked or
blocked QH, and there is a very good reason not to set it.  Therefore
the code that sets it is removed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Andiry Xu <andiry.xu@amd.com>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agoUSB: Do not pass negative length to snoop_urb()
Michal Sojka [Tue, 15 Mar 2011 15:41:47 +0000 (16:41 +0100)]
USB: Do not pass negative length to snoop_urb()

commit 9d02b42614149ebccf12c9c580601ed01bd83070 upstream.

When `echo Y > /sys/module/usbcore/parameters/usbfs_snoop` and
usb_control_msg() returns error, a lot of kernel memory is dumped to dmesg
until unhandled kernel paging request occurs.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agosh: Fix ptrace hw_breakpoint handling
David Engraf [Wed, 23 Mar 2011 11:35:42 +0000 (11:35 +0000)]
sh: Fix ptrace hw_breakpoint handling

commit fb7f045ace0624f1e59a7db8497e460bd54b1cbc upstream.

Since commit 34d0b5af50a063cded842716633501b38ff815fb it is no longer
possible to debug an application using singlestep. The old commit
converted singlestep handling via ptrace to hw_breakpoints. The
hw_breakpoint is disabled when an event is triggered and not re-enabled
again. This patch re-enables the existing hw_breakpoint before the
existing breakpoint is reused.

Signed-off-by: David Engraf <david.engraf@sysgo.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agosh: Fix ptrace fpu state initialisation
Phil Edworthy [Fri, 18 Mar 2011 14:16:31 +0000 (14:16 +0000)]
sh: Fix ptrace fpu state initialisation

commit c49b6ecf0870e78fa40497cd8b142915c1d5c7c9 upstream.

Commit 0ea820cf introduced the PTRACE_GETFPREGS/SETFPREGS cmds,
but gdb-server still accesses the FPU state using the
PTRACE_PEEKUSR/POKEUSR commands. In this case, xstate was not
initialised.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

13 years agouvcvideo: Fix descriptor parsing for video output devices
Laurent Pinchart [Wed, 23 Feb 2011 14:19:17 +0000 (11:19 -0300)]
uvcvideo: Fix descriptor parsing for video output devices

commit 4093a5c4a3f59cba1a085bbf87b6ffdddc5a443d upstream.

Commit 4057ac6ca9a77c4275b34b5925ab5c99557913b1

    V4L/DVB (13505): uvcvideo: Refactor chain scan

broke output terminals parsing. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>