1. 08 Jan, 2016 3 commits
  2. 07 Jan, 2016 8 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 02006f7a
      Linus Torvalds authored
      Pull drm nouveau fix from Dave Airlie:
       "Still not back to work, but I decided to forward this fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau/gr/nv40: fix oops in interrupt handler
      02006f7a
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 1d8b0e79
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
      
       - Two build issues, one in the ipmmu-vmsa driver and one for the new
         generic dma-api implemention used on arm64
      
       - A performance fix for said dma-api implemention
      
       - An issue caused by a wrong offset in map_sg in the same code as above
      
      * tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/dma: Use correct offset in map_sg
        iommu/ipmmu-vmsa: Don't truncate ttbr if LPAE is not enabled
        iommu/dma: Avoid unlikely high-order allocations
        iommu/dma: Add some missing #includes
      1d8b0e79
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 2626820d
      Linus Torvalds authored
      Pull ftrace fix from Steven Rostedt:
       "PeiyangX Qiu reported that if a module fails to load between calling
        ftrace_module_init() and do_init_module() that the allocations made in
        ftrace_module_init() will not be freed, resulting in a memory leak.
      
        The solution is to call ftrace_release_mod() on the failing module in
        the fail path befor do_init_module() is called.  This will remove any
        allocations made for that module, and nothing if ftrace_module_init()
        wasn't called yet for that module.
      
        Note, once do_init_module() is called, the MODULE_GOING notifiers are
        called for the failed module, which calls into the ftrace code to do
        the proper clean up (basically calling ftrace_release_mod())"
      
      * tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace/module: Call clean up function when module init fails early
      2626820d
    • Steven Rostedt (Red Hat)'s avatar
      ftrace/module: Call clean up function when module init fails early · 049fb9bd
      Steven Rostedt (Red Hat) authored
      If the module init code fails after calling ftrace_module_init() and before
      calling do_init_module(), we can suffer from a memory leak. This is because
      ftrace_module_init() allocates pages to store the locations that ftrace
      hooks are placed in the module text. If do_init_module() fails, it still
      calls the MODULE_GOING notifiers which will tell ftrace to do a clean up of
      the pages it allocated for the module. But if load_module() fails before
      then, the pages allocated by ftrace_module_init() will never be freed.
      
      Call ftrace_release_mod() on the module if load_module() fails before
      getting to do_init_module().
      
      Link: http://lkml.kernel.org/r/567CEA31.1070507@intel.comReported-by: default avatar"Qiu, PeiyangX" <peiyangx.qiu@intel.com>
      Fixes: a949ae56 "ftrace/module: Hardcode ftrace_module_init() call into load_module()"
      Cc: stable@vger.kernel.org # v2.6.38+
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      049fb9bd
    • Robin Murphy's avatar
      iommu/dma: Use correct offset in map_sg · 164afb1d
      Robin Murphy authored
      When mapping a non-page-aligned scatterlist entry, we copy the original
      offset to the output DMA address before aligning it to hand off to
      iommu_map_sg(), then later adding the IOVA page address portion to get
      the final mapped address. However, when the IOVA page size is smaller
      than the CPU page size, it is the offset within the IOVA page we want,
      not that within the CPU page, which can easily be larger than an IOVA
      page and thus result in an incorrect final address.
      
      Fix the bug by taking only the IOVA-aligned part of the offset as the
      basis of the DMA address, not the whole thing.
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      164afb1d
    • Dave Airlie's avatar
      Merge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes · 3bea6a4c
      Dave Airlie authored
      single nv40 oops fix.
      
      * 'linux-4.4' of git://github.com/skeggsb/linux:
        drm/nouveau/gr/nv40: fix oops in interrupt handler
      3bea6a4c
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd · b06f3a16
      Linus Torvalds authored
      Pull MTD fixes from Brian Norris:
       "Three last MTD fixes for v4.4.  These are all fixes for regressions
        and bugs reported mid cycle.  Unfortunately, some of them took a bit
        long to get proper testing and feedback.
      
         - Assign the default MTD name earlier in the registration process, so
           partition parsers (like cmdlinepart) see the right name.  Without
           this, some systems may come up with unpartitioned flash.  This was
           a v4.4-rc1 regression.
      
         - Revert some new Winbond SPI NOR flash unlocking/locking support;
           new code in v4.4 caused regressions on some Spansion flash.
      
         - Fix mis-typed parameter ordering in SPI NOR unlock function; this
           bug was introduced in v4.4-rc1"
      
      * tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
        mtd: spi-nor: fix stm_is_locked_sr() parameters
        mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
        mtd: fix cmdlinepart parser, early naming for auto-filled MTD
      b06f3a16
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 51cb67c0
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "As usual, there are a couple straggler bug fixes:
      
         1) qlcnic_alloc_mbx_args() error returns are not checked in qlcnic
            driver.  Fix from Insu Yun.
      
         2) SKB refcounting bug in connector, from Florian Westphal.
      
         3) vrf_get_saddr() has to propagate fib_lookup() errors to it's
            callers, from David Ahern.
      
         4) Fix AF_UNIX splice/bind deadlock, from Rainer Weikusat.
      
         5) qdisc_rcu_free() fails to free the per-cpu qstats.  Fix from John
            Fastabend.
      
         6) vmxnet3 driver passes wrong page to dma_map_page(), fix from
           Shrikrishna Khare.
      
         7) Don't allow zero cwnd in tcp_cwnd_reduction(), from Yuchung Cheng"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        tcp: fix zero cwnd in tcp_cwnd_reduction
        Driver: Vmxnet3: Fix regression caused by 5738a09d
        net: qmi_wwan: Add WeTelecom-WPD600N
        mkiss: fix scribble on freed memory
        net: possible use after free in dst_release
        net: sched: fix missing free per cpu on qstats
        ARM: net: bpf: fix zero right shift
        6pack: fix free memory scribbles
        net: filter: make JITs zero A for SKF_AD_ALU_XOR_X
        bridge: Only call /sbin/bridge-stp for the initial network namespace
        af_unix: Fix splice-bind deadlock
        net: Propagate lookup failure in l3mdev_get_saddr to caller
        r8152: add reset_resume function
        connector: bump skb->users before callback invocation
        cxgb4: correctly handling failed allocation
        qlcnic: correctly handle qlcnic_alloc_mbx_args
      51cb67c0
  3. 06 Jan, 2016 12 commits
  4. 05 Jan, 2016 14 commits
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Hannes Frederic Sowa's avatar
      bridge: Only call /sbin/bridge-stp for the initial network namespace · ff621985
      Hannes Frederic Sowa authored
      [I stole this patch from Eric Biederman. He wrote:]
      
      > There is no defined mechanism to pass network namespace information
      > into /sbin/bridge-stp therefore don't even try to invoke it except
      > for bridge devices in the initial network namespace.
      >
      > It is possible for unprivileged users to cause /sbin/bridge-stp to be
      > invoked for any network device name which if /sbin/bridge-stp does not
      > guard against unreasonable arguments or being invoked twice on the
      > same network device could cause problems.
      
      [Hannes: changed patch using netns_eq]
      
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff621985
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.4-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · ee9a7d2c
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "Two more fixes:
      
        1. The recordmcount change had an output that used sprintf()
           (incorrectly) when it should have been a fprintf() to stderr.
      
        2. The printk_formats file could crash if someone added a
           trace_printk() in the core kernel, and also added one in a module.
           This does not affect production kernels.  Only kernels where
           developers add trace_printk() for debugging can crash"
      
      * tag 'trace-v4.4-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix setting of start_index in find_next()
        ftrace/scripts: Fix incorrect use of sprintf in recordmcount
      ee9a7d2c
    • Linus Torvalds's avatar
      Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 3331f99a
      Linus Torvalds authored
      Pull tile bugfix from Chris Metcalf:
       "This fixes a bug that Sudip's buildbot found for tilepro allmodconfig.
      
        I've tagged it for stable only back to 3.19, which was when most of
        the other affected architectures added their support for working
        around this issue"
      
      * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        tile: provide CONFIG_PAGE_SIZE_64KB etc for tilepro
      3331f99a
    • Chris Metcalf's avatar
      tile: provide CONFIG_PAGE_SIZE_64KB etc for tilepro · c1b27ab5
      Chris Metcalf authored
      This allows the build system to know that it can't attempt to
      configure the Lustre virtual block device, for example, when tilepro
      is using 64KB pages (as it does by default).  The tilegx build
      already provided those symbols.
      
      Previously we required that the tilepro hypervisor be rebuilt with
      a different hardcoded page size in its headers, and then Linux be
      rebuilt using the updated hypervisor header.  Now we allow each of
      the hypervisor and Linux to be built independently.  We still check
      at boot time to ensure that the page size provided by the hypervisor
      matches what Linux expects.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@ezchip.com>
      Cc: stable@vger.kernel.org [3.19+]
      c1b27ab5
    • Vinod Koul's avatar
      ASoC: Intel: Skylake: Fix the memory leak · d8018361
      Vinod Koul authored
      This provide the fix for firmware memory by freeing the pointer in driver
      remove where it is safe to do so
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      d8018361
    • Vinod Koul's avatar
      ASoC: Intel: Skylake: Revert previous broken fix memory leak fix · fb203adc
      Vinod Koul authored
      This reverts commit 87b5ed8e ("ASoC: Intel:
      Skylake: fix memory leak") as it causes regression on Skylake devices
      
      The SKL drivers can be deferred probe. The topology file based widgets can
      have references to topology file so this can't be freed until card is fully
      created, so revert this patch for now
      
      [   66.682767] BUG: unable to handle kernel paging request at ffffc900001363fc
      [   66.690735] IP: [<ffffffff806c94dd>] strnlen+0xd/0x40
      [   66.696509] PGD 16e035067 PUD 16e036067 PMD 16e038067 PTE 0
      [   66.702925] Oops: 0000 [#1] PREEMPT SMP
      [   66.768390] CPU: 3 PID: 57 Comm: kworker/u16:3 Tainted: G O 4.4.0-rc7-skl #62
      [   66.778869] Hardware name: Intel Corporation Skylake Client platform
      [   66.793201] Workqueue: deferwq deferred_probe_work_func
      [   66.799173] task: ffff88008b700f40 ti: ffff88008b704000 task.ti: ffff88008b704000
      [   66.807692] RIP: 0010:[<ffffffff806c94dd>]  [<ffffffff806c94dd>] strnlen+0xd/0x40
      [   66.816243] RSP: 0018:ffff88008b707878  EFLAGS: 00010286
      [   66.822293] RAX: ffffffff80e60a82 RBX: 000000000000000e RCX: fffffffffffffffe
      [   66.830406] RDX: ffffc900001363fc RSI: ffffffffffffffff RDI: ffffc900001363fc
      [   66.838520] RBP: ffff88008b707878 R08: 000000000000ffff R09: 000000000000ffff
      [   66.846649] R10: 0000000000000001 R11: ffffffffa01c6368 R12: ffffc900001363fc
      [   66.854765] R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000
      [   66.862910] FS:  0000000000000000(0000) GS:ffff88016ecc0000(0000) knlGS:0000000000000000
      [   66.872150] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   66.878696] CR2: ffffc900001363fc CR3: 0000000002c09000 CR4: 00000000003406e0
      [   66.886820] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   66.894938] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   66.903052] Stack:
      [   66.905346]  ffff88008b7078b0 ffffffff806cb1db 000000000000000e 0000000000000000
      [   66.913854]  ffff88008b707928 ffffffffa00d1050 ffffffffa00d104e ffff88008b707918
      [   66.922353]  ffffffff806ccbd6 ffff88008b707948 0000000000000046 ffff88008b707940
      [   66.930855] Call Trace:
      [   66.933646]  [<ffffffff806cb1db>] string.isra.4+0x3b/0xd0
      [   66.939793]  [<ffffffff806ccbd6>] vsnprintf+0x116/0x540
      [   66.945742]  [<ffffffff806d02f0>] kvasprintf+0x40/0x80
      [   66.951591]  [<ffffffff806d0370>] kasprintf+0x40/0x50
      [   66.957359]  [<ffffffffa00c085f>] dapm_create_or_share_kcontrol+0x1cf/0x300 [snd_soc_core]
      [   66.966771]  [<ffffffff8057dd1e>] ? __kmalloc+0x16e/0x2a0
      [   66.972931]  [<ffffffffa00c0dab>] snd_soc_dapm_new_widgets+0x41b/0x4b0 [snd_soc_core]
      [   66.981857]  [<ffffffffa00be8c0>] ? snd_soc_dapm_add_routes+0xb0/0xd0 [snd_soc_core]
      [   67.007828]  [<ffffffffa00b92ed>] soc_probe_component+0x23d/0x360 [snd_soc_core]
      [   67.016244]  [<ffffffff80b14e69>] ? mutex_unlock+0x9/0x10
      [   67.022405]  [<ffffffffa00ba02f>] snd_soc_instantiate_card+0x47f/0xd10 [snd_soc_core]
      [   67.031329]  [<ffffffff8049eeb2>] ? debug_mutex_init+0x32/0x40
      [   67.037973]  [<ffffffffa00baa92>] snd_soc_register_card+0x1d2/0x2b0 [snd_soc_core]
      [   67.046619]  [<ffffffffa00c8b54>] devm_snd_soc_register_card+0x44/0x80 [snd_soc_core]
      [   67.055539]  [<ffffffffa01c303b>] skylake_audio_probe+0x1b/0x20 [snd_soc_skl_rt286]
      [   67.064292]  [<ffffffff808aa887>] platform_drv_probe+0x37/0x90
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      fb203adc
    • Rainer Weikusat's avatar
      af_unix: Fix splice-bind deadlock · c845acb3
      Rainer Weikusat authored
      On 2015/11/06, Dmitry Vyukov reported a deadlock involving the splice
      system call and AF_UNIX sockets,
      
      http://lists.openwall.net/netdev/2015/11/06/24
      
      The situation was analyzed as
      
      (a while ago) A: socketpair()
      B: splice() from a pipe to /mnt/regular_file
      	does sb_start_write() on /mnt
      C: try to freeze /mnt
      	wait for B to finish with /mnt
      A: bind() try to bind our socket to /mnt/new_socket_name
      	lock our socket, see it not bound yet
      	decide that it needs to create something in /mnt
      	try to do sb_start_write() on /mnt, block (it's
      	waiting for C).
      D: splice() from the same pipe to our socket
      	lock the pipe, see that socket is connected
      	try to lock the socket, block waiting for A
      B:	get around to actually feeding a chunk from
      	pipe to file, try to lock the pipe.  Deadlock.
      
      on 2015/11/10 by Al Viro,
      
      http://lists.openwall.net/netdev/2015/11/10/4
      
      The patch fixes this by removing the kern_path_create related code from
      unix_mknod and executing it as part of unix_bind prior acquiring the
      readlock of the socket in question. This means that A (as used above)
      will sb_start_write on /mnt before it acquires the readlock, hence, it
      won't indirectly block B which first did a sb_start_write and then
      waited for a thread trying to acquire the readlock. Consequently, A
      being blocked by C waiting for B won't cause a deadlock anymore
      (effectively, both A and B acquire two locks in opposite order in the
      situation described above).
      
      Dmitry Vyukov(<dvyukov@google.com>) tested the original patch.
      Signed-off-by: default avatarRainer Weikusat <rweikusat@mobileactivedefense.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c845acb3
    • David Ahern's avatar
      net: Propagate lookup failure in l3mdev_get_saddr to caller · b5bdacf3
      David Ahern authored
      Commands run in a vrf context are not failing as expected on a route lookup:
          root@kenny:~# ip ro ls table vrf-red
          unreachable default
      
          root@kenny:~# ping -I vrf-red -c1 -w1 10.100.1.254
          ping: Warning: source address might be selected on device other than vrf-red.
          PING 10.100.1.254 (10.100.1.254) from 0.0.0.0 vrf-red: 56(84) bytes of data.
      
          --- 10.100.1.254 ping statistics ---
          2 packets transmitted, 0 received, 100% packet loss, time 999ms
      
      Since the vrf table does not have a route for 10.100.1.254 the ping
      should have failed. The saddr lookup causes a full VRF table lookup.
      Propogating a lookup failure to the user allows the command to fail as
      expected:
      
          root@kenny:~# ping -I vrf-red -c1 -w1 10.100.1.254
          connect: No route to host
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5bdacf3
    • hayeswang's avatar
      r8152: add reset_resume function · 7ec2541a
      hayeswang authored
      When the reset_resume() is called, the flag of SELECTIVE_SUSPEND should be
      cleared and reinitialize the device, whether the SELECTIVE_SUSPEND is set
      or not. If reset_resume() is called, it means the power supply is cut or the
      device is reset. That is, the device wouldn't be in runtime suspend state and
      the reinitialization is necessary.
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ec2541a
    • Florian Westphal's avatar
      connector: bump skb->users before callback invocation · 55285bf0
      Florian Westphal authored
      Dmitry reports memleak with syskaller program.
      Problem is that connector bumps skb usecount but might not invoke callback.
      
      So move skb_get to where we invoke the callback.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55285bf0
  5. 04 Jan, 2016 3 commits