commit c74a5e1fe4d0672936c8fb63d7484dfeaa30669c
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Sun Aug 19 18:15:38 2012 +0100

    Linux 3.2.28

commit 09dcc7b678ecff242dfbc9555aaa3f4d41212bb2
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Fri Jul 27 16:32:24 2012 -0400

    drm/radeon: do not reenable crtc after moving vram start address
    
    commit 81ee8fb6b52ec69eeed37fe7943446af1dccecc5 upstream.
    
    It seems we can not update the crtc scanout address. After disabling
    crtc, update to base address do not take effect after crtc being
    reenable leading to at least frame being scanout from the old crtc
    base address. Disabling crtc display request lead to same behavior.
    
    So after changing the vram address if we don't keep crtc disabled
    we will have the GPU trying to read some random system memory address
    with some iommu this will broke the crtc engine and will lead to
    broken display and iommu error message.
    
    So to avoid this, disable crtc. For flicker less boot we will need
    to avoid moving the vram start address.
    
    This patch should also fix :
    
    https://bugs.freedesktop.org/show_bug.cgi?id=42373
    
    Signed-off-by: Jerome Glisse <jglisse@redhat.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 48d504e2659ad6029fac8b1f7f87c744c9abb888
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Jul 31 11:05:11 2012 -0400

    drm/radeon: fix bank tiling parameters on cayman
    
    commit 5b23c9045a8b61352986270b2d109edf5085e113 upstream.
    
    Handle the 16 bank case.
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    [bwh: Backported to 3.2: adjust context, indentation]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit e2caf135815a7f3e27ebe8a621a2c0dab2cf91ad
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Jul 31 11:01:10 2012 -0400

    drm/radeon: fix bank tiling parameters on evergreen
    
    commit c8d15edc17d836686d1f071e564800e1a2724fa6 upstream.
    
    Handle the 16 bank case.
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit b2ef34da747ee998a41e6b081987480777b7c23a
Author: Heiko Carstens <heiko.carstens@de.ibm.com>
Date:   Wed Aug 8 09:32:20 2012 +0200

    s390/compat: fix mmap compat system calls
    
    commit e85871218513c54f7dfdb6009043cb638f2fecbe upstream.
    
    The native 31 bit and the compat behaviour for the mmap system calls differ:
    
    In native 31 bit mode the passed in address for the mmap system call will be
    unmodified passed to sys_mmap_pgoff().
    In compat mode however the passed in address will be modified with
    compat_ptr() which masks out the most significant bit.
    
    The result is that in native 31 bit mode each mmap request (with MAP_FIXED)
    will fail where the most significat bit is set, while in compat mode it
    may succeed.
    
    This odd behaviour was introduced with d3815898 "[S390] mmap: add missing
    compat_ptr conversion to both mmap compat syscalls".
    
    To restore a consistent behaviour accross native and compat mode this
    patch functionally reverts the above mentioned commit.
    
    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 0b3160dde9f41e7bbc125ab8d00a6e367e956854
Author: Heiko Carstens <heiko.carstens@de.ibm.com>
Date:   Tue Aug 7 09:48:13 2012 +0200

    s390/compat: fix compat wrappers for process_vm system calls
    
    commit 82aabdb6f1eb61e0034ec23901480f5dd23db7c4 upstream.
    
    The compat wrappers incorrectly called the non compat versions of
    the system process_vm system calls.
    
    Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 614b6d10a01c92d19bc56bfec2ad5960b57be18c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Aug 7 09:54:14 2012 +0200

    drm/i915: correctly order the ring init sequence
    
    commit 0d8957c8a90bbb5d34fab9a304459448a5131e06 upstream.
    
    We may only start to set up the new register values after having
    confirmed that the ring is truely off. Otherwise the hw might lose the
    newly written register values. This is caught later on in the init
    sequence, when we check whether the register writes have stuck.
    
    Reviewed-by: Jani Nikula <jani.nikula@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50522
    Tested-by: Yang Guang <guang.a.yang@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 9e7bbc7d2d8641d1375c29aecd6636f3d670b584
Author: Sean Paul <seanpaul@chromium.org>
Date:   Fri Mar 16 12:43:22 2012 -0400

    drm/i915: Add wait_for in init_ring_common
    
    commit f01db988ef6f6c70a6cc36ee71e4a98a68901229 upstream.
    
    I have seen a number of "blt ring initialization failed" messages
    where the ctl or start registers are not the correct value. Upon further
    inspection, if the code just waited a little bit, it would read the
    correct value. Adding the wait_for to these reads should eliminate the
    issue.
    
    Signed-off-by: Sean Paul <seanpaul@chromium.org>
    Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 85f303b44b2d778f6841a2c1c77f2f9dfdee2be5
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Mon Apr 30 16:21:37 2012 +0000

    Input: eeti_ts: pass gpio value instead of IRQ
    
    commit 4eef6cbfcc03b294d9d334368a851b35b496ce53 upstream.
    
    The EETI touchscreen asserts its IRQ line as soon as it has data in its
    internal buffers. The line is automatically deasserted once all data has
    been read via I2C. Hence, the driver has to monitor the GPIO line and
    cannot simply rely on the interrupt handler reception.
    
    In the current implementation of the driver, irq_to_gpio() is used to
    determine the GPIO number from the i2c_client's IRQ value.
    
    As irq_to_gpio() is not available on all platforms, this patch changes
    this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
    added to the platform_data struct and gpio_to_irq is used to derive the
    IRQ from that GPIO. If this fails, bail out. The driver is only able to
    work in environments where the touchscreen GPIO can be mapped to an
    IRQ.
    
    Without this patch, building raumfeld_defconfig results in:
    
    drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
    drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
    
    Signed-off-by: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Cc: Sven Neumann <s.neumann@raumfeld.com>
    Cc: linux-input@vger.kernel.org
    Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
    [bwh: Backported to 3.2: raumfeld_controller_i2c_board_info.irq was
     initialised using gpio_to_irq(), but this doesn't seem to matter]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit b992ca0631a957c0d2383b6b3ee473e77d8ea4f2
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Sun Aug 5 14:58:37 2012 +0000

    ARM: pxa: remove irq_to_gpio from ezx-pcap driver
    
    commit 59ee93a528b94ef4e81a08db252b0326feff171f upstream.
    
    The irq_to_gpio function was removed from the pxa platform
    in linux-3.2, and this driver has been broken since.
    
    There is actually no in-tree user of this driver that adds
    this platform device, but the driver can and does get enabled
    on some platforms.
    
    Without this patch, building ezx_defconfig results in:
    
    drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work':
    drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
    Cc: Samuel Ortiz <sameo@linux.intel.com>
    Cc: Daniel Ribeiro <drwyrm@gmail.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit e766954f83d037469966fd78ba9d3eb11bb14e74
Author: David Henningsson <david.henningsson@canonical.com>
Date:   Wed Aug 8 08:43:37 2012 +0200

    ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
    
    commit 012e7eb1e501d0120e0383b81477f63091f5e365 upstream.
    
    The same ID is twice in the quirk table, so the second one is not used.
    
    Signed-off-by: David Henningsson <david.henningsson@canonical.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit b74a094e007409a38082e2ef6751342a0795ec6c
Author: David Henningsson <david.henningsson@canonical.com>
Date:   Tue Aug 7 14:03:29 2012 +0200

    ALSA: hda - remove quirk for Dell Vostro 1015
    
    commit e9fc83cb2e5877801a255a37ddbc5be996ea8046 upstream.
    
    This computer is confirmed working with model=auto on kernel 3.2.
    Also, parsing fails with hda-emu with the current model.
    
    Signed-off-by: David Henningsson <david.henningsson@canonical.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit d12284de6c7785808ed76ca3d55d243e5c9e81a6
Author: Tushar Dave <tushar.n.dave@intel.com>
Date:   Tue Jul 31 02:02:43 2012 +0000

    e1000e: NIC goes up and immediately goes down
    
    commit b7ec70be01a87f2c85df3ae11046e74f9b67e323 upstream.
    
    Found that commit d478eb44 was a bad commit.
    If the link partner is transmitting codeword (even if NULL codeword),
    then the RXCW.C bit will be set so check for RXCW.CW is unnecessary.
    Ref: RH BZ 840642
    
    Reported-by: Fabio Futigami <ffutigam@redhat.com>
    Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
    CC: Marcelo Ricardo Leitner <mleitner@redhat.com>
    Tested-by: Aaron Brown <aaron.f.brown@intel.com>
    Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 074007af94479db591df670f9bf96a942ad47eda
Author: Felix Kaechele <felix@fetzig.org>
Date:   Mon Aug 6 23:02:01 2012 +0200

    ALSA: hda - add dock support for Thinkpad X230
    
    commit c8415a48fcb7a29889f4405d38c57db351e4b50a upstream.
    
    As with the ThinkPad Models X230 Tablet and T530 the X230 needs a qurik to
    correctly set up the pins for the dock port.
    
    Signed-off-by: Felix Kaechele <felix@fetzig.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 9a955be695c839a23b43bba06ee824f0fbc76e1b
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun Aug 5 18:31:46 2012 +0200

    iwlwifi: disable greenfield transmissions as a workaround
    
    commit 50e2a30cf6fcaeb2d27360ba614dd169a10041c5 upstream.
    
    There's a bug that causes the rate scaling to get stuck
    when it has to use single-stream rates with a peer that
    can do GF and SGI; the two are incompatible so we can't
    use them together, but that causes the algorithm to not
    work at all, it always rejects updates.
    
    Disable greenfield for now to prevent that problem.
    
    Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Tested-by: Cesar Eduardo Barros <cesarb@cesarb.net>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    [bwh: Backported to 3.2: adjust filename]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit b1769652fdd92c112ecbc9b6dc546f87517af46c
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Fri Aug 3 12:49:14 2012 +0200

    rt61pci: fix NULL pointer dereference in config_lna_gain
    
    commit deee0214def5d8a32b8112f11d9c2b1696e9c0cb upstream.
    
    We can not pass NULL libconf->conf->channel to rt61pci_config() as it
    is dereferenced unconditionally in rt61pci_config_lna_gain() subroutine.
    
    Resolves:
    https://bugzilla.kernel.org/show_bug.cgi?id=44361
    
    Reported-and-tested-by: <dolohow@gmail.com>
    Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit c506474fed3246e4ea1dcf86809cbd802d57e541
Author: Daniel Drake <dsd@laptop.org>
Date:   Thu Aug 2 18:41:48 2012 +0100

    cfg80211: process pending events when unregistering net device
    
    commit 1f6fc43e621167492ed4b7f3b4269c584c3d6ccc upstream.
    
    libertas currently calls cfg80211_disconnected() when it is being
    brought down. This causes an event to be allocated, but since the
    wdev is already removed from the rdev by the time that the event
    processing work executes, the event is never processed or freed.
    http://article.gmane.org/gmane.linux.kernel.wireless.general/95666
    
    Fix this leak, and other possible situations, by processing the event
    queue when a device is being unregistered. Thanks to Johannes Berg for
    the suggestion.
    
    Signed-off-by: Daniel Drake <dsd@laptop.org>
    Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 10b371e7e08749d734ae3f9785be434c5ca7c50a
Author: Philipp A. Mohrenweiser <phiamo@googlemail.com>
Date:   Mon Aug 6 13:14:18 2012 +0200

    ALSA: hda - add dock support for Thinkpad T430s
    
    commit 4407be6ba217514b1bc01488f8b56467d309e416 upstream.
    
    Add a model/fixup string "lenovo-dock", for Thinkpad T430s, to allow
    sound in docking station.
    
    Tested on Lenovo T430s with ThinkPad Mini Dock Plus Series 3
    
    Signed-off-by: Philipp A. Mohrenweiser <phiamo@googlemail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 40da4b179ad3c9a217a57187b980c826bd1b9f9f
Author: Marek Vasut <marex@denx.de>
Date:   Fri Aug 3 20:54:48 2012 +0200

    ARM: mxs: Remove MMAP_MIN_ADDR setting from mxs_defconfig
    
    commit 3bed491c8d28329e34f8a31e3fe64d03f3a350f1 upstream.
    
    The CONFIG_DEFAULT_MMAP_MIN_ADDR was set to 65536 in mxs_defconfig,
    this caused severe breakage of userland applications since the upper
    limit for ARM is 32768. By default CONFIG_DEFAULT_MMAP_MIN_ADDR is
    set to 4096 and can also be changed via /proc/sys/vm/mmap_min_addr
    if needed.
    
    Quoting Russell King [1]:
    
    "4096 is also fine for ARM too. There's not much point in having
    defconfigs change it - that would just be pure noise in the config
    files."
    
    the CONFIG_DEFAULT_MMAP_MIN_ADDR can be removed from the defconfig
    altogether.
    
    This problem was introduced by commit cde7c41 (ARM: configs: add
    defconfig for mach-mxs).
    
    [1] http://marc.info/?l=linux-arm-kernel&m=134401593807820&w=2
    
    Signed-off-by: Marek Vasut <marex@denx.de>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Wolfgang Denk <wd@denx.de>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit fca7771ad7eefb4fc86ab2248d291f0ecabd6de7
Author: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Date:   Thu Aug 2 11:58:50 2012 +0530

    ath9k: Add PID/VID support for AR1111
    
    commit d4e5979c0da95791aa717c18e162540c7a596360 upstream.
    
    AR1111 is same as AR9485. The h/w
    difference between them is quite insignificant,
    Felix suggests only very few baseband features
    may not be available in AR1111. The h/w code for
    AR9485 is already present, so AR1111 should
    work fine with the addition of its PID/VID.
    
    Cc: Felix Bitterli <felixb@qca.qualcomm.com>
    Reported-by: Tim Bentley <Tim.Bentley@Gmail.com>
    Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
    Tested-by: Tim Bentley <Tim.Bentley@Gmail.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit afac82f0c92a4c53feab7db8490a1ec731b5bf0a
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Aug 1 21:03:21 2012 +0200

    mac80211: cancel mesh path timer
    
    commit dd4c9260e7f23f2e951cbfb2726e468c6d30306c upstream.
    
    The mesh path timer needs to be canceled when
    leaving the mesh as otherwise it could fire
    after the interface has been removed already.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 6929d33d596f654d9bc9fbe840112a2f687f99c3
Author: Stefan Bader <stefan.bader@canonical.com>
Date:   Thu Aug 9 12:33:12 2012 +0300

    KVM: VMX: Advertise CPU_BASED_RDPMC_EXITING for nested guests
    
    Based on commit fee84b079d5ddee2247b5c1f53162c330c622902 upstream.
    
      Intercept RDPMC and forward it to the PMU emulation code.
    
    Newer vmx support will only allow to load the kvm_intel module
    if RDPMC_EXITING is supported. Even without the actual support
    this part of the change is required on 3.2 hosts.
    
    BugLink: http://bugs.launchpad.net/bugs/1031090
    Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 840ba4a248e09231cbdc5e9ac769a1f83bee4748
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Jan 25 16:32:49 2012 +0100

    drm/i915: fixup seqno allocation logic for lazy_request
    
    commit 53d227f282eb9fa4c7cdbfd691fa372b7ca8c4c3 upstream.
    
    Currently we reserve seqnos only when we emit the request to the ring
    (by bumping dev_priv->next_seqno), but start using it much earlier for
    ring->oustanding_lazy_request. When 2 threads compete for the gpu and
    run on two different rings (e.g. ddx on blitter vs. compositor)
    hilarity ensued, especially when we get constantly interrupted while
    reserving buffers.
    
    Breakage seems to have been introduced in
    
    commit 6f392d548658a17600da7faaf8a5df25ee5f01f6
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Sat Aug 7 11:01:22 2010 +0100
    
        drm/i915: Use a common seqno for all rings.
    
    This patch fixes up the seqno reservation logic by moving it into
    i915_gem_next_request_seqno. The ring->add_request functions now
    superflously still return the new seqno through a pointer, that will
    be refactored in the next patch.
    
    Note that with this change we now unconditionally allocate a seqno,
    even when ->add_request might fail because the rings are full and the
    gpu died. But this does not open up a new can of worms because we can
    already leave behind an outstanding_request_seqno if e.g. the caller
    gets interrupted with a signal while stalling for the gpu in the
    eviciton paths. And with the bugfix we only ever have one seqno
    allocated per ring (and only that ring), so there are no ordering
    issues with multiple outstanding seqnos on the same ring.
    
    v2: Keep i915_gem_get_seqno (but move it to i915_gem.c) to make it
    clear that we only have one seqno counter for all rings. Suggested by
    Chris Wilson.
    
    v3: As suggested by Chris Wilson use i915_gem_next_request_seqno
    instead of ring->oustanding_lazy_request to make the follow-up
    refactoring more clearly correct. Also improve the commit message
    with issues discussed on irc.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45181
    Tested-by: Nicolas Kalkhof nkalkhof()at()web.de
    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 0a417591d73ccd0ad89f70300fdb4bd32a566f65
Author: Janne Kalliomäki <janne@tuxera.com>
Date:   Sun Jun 17 17:05:24 2012 -0400

    hfsplus: fix overflow in sector calculations in hfsplus_submit_bio
    
    commit a6dc8c04218eb752ff79cdc24a995cf51866caed upstream.
    
    The variable io_size was unsigned int, which caused the wrong sector number
    to be calculated after aligning it. This then caused mount to fail with big
    volumes, as backup volume header information was searched from a
    wrong sector.
    
    Signed-off-by: Janne Kalliomäki <janne@tuxera.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 4fc6a970e371907943871c1b51ef5a064d0bd02d
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Wed Jul 11 14:37:28 2012 -0500

    rtlwifi: rtl8192cu: Change buffer allocation for synchronous reads
    
    commit 3ce4d85b76010525adedcc2555fa164bf706a2f3 upstream.
    
    In commit a7959c1, the USB part of rtlwifi was switched to convert
    _usb_read_sync() to using a preallocated buffer rather than one
    that has been acquired using kmalloc. Although this routine is named
    as though it were synchronous, there seem to be simultaneous users,
    and the selection of the index to the data buffer is not multi-user
    safe. This situation is addressed by adding a new spinlock. The routine
    cannot sleep, thus a mutex is not allowed.
    
    Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 5d04d60bae47f2da14bc7a8286d802a2b3c28e4b
Author: Dean Nelson <dnelson@redhat.com>
Date:   Thu Jan 19 17:47:24 2012 +0000

    e1000: add dropped DMA receive enable back in for WoL
    
    commit b868179c47e9e8eadcd04c1f3105998e528988a3 upstream.
    
    Commit d5bc77a223b0e9b9dfb002048d2b34a79e7d0b48 broke Wake-on-LAN by
    inadvertently dropping the enabling of DMA receives.
    
    Restore the enabling of DMA receives for WoL.
    
    This is applicable to 3.1+ stable trees.
    
    Reported-by: Tobias Klausmann <klausman@schwarzvogel.de>
    Signed-off-by: Dean Nelson <dnelson@redhat.com>
    Tested-by: Tobias Klausmann <klausman@schwarzvogel.de>
    Tested-by: Aaron Brown <aaron.f.brown@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 9deaafcd3ee894ef714c44e0414e85db36e62641
Author: Mathias Krause <minipli@googlemail.com>
Date:   Sun Jul 29 19:45:14 2012 +0000

    net/tun: fix ioctl() based info leaks
    
    [ Upstream commits a117dacde0288f3ec60b6e5bcedae8fa37ee0dfc
      and 8bbb181308bc348e02bfdbebdedd4e4ec9d452ce ]
    
    The tun module leaks up to 36 bytes of memory by not fully initializing
    a structure located on the stack that gets copied to user memory by the
    TUNGETIFF and SIOCGIFHWADDR ioctl()s.
    
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 789e0ed6c1132db40b4e6349113516ea0f700710
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Fri Jul 27 10:38:50 2012 +0000

    tcp: perform DMA to userspace only if there is a task waiting for it
    
    [ Upstream commit 59ea33a68a9083ac98515e4861c00e71efdc49a1 ]
    
    Back in 2006, commit 1a2449a87b ("[I/OAT]: TCP recv offload to I/OAT")
    added support for receive offloading to IOAT dma engine if available.
    
    The code in tcp_rcv_established() tries to perform early DMA copy if
    applicable. It however does so without checking whether the userspace
    task is actually expecting the data in the buffer.
    
    This is not a problem under normal circumstances, but there is a corner
    case where this doesn't work -- and that's when MSG_TRUNC flag to
    recvmsg() is used.
    
    If the IOAT dma engine is not used, the code properly checks whether
    there is a valid ucopy.task and the socket is owned by userspace, but
    misses the check in the dmaengine case.
    
    This problem can be observed in real trivially -- for example 'tbench' is a
    good reproducer, as it makes a heavy use of MSG_TRUNC. On systems utilizing
    IOAT, you will soon find tbench waiting indefinitely in sk_wait_data(), as they
    have been already early-copied in tcp_rcv_established() using dma engine.
    
    This patch introduces the same check we are performing in the simple
    iovec copy case to the IOAT case as well. It fixes the indefinite
    recvmsg(MSG_TRUNC) hangs.
    
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 99517853a21edf2327cbe34441de9142720563c8
Author: Jiri Benc <jbenc@redhat.com>
Date:   Fri Jul 27 02:58:22 2012 +0000

    net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handling
    
    [ Upstream commit b1beb681cba5358f62e6187340660ade226a5fcc ]
    
    When device flags are set using rtnetlink, IFF_PROMISC and IFF_ALLMULTI
    flags are handled specially. Function dev_change_flags sets IFF_PROMISC and
    IFF_ALLMULTI bits in dev->gflags according to the passed value but
    do_setlink passes a result of rtnl_dev_combine_flags which takes those bits
    from dev->flags.
    
    This can be easily trigerred by doing:
    
    tcpdump -i eth0 &
    ip l s up eth0
    
    ip sets IFF_UP flag in ifi_flags and ifi_change, which is combined with
    IFF_PROMISC by rtnl_dev_combine_flags, causing __dev_change_flags to set
    IFF_PROMISC in gflags.
    
    Reported-by: Max Matveev <makc@redhat.com>
    Signed-off-by: Jiri Benc <jbenc@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit f4d0e6b0307f37720d4be8609955f78074880f1b
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Jul 27 01:46:51 2012 +0000

    USB: kaweth.c: use GFP_ATOMIC under spin_lock
    
    [ Upstream commit e4c7f259c5be99dcfc3d98f913590663b0305bf8 ]
    
    The problem is that we call this with a spin lock held.  The call tree
    is:
    	kaweth_start_xmit() holds kaweth->device_lock.
    	-> kaweth_async_set_rx_mode()
    	   -> kaweth_control()
    	      -> kaweth_internal_control_msg()
    
    The kaweth_internal_control_msg() function is only called from
    kaweth_control() which used GFP_ATOMIC for its allocations.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit df7ba2e6620095039c0aa42af7de1ec565eca2eb
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Thu Jul 26 22:52:21 2012 +0000

    tcp: Add TCP_USER_TIMEOUT negative value check
    
    [ Upstream commit 42493570100b91ef663c4c6f0c0fdab238f9d3c2 ]
    
    TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned int. But
    patch "tcp: Add TCP_USER_TIMEOUT socket option"(dca43c75) didn't check the negative
    values. If a user assign -1 to it, the socket will set successfully and wait
    for 4294967295 miliseconds. This patch add a negative value check to avoid
    this issue.
    
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 761bfbd36cbff87f2d04502b66a363507a08ad33
Author: Alan Cox <alan@linux.intel.com>
Date:   Tue Jul 24 08:16:25 2012 +0000

    wanmain: comparing array with NULL
    
    [ Upstream commit 8b72ff6484fe303e01498b58621810a114f3cf09 ]
    
    gcc really should warn about these !
    
    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit c4726fb24aca11aefc106f747a54a392f95354bd
Author: Alan Cox <alan@linux.intel.com>
Date:   Tue Jul 24 02:42:14 2012 +0000

    caif: fix NULL pointer check
    
    [ Upstream commit c66b9b7d365444b433307ebb18734757cb668a02 ]
    
    Reported-by: <rucsoftsec@gmail.com>
    Resolves-bug: http://bugzilla.kernel.org/show_bug?44441
    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 7f6453d8c6f68e26fa6086c654b7fca39b960637
Author: Paul Moore <pmoore@redhat.com>
Date:   Tue Jul 17 11:07:47 2012 +0000

    cipso: don't follow a NULL pointer when setsockopt() is called
    
    [ Upstream commit 89d7ae34cdda4195809a5a987f697a517a2a3177 ]
    
    As reported by Alan Cox, and verified by Lin Ming, when a user
    attempts to add a CIPSO option to a socket using the CIPSO_V4_TAG_LOCAL
    tag the kernel dies a terrible death when it attempts to follow a NULL
    pointer (the skb argument to cipso_v4_validate() is NULL when called via
    the setsockopt() syscall).
    
    This patch fixes this by first checking to ensure that the skb is
    non-NULL before using it to find the incoming network interface.  In
    the unlikely case where the skb is NULL and the user attempts to add
    a CIPSO option with the _TAG_LOCAL tag we return an error as this is
    not something we want to allow.
    
    A simple reproducer, kindly supplied by Lin Ming, although you must
    have the CIPSO DOI #3 configure on the system first or you will be
    caught early in cipso_v4_validate():
    
    	#include <sys/types.h>
    	#include <sys/socket.h>
    	#include <linux/ip.h>
    	#include <linux/in.h>
    	#include <string.h>
    
    	struct local_tag {
    		char type;
    		char length;
    		char info[4];
    	};
    
    	struct cipso {
    		char type;
    		char length;
    		char doi[4];
    		struct local_tag local;
    	};
    
    	int main(int argc, char **argv)
    	{
    		int sockfd;
    		struct cipso cipso = {
    			.type = IPOPT_CIPSO,
    			.length = sizeof(struct cipso),
    			.local = {
    				.type = 128,
    				.length = sizeof(struct local_tag),
    			},
    		};
    
    		memset(cipso.doi, 0, 4);
    		cipso.doi[3] = 3;
    
    		sockfd = socket(AF_INET, SOCK_DGRAM, 0);
    		#define SOL_IP 0
    		setsockopt(sockfd, SOL_IP, IP_OPTIONS,
    			&cipso, sizeof(struct cipso));
    
    		return 0;
    	}
    
    CC: Lin Ming <mlin@ss.pku.edu.cn>
    Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Signed-off-by: Paul Moore <pmoore@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 9fbc36b812a7f55972682b4b175d2284f487df77
Author: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date:   Sun Jul 15 10:10:14 2012 +0000

    caif: Fix access to freed pernet memory
    
    [ Upstream commit 96f80d123eff05c3cd4701463786b87952a6c3ac ]
    
    unregister_netdevice_notifier() must be called before
    unregister_pernet_subsys() to avoid accessing already freed
    pernet memory. This fixes the following oops when doing rmmod:
    
    Call Trace:
     [<ffffffffa0f802bd>] caif_device_notify+0x4d/0x5a0 [caif]
     [<ffffffff81552ba9>] unregister_netdevice_notifier+0xb9/0x100
     [<ffffffffa0f86dcc>] caif_device_exit+0x1c/0x250 [caif]
     [<ffffffff810e7734>] sys_delete_module+0x1a4/0x300
     [<ffffffff810da82d>] ? trace_hardirqs_on_caller+0x15d/0x1e0
     [<ffffffff813517de>] ? trace_hardirqs_on_thunk+0x3a/0x3
     [<ffffffff81696bad>] system_call_fastpath+0x1a/0x1f
    
    RIP
     [<ffffffffa0f7f561>] caif_get+0x51/0xb0 [caif]
    
    Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
    Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit e44b8b47d096751cb15a81b4c0f83a05fc1f49c8
Author: Neil Horman <nhorman@tuxdriver.com>
Date:   Mon Jul 16 09:13:51 2012 +0000

    sctp: Fix list corruption resulting from freeing an association on a list
    
    [ Upstream commit 2eebc1e188e9e45886ee00662519849339884d6d ]
    
    A few days ago Dave Jones reported this oops:
    
    [22766.294255] general protection fault: 0000 [#1] PREEMPT SMP
    [22766.295376] CPU 0
    [22766.295384] Modules linked in:
    [22766.387137]  ffffffffa169f292 6b6b6b6b6b6b6b6b ffff880147c03a90
    ffff880147c03a74
    [22766.387135] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 00000000000
    [22766.387136] Process trinity-watchdo (pid: 10896, threadinfo ffff88013e7d2000,
    [22766.387137] Stack:
    [22766.387140]  ffff880147c03a10
    [22766.387140]  ffffffffa169f2b6
    [22766.387140]  ffff88013ed95728
    [22766.387143]  0000000000000002
    [22766.387143]  0000000000000000
    [22766.387143]  ffff880003fad062
    [22766.387144]  ffff88013c120000
    [22766.387144]
    [22766.387145] Call Trace:
    [22766.387145]  <IRQ>
    [22766.387150]  [<ffffffffa169f292>] ? __sctp_lookup_association+0x62/0xd0
    [sctp]
    [22766.387154]  [<ffffffffa169f2b6>] __sctp_lookup_association+0x86/0xd0 [sctp]
    [22766.387157]  [<ffffffffa169f597>] sctp_rcv+0x207/0xbb0 [sctp]
    [22766.387161]  [<ffffffff810d4da8>] ? trace_hardirqs_off_caller+0x28/0xd0
    [22766.387163]  [<ffffffff815827e3>] ? nf_hook_slow+0x133/0x210
    [22766.387166]  [<ffffffff815902fc>] ? ip_local_deliver_finish+0x4c/0x4c0
    [22766.387168]  [<ffffffff8159043d>] ip_local_deliver_finish+0x18d/0x4c0
    [22766.387169]  [<ffffffff815902fc>] ? ip_local_deliver_finish+0x4c/0x4c0
    [22766.387171]  [<ffffffff81590a07>] ip_local_deliver+0x47/0x80
    [22766.387172]  [<ffffffff8158fd80>] ip_rcv_finish+0x150/0x680
    [22766.387174]  [<ffffffff81590c54>] ip_rcv+0x214/0x320
    [22766.387176]  [<ffffffff81558c07>] __netif_receive_skb+0x7b7/0x910
    [22766.387178]  [<ffffffff8155856c>] ? __netif_receive_skb+0x11c/0x910
    [22766.387180]  [<ffffffff810d423e>] ? put_lock_stats.isra.25+0xe/0x40
    [22766.387182]  [<ffffffff81558f83>] netif_receive_skb+0x23/0x1f0
    [22766.387183]  [<ffffffff815596a9>] ? dev_gro_receive+0x139/0x440
    [22766.387185]  [<ffffffff81559280>] napi_skb_finish+0x70/0xa0
    [22766.387187]  [<ffffffff81559cb5>] napi_gro_receive+0xf5/0x130
    [22766.387218]  [<ffffffffa01c4679>] e1000_receive_skb+0x59/0x70 [e1000e]
    [22766.387242]  [<ffffffffa01c5aab>] e1000_clean_rx_irq+0x28b/0x460 [e1000e]
    [22766.387266]  [<ffffffffa01c9c18>] e1000e_poll+0x78/0x430 [e1000e]
    [22766.387268]  [<ffffffff81559fea>] net_rx_action+0x1aa/0x3d0
    [22766.387270]  [<ffffffff810a495f>] ? account_system_vtime+0x10f/0x130
    [22766.387273]  [<ffffffff810734d0>] __do_softirq+0xe0/0x420
    [22766.387275]  [<ffffffff8169826c>] call_softirq+0x1c/0x30
    [22766.387278]  [<ffffffff8101db15>] do_softirq+0xd5/0x110
    [22766.387279]  [<ffffffff81073bc5>] irq_exit+0xd5/0xe0
    [22766.387281]  [<ffffffff81698b03>] do_IRQ+0x63/0xd0
    [22766.387283]  [<ffffffff8168ee2f>] common_interrupt+0x6f/0x6f
    [22766.387283]  <EOI>
    [22766.387284]
    [22766.387285]  [<ffffffff8168eed9>] ? retint_swapgs+0x13/0x1b
    [22766.387285] Code: c0 90 5d c3 66 0f 1f 44 00 00 4c 89 c8 5d c3 0f 1f 00 55 48
    89 e5 48 83
    ec 20 48 89 5d e8 4c 89 65 f0 4c 89 6d f8 66 66 66 66 90 <0f> b7 87 98 00 00 00
    48 89 fb
    49 89 f5 66 c1 c0 08 66 39 46 02
    [22766.387307]
    [22766.387307] RIP
    [22766.387311]  [<ffffffffa168a2c9>] sctp_assoc_is_match+0x19/0x90 [sctp]
    [22766.387311]  RSP <ffff880147c039b0>
    [22766.387142]  ffffffffa16ab120
    [22766.599537] ---[ end trace 3f6dae82e37b17f5 ]---
    [22766.601221] Kernel panic - not syncing: Fatal exception in interrupt
    
    It appears from his analysis and some staring at the code that this is likely
    occuring because an association is getting freed while still on the
    sctp_assoc_hashtable.  As a result, we get a gpf when traversing the hashtable
    while a freed node corrupts part of the list.
    
    Nominally I would think that an mibalanced refcount was responsible for this,
    but I can't seem to find any obvious imbalance.  What I did note however was
    that the two places where we create an association using
    sctp_primitive_ASSOCIATE (__sctp_connect and sctp_sendmsg), have failure paths
    which free a newly created association after calling sctp_primitive_ASSOCIATE.
    sctp_primitive_ASSOCIATE brings us into the sctp_sf_do_prm_asoc path, which
    issues a SCTP_CMD_NEW_ASOC side effect, which in turn adds a new association to
    the aforementioned hash table.  the sctp command interpreter that process side
    effects has not way to unwind previously processed commands, so freeing the
    association from the __sctp_connect or sctp_sendmsg error path would lead to a
    freed association remaining on this hash table.
    
    I've fixed this but modifying sctp_[un]hash_established to use hlist_del_init,
    which allows us to proerly use hlist_unhashed to check if the node is on a
    hashlist safely during a delete.  That in turn alows us to safely call
    sctp_unhash_established in the __sctp_connect and sctp_sendmsg error paths
    before freeing them, regardles of what the associations state is on the hash
    list.
    
    I noted, while I was doing this, that the __sctp_unhash_endpoint was using
    hlist_unhsashed in a simmilar fashion, but never nullified any removed nodes
    pointers to make that function work properly, so I fixed that up in a simmilar
    fashion.
    
    I attempted to test this using a virtual guest running the SCTP_RR test from
    netperf in a loop while running the trinity fuzzer, both in a loop.  I wasn't
    able to recreate the problem prior to this fix, nor was I able to trigger the
    failure after (neither of which I suppose is suprising).  Given the trace above
    however, I think its likely that this is what we hit.
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
    Reported-by: davej@redhat.com
    CC: davej@redhat.com
    CC: "David S. Miller" <davem@davemloft.net>
    CC: Vlad Yasevich <vyasevich@gmail.com>
    CC: Sridhar Samudrala <sri@us.ibm.com>
    CC: linux-sctp@vger.kernel.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit ab12cbb527ec1afc9f71bd2331164c375e1e68f7
Author: Alan Cox <alan@linux.intel.com>
Date:   Thu Jul 12 03:39:11 2012 +0000

    sch_sfb: Fix missing NULL check
    
    [ Upstream commit 7ac2908e4b2edaec60e9090ddb4d9ceb76c05e7d ]
    
    Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44461
    
    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Acked-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

commit 6ccc95984ccfb8fa3cac0fee166e6290939587bf
Author: Michael Chan <mchan@broadcom.com>
Date:   Tue Jul 10 10:04:40 2012 +0000

    bnx2: Fix bug in bnx2_free_tx_skbs().
    
    [ Upstream commit c1f5163de417dab01fa9daaf09a74bbb19303f3c ]
    
    In rare cases, bnx2x_free_tx_skbs() can unmap the wrong DMA address
    when it gets to the last entry of the tx ring.  We were not using
    the proper macro to skip the last entry when advancing the tx index.
    
    Reported-by: Zongyun Lai <zlai@vmware.com>
    Reviewed-by: Jeffrey Huang <huangjw@broadcom.com>
    Signed-off-by: Michael Chan <mchan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>