1. 06 Jul, 2015 8 commits
    • Luciano Coelho's avatar
      iwlwifi: mvm: clean net-detect info if device was reset during suspend · 8c6baa38
      Luciano Coelho authored
      commit a500e469 upstream.
      
      If the device is reset during suspend with net-detect enabled, we
      leave the net-detect information dangling and this causes the next
      suspend to fail with a warning:
      
      [21795.351010] WARNING: at /root/iwlwifi/iwlwifi-stack-dev/drivers/net/wireless/iwlwifi/mvm/d3.c:989 __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]()
      [21795.353253] Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) [...]
      [21795.366168] CPU: 1 PID: 3645 Comm: bash Tainted: G           O 3.10.29-dev #1
      [21795.368785] Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
      [21795.371441]  f8ec6748 f8ec6748 e51f3ce8 c168aa62 e51f3d10 c103a824 c1871238 f8ec6748
      [21795.374228]  000003dd f8eb982e f8eb982e 00000000 c3408ed4 c41edbbc e51f3d20 c103a862
      [21795.377006]  00000009 00000000 e51f3da8 f8eb982e c41ee3dc 00000004 e7970000 e51f3d74
      [21795.379792] Call Trace:
      [21795.382461]  [<c168aa62>] dump_stack+0x16/0x18
      [21795.385133]  [<c103a824>] warn_slowpath_common+0x64/0x80
      [21795.387803]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.390485]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.393124]  [<c103a862>] warn_slowpath_null+0x22/0x30
      [21795.395787]  [<f8eb982e>] __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.398464]  [<f8eb9d7c>] iwl_mvm_suspend+0xec/0x140 [iwlmvm]
      [21795.401127]  [<c104be11>] ? del_timer_sync+0xa1/0xc0
      [21795.403800]  [<f8d4107e>] __ieee80211_suspend+0x1de/0xff0 [mac80211]
      [21795.406459]  [<c168e43d>] ? mutex_lock_nested+0x25d/0x350
      [21795.409084]  [<c1586b64>] ? rtnl_lock+0x14/0x20
      [21795.411685]  [<f8cf0076>] ieee80211_suspend+0x16/0x20 [mac80211]
      [21795.414318]  [<f8c4e014>] wiphy_suspend+0x74/0x710 [cfg80211]
      [21795.416916]  [<c141e612>] __device_suspend+0x1e2/0x220
      [21795.419521]  [<f8c4dfa0>] ? addresses_show+0xa0/0xa0 [cfg80211]
      [21795.422097]  [<c141f997>] dpm_suspend+0x67/0x210
      [21795.424661]  [<c141fd6f>] dpm_suspend_start+0x4f/0x60
      [21795.427219]  [<c108d8e0>] suspend_devices_and_enter+0x60/0x480
      [21795.429768]  [<c168646a>] ? printk+0x4d/0x4f
      [21795.432295]  [<c108de76>] pm_suspend+0x176/0x210
      [21795.434830]  [<c108ca5d>] state_store+0x5d/0xb0
      [21795.437410]  [<c108ca00>] ? wakeup_count_show+0x50/0x50
      [21795.439961]  [<c13208db>] kobj_attr_store+0x1b/0x30
      [21795.442514]  [<c11e3a4b>] sysfs_write_file+0xab/0x100
      [21795.445088]  [<c11e39a0>] ? sysfs_poll+0xa0/0xa0
      [21795.447659]  [<c1179655>] vfs_write+0xa5/0x1c0
      [21795.450212]  [<c1179af7>] SyS_write+0x57/0xa0
      [21795.452699]  [<c1699ec1>] sysenter_do_call+0x12/0x32
      [21795.455146] ---[ end trace faf5321baba2bfdb ]---
      
      To fix this, call the iwl_mvm_free_nd() function in case of any error
      during resume.  Additionally, rename the "out_unlock" label to err to
      make it clearer that it's only called in error conditions.
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      8c6baa38
    • Haim Dreyfuss's avatar
      iwlwifi: mvm: Free fw_status after use to avoid memory leak · b0e6032c
      Haim Dreyfuss authored
      commit 2fc863a5 upstream.
      
      fw_status is the only pointer pointing to a block of memory
      allocated above and should be freed after use.
      Note: this come from Klockwork static analyzer.
      
      Fixes: 2021a89d ("iwlwifi: mvm: treat netdetect wake up separately")
      Signed-off-by: default avatarHaim Dreyfuss <haim.dreyfuss@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      b0e6032c
    • Johannes Berg's avatar
      mac80211: don't use napi_gro_receive() outside NAPI context · 717937c0
      Johannes Berg authored
      commit 22d3a3c8 upstream.
      
      No matter how the driver manages its NAPI context, there's no way
      sending frames to it from a timer can be correct, since it would
      corrupt the internal GRO lists.
      
      To avoid that, always use the non-NAPI path when releasing frames
      from the timer.
      Reported-by: default avatarJean Trivelly <jean.trivelly@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      717937c0
    • Borislav Petkov's avatar
      x86/mce: Fix MCE severity messages · 7f6f7285
      Borislav Petkov authored
      commit 17fea54b upstream.
      
      Derek noticed that a critical MCE gets reported with the wrong
      error type description:
      
        [Hardware Error]: CPU 34: Machine Check Exception: 5 Bank 9: f200003f000100b0
        [Hardware Error]: RIP !INEXACT! 10:<ffffffff812e14c1> {intel_idle+0xb1/0x170}
        [Hardware Error]: TSC 49587b8e321cb
        [Hardware Error]: PROCESSOR 0:306e4 TIME 1431561296 SOCKET 1 APIC 29
        [Hardware Error]: Some CPUs didn't answer in synchronization
        [Hardware Error]: Machine check: Invalid
      				   ^^^^^^^
      
      The last line with 'Invalid' should have printed the high level
      MCE error type description we get from mce_severity, i.e.
      something like:
      
        [Hardware Error]: Machine check: Action required: data load error in a user process
      
      this happens due to the fact that mce_no_way_out() iterates over
      all MCA banks and possibly overwrites the @msg argument which is
      used in the panic printing later.
      
      Change behavior to take the message of only and the (last)
      critical MCE it detects.
      Reported-by: default avatarDerek <denc716@gmail.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Link: http://lkml.kernel.org/r/1431936437-25286-3-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      7f6f7285
    • Mark Rutland's avatar
      ARM: 8356/1: mm: handle non-pmd-aligned end of RAM · 07467e3a
      Mark Rutland authored
      commit 965278dc upstream.
      
      At boot time we round the memblock limit down to section size in an
      attempt to ensure that we will have mapped this RAM with section
      mappings prior to allocating from it. When mapping RAM we iterate over
      PMD-sized chunks, creating these section mappings.
      
      Section mappings are only created when the end of a chunk is aligned to
      section size. Unfortunately, with classic page tables (where PMD_SIZE is
      2 * SECTION_SIZE) this means that if a chunk is between 1M and 2M in
      size the first 1M will not be mapped despite having been accounted for
      in the memblock limit. This has been observed to result in page tables
      being allocated from unmapped memory, causing boot-time hangs.
      
      This patch modifies the memblock limit rounding to always round down to
      PMD_SIZE instead of SECTION_SIZE. For classic MMU this means that we
      will round the memblock limit down to a 2M boundary, matching the limits
      on section mappings, and preventing allocations from unmapped memory.
      For LPAE there should be no change as PMD_SIZE == SECTION_SIZE.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reported-by: default avatarStefan Agner <stefan@agner.ch>
      Tested-by: default avatarStefan Agner <stefan@agner.ch>
      Acked-by: default avatarLaura Abbott <labbott@redhat.com>
      Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Steve Capper <steve.capper@linaro.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      07467e3a
    • Philippe Reynes's avatar
      ARM: dts: imx27: only map 4 Kbyte for fec registers · 10f07955
      Philippe Reynes authored
      commit a29ef819 upstream.
      
      According to the imx27 documentation, fec has a 4 Kbyte
      memory space map. Moreover, the actual 16 Kbyte mapping
      overlaps the SCC (Security Controller) memory register
      space. So, we reduce the memory register space to 4 Kbyte.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Fixes: 9f0749e3 ("ARM i.MX27: Add devicetree support")
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      10f07955
    • Michael Brunner's avatar
      gpio: gpio-kempld: Fix get_direction return value · 0f9d119e
      Michael Brunner authored
      commit f230e8ff upstream.
      
      This patch fixes an inverted return value of the gpio get_direction
      function.
      
      The wrong value causes the direction sysfs entry and GPIO debugfs file
      to indicate incorrect GPIO direction settings. In some cases it also
      prevents setting GPIO output values.
      
      The problem is also present in all other stable kernel versions since
      linux-3.12.
      Reported-by: default avatarJochen Henneberg <jh@henneberg-systemdesign.com>
      Signed-off-by: default avatarMichael Brunner <michael.brunner@kontron.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      0f9d119e
    • Steven Rostedt's avatar
      module: Call module notifier on failure after complete_formation() · 3cedf5eb
      Steven Rostedt authored
      commit 37815bf8 upstream.
      
      The module notifier call chain for MODULE_STATE_COMING was moved up before
      the parsing of args, into the complete_formation() call. But if the module failed
      to load after that, the notifier call chain for MODULE_STATE_GOING was
      never called and that prevented the users of those call chains from
      cleaning up anything that was allocated.
      
      Link: http://lkml.kernel.org/r/554C52B9.9060700@gmail.comReported-by: default avatarPontus Fuchs <pontus.fuchs@gmail.com>
      Fixes: 4982223e "module: set nx before marking module MODULE_STATE_COMING"
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      3cedf5eb
  2. 02 Jul, 2015 2 commits
    • Doug Ledford's avatar
      IB/ipoib: change init sequence ordering · 32eb7ef5
      Doug Ledford authored
      commit be7aa663 upstream.
      
      In preparation for using per device work queues, we need to move the
      start of the neighbor thread task to after ipoib_ib_dev_init and move
      the destruction of the neighbor task to before ipoib_ib_dev_cleanup.
      Otherwise we will end up freeing our workqueue with work possibly
      still on it.
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      32eb7ef5
    • Doug Ledford's avatar
      IB/ipoib: factor out ah flushing · 7294ca57
      Doug Ledford authored
      commit e135106f upstream.
      
      Create a an ipoib_flush_ah and ipoib_stop_ah routines to use at
      appropriate times to flush out all remaining ah entries before we shut
      the device down.
      
      Because neighbors and mcast entries can each have a reference on any
      given ah, we must make sure to free all of those first before our ah
      will actually have a 0 refcount and be able to be reaped.
      
      This factoring is needed in preparation for having per-device work
      queues.  The original per-device workqueue code resulted in the following
      error message:
      
      <ibdev>: ib_dealloc_pd failed
      
      That error was tracked down to this issue.  With the changes to which
      workqueues were flushed when, there were no flushes of the per device
      workqueue after the last ah's were freed, resulting in an attempt to
      dealloc the pd with outstanding resources still allocated.  This code
      puts the explicit flushes in the needed places to avoid that problem.
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      7294ca57
  3. 30 Jun, 2015 6 commits
  4. 22 Jun, 2015 1 commit
  5. 18 Jun, 2015 1 commit
  6. 17 Jun, 2015 22 commits