Skip to content
  1. Dec 11, 2015
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 0bd0f1e6
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "Most are minor to important fixes.
      
        There is one performance enhancement that I took on the grounds that
        failing to check if other processes can run before running what's
        intended to be a background, idle-time task is a bug, even though the
        primary effect of the fix is to improve performance (and it was a very
        simple patch)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/mlx5: Postpone remove_keys under knowledge of coming preemption
        IB/mlx4: Use vmalloc for WR buffers when needed
        IB/mlx4: Use correct order of variables in log message
        iser-target: Remove explicit mlx4 work-around
        mlx4: Expose correct max_sge_rd limit
        IB/mad: Require CM send method for everything except ClassPortInfo
        IB/cma: Add a missing rcu_read_unlock()
        IB core: Fix ib_sg_to_pages()
        IB/srp: Fix srp_map_sg_fr()
        IB/srp: Fix indirect data buffer rkey endianness
        IB/srp: Initialize dma_length in srp_map_idb
        IB/srp: Fix possible send queue overflow
        IB/srp: Fix a memory leak
        IB/sa: Put netlink request into the request list before sending
        IB/iser: use sector_div instead of do_div
        IB/core: use RCU for uverbs id lookup
        IB/qib: Minor fixes to qib per SFF 8636
        IB/core: Fix user mode post wr corruption
        IB/qib: Fix qib_mr structure
      0bd0f1e6
    • Linus Torvalds's avatar
      Merge tag 'sound-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · a80c47da
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Again less intensive changes in this rc: you can find only a few
        HD-audio fixes (noise fixes for Intel Broxton chip and a few Thinkpad
        models, quirks for Alienware 17 and Packard Bell DOTS) in addition to
        a long-standing rme96 bug fix"
      
      * tag 'sound-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/ca0132 - quirk for Alienware 17 2015
        ALSA: hda - Fix noise problems on Thinkpad T440s
        ALSA: hda - Fixing speaker noise on the two latest thinkpad models
        ALSA: hda - Add inverted dmic for Packard Bell DOTS
        ALSA: hda - Fix playback noise with 24/32 bit sample size on BXT
        ALSA: rme96: Fix unexpected volume reset after rate changes
      a80c47da
  2. Dec 10, 2015
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.4-rc5' of git://github.com/awilliam/linux-vfio · 6764e5eb
      Linus Torvalds authored
      Pull VFIO fixes from Alex Williamson:
      
       - Various fixes for removing redundancy, const'ifying structs, avoiding
         stack usage, fixing WARN usage (Krzysztof Kozlowski, Julia Lawall,
         Kees Cook, Dan Carpenter)
      
       - Revert No-IOMMU mode as the intended user has not emerged (Alex
         Williamson)
      
      * tag 'vfio-v4.4-rc5' of git://github.com/awilliam/linux-vfio:
        Revert: "vfio: Include No-IOMMU mode"
        vfio: fix a warning message
        vfio: platform: remove needless stack usage
        vfio-pci: constify pci_error_handlers structures
        vfio: Drop owner assignment from platform_driver
      6764e5eb
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-4.4-rc4' of... · eef121f4
      Linus Torvalds authored
      Merge tag 'devicetree-fixes-for-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
      
      Pull DT fixes from Rob Herring:
       "I think this should be all for 4.4:
      
         - Fix incorrect warning about overlapping memory regions
      
         - Export of_irq_find_parent again which was made static in 4.4, but
           has users pending for 4.5.
      
         - Fix of_msi_map_rid declaration location
      
         - Fix re-entrancy for of_fdt_unflatten_tree
      
         - Clean-up of phys_addr_t printks"
      
      * tag 'devicetree-fixes-for-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of/irq: move of_msi_map_rid declaration to the correct ifdef section
        of/irq: Export of_irq_find_parent again
        of/fdt: Add mutex protection for calls to __unflatten_device_tree()
        of/address: fix typo in comment block of of_translate_one()
        of: do not use 0x in front of %pa
        of: Fix comparison of reserved memory regions
      eef121f4
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · abb7e2b3
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "One small build fix, a couple do_div() fixes, and a fix for the gpio
        basic clock type are the major changes here.  There's also a couple
        fixes for the TI, sunxi, and scpi clock drivers"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: sunxi: pll2: Fix clock running too fast
        clk: scpi: add missing of_node_put
        clk: qoriq: fix memory leak
        imx/clk-pllv2: fix wrong do_div() usage
        imx/clk-pllv1: fix wrong do_div() usage
        clk: mmp: add linux/clk.h includes
        clk: ti: drop locking code from mux/divider drivers
        clk: ti816x: Add missing dmtimer clkdev entries
        clk: ti: fapll: fix wrong do_div() usage
        clk: ti: clkt_dpll: fix wrong do_div() usage
        clk: gpio: Get parent clk names in of_gpio_clk_setup()
      abb7e2b3
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.4-1' of git://git.code.sf.net/p/openipmi/linux-ipmi · 9a0f76fd
      Linus Torvalds authored
      Pull IPMI fix from Corey Minyard:
       "Fix an Oops if an interrupt occurs at startup.  This can happen on
        some hardware"
      
      * tag 'for-linus-4.4-1' of git://git.code.sf.net/p/openipmi/linux-ipmi:
        ipmi: move timer init to before irq is setup
      9a0f76fd
    • Jan Stancek's avatar
      ipmi: move timer init to before irq is setup · 27f972d3
      Jan Stancek authored
      
      
      We encountered a panic on boot in ipmi_si on a dell per320 due to an
      uninitialized timer as follows.
      
      static int smi_start_processing(void       *send_info,
                                      ipmi_smi_t intf)
      {
              /* Try to claim any interrupts. */
              if (new_smi->irq_setup)
                      new_smi->irq_setup(new_smi);
      
       --> IRQ arrives here and irq handler tries to modify uninitialized timer
      
          which triggers BUG_ON(!timer->function) in __mod_timer().
      
       Call Trace:
         <IRQ>
         [<ffffffffa0532617>] start_new_msg+0x47/0x80 [ipmi_si]
         [<ffffffffa053269e>] start_check_enables+0x4e/0x60 [ipmi_si]
         [<ffffffffa0532bd8>] smi_event_handler+0x1e8/0x640 [ipmi_si]
         [<ffffffff810f5584>] ? __rcu_process_callbacks+0x54/0x350
         [<ffffffffa053327c>] si_irq_handler+0x3c/0x60 [ipmi_si]
         [<ffffffff810efaf0>] handle_IRQ_event+0x60/0x170
         [<ffffffff810f245e>] handle_edge_irq+0xde/0x180
         [<ffffffff8100fc59>] handle_irq+0x49/0xa0
         [<ffffffff8154643c>] do_IRQ+0x6c/0xf0
         [<ffffffff8100ba53>] ret_from_intr+0x0/0x11
      
              /* Set up the timer that drives the interface. */
              setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
      
      The following patch fixes the problem.
      
      To: Openipmi-developer@lists.sourceforge.net
      To: Corey Minyard <minyard@acm.org>
      CC: linux-kernel@vger.kernel.org
      
      Signed-off-by: default avatarJan Stancek <jstancek@redhat.com>
      Signed-off-by: default avatarTony Camuso <tcamuso@redhat.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      Cc: stable@vger.kernel.org # Applies cleanly to 3.10-, needs small rework before
      27f972d3
    • Sasha Levin's avatar
      bitops.h: correctly handle rol32 with 0 byte shift · d7e35dfa
      Sasha Levin authored
      ROL on a 32 bit integer with a shift of 32 or more is undefined and the
      result is arch-dependent. Avoid this by handling the trivial case of
      roling by 0 correctly.
      
      The trivial solution of checking if shift is 0 breaks gcc's detection
      of this code as a ROL instruction, which is unacceptable.
      
      This bug was reported and fixed in GCC
      (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157
      
      ):
      
      	The standard rotate idiom,
      
      	  (x << n) | (x >> (32 - n))
      
      	is recognized by gcc (for concreteness, I discuss only the case that x
      	is an uint32_t here).
      
      	However, this is portable C only for n in the range 0 < n < 32. For n
      	== 0, we get x >> 32 which gives undefined behaviour according to the
      	C standard (6.5.7, Bitwise shift operators). To portably support n ==
      	0, one has to write the rotate as something like
      
      	  (x << n) | (x >> ((-n) & 31))
      
      	And this is apparently not recognized by gcc.
      
      Note that this is broken on older GCCs and will result in slower ROL.
      
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d7e35dfa
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 626d114f
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "A couple of fixes, both -stable fodder (9p one all way back to 2.6.32,
        dio - to all branches where "Fix negative return from dio read beyond
        eof" will end up it; it's a fixup to commit marked for -stable)"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix the regression from "direct-io: Fix negative return from dio read beyond eof"
        9p: ->evict_inode() should kick out ->i_data, not ->i_mapping
      626d114f
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 978d6a90
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "These are more fixes I'd like to have in v4.4.  Several for the Altera
        driver added for v4.4, and one for an MSI domain problem that affects
        several arm64 platforms:
      
        MSI:
         - Only use the generic MSI layer when domain is hierarchical (Marc
           Zyngier)
      
        Altera host bridge driver:
         - Fix loop in tlp_read_packet() (Dan Carpenter)
         - Fix Requester ID for config accesses (Ley Foon Tan)
         - Check TLP completion status (Ley Foon Tan)
         - Fix error when INTx is 4 (Ley Foon Tan)"
      
      * tag 'pci-v4.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: altera: Fix error when INTx is 4
        PCI: altera: Check TLP completion status
        PCI: altera: Fix Requester ID for config accesses
        PCI: altera: Fix loop in tlp_read_packet()
        PCI/MSI: Only use the generic MSI layer when domain is hierarchical
      978d6a90
    • Gabriele Martino's avatar
      ALSA: hda/ca0132 - quirk for Alienware 17 2015 · 5328e1ea
      Gabriele Martino authored
      
      
      The Alienware 17 (2015) has the same card and pin configuration of the
      Alienware 15, so the same quirks must be applied.
      
      Signed-off-by: default avatarGabriele Martino <g.martino@gmx.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5328e1ea
  3. Dec 09, 2015
  4. Dec 08, 2015
    • Guenter Roeck's avatar
      of/fdt: Add mutex protection for calls to __unflatten_device_tree() · f8062386
      Guenter Roeck authored
      
      
      __unflatten_device_tree() calls unflatten_dt_node(), which declares
      a static variable. It is therefore not reentrant.
      
      One of the callers of __unflatten_device_tree(), unflatten_device_tree(),
      is only called once during early initialization and does not need to be
      protected. The other caller, of_fdt_unflatten_tree(), can be called at
      any time, possibly multiple times in parallel. This can happen, for
      example, if multiple devicetree overlays have to be loaded and installed.
      
      Without this protection, errors such as the following may be seen.
      
      kernel: End of tree marker overwritten: e6a3a458
      kernel: find_target_node:
      	Failed to find target-indirect node at /fragment@0
      kernel: __of_overlay_create: of_build_overlay_info() failed for tree@/
      
      Add a mutex to of_fdt_unflatten_tree() to make the call reentrant.
      
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org # v4.1+
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      f8062386
    • Hui Wang's avatar
      ALSA: hda - Fixing speaker noise on the two latest thinkpad models · 23adc192
      Hui Wang authored
      We have two latest thinkpad laptop models which are all based on the
      Intel skylake platforms, and all of them have the codec alc293 on
      them. When the machines boot to the desktop, an greeting dialogue
      shows up with the notification sound. But on these two models, there
      is noise with the notification sound. We have 3 SKUs for each of
      the models, all of them have this problem.
      
      So far, this problem is only specific to these two thinkpad models,
      we did not find this problem on the old thinkpad models with the
      codec alc293 or alc292.
      
      A workaround for this problem is disabling the aamix.
      
      Cc: stable@vger.kernel.org
      BugLink: https://bugs.launchpad.net/bugs/1523517
      
      
      Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      23adc192
    • Bart Van Assche's avatar
      IB core: Fix ib_sg_to_pages() · 8f5ba10e
      Bart Van Assche authored
      On 12/03/2015 01:18 AM, Christoph Hellwig wrote:
      > The patch looks good to me, but while we touch this area, how about
      > throwing in a few cosmetic fixes as well?
      
      How about the patch below ? In that version of the ib_sg_to_pages() fix
      these concerns have been addressed and additionally to more bugs have been fixed.
      
      ------------
      
      [PATCH] IB core: Fix ib_sg_to_pages()
      
      Fix the code for detecting gaps. A gap occurs not only if the
      second or later scatterlist element is not aligned but also if
      any scatterlist element other than the last does not end at a
      page boundary.
      
      In the code for coalescing contiguous elements, ensure that
      mr->length is correct and that last_page_addr is up-to-date.
      
      Ensure that this function returns a negative
      error code instead of zero if the first set_page() call fails.
      
      Fixes: commit 4c67e2bf
      
       ("IB/core: Introduce new fast registration API")
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      8f5ba10e
    • Bart Van Assche's avatar
      IB/srp: Fix srp_map_sg_fr() · 57b0be9c
      Bart Van Assche authored
      After dma_map_sg() has been called the return value of that function
      must be used as the number of elements in the scatterlist instead of
      scsi_sg_count().
      
      Fixes: commit f7f7aab1
      
       ("IB/srp: Convert to new registration API")
      Reported-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Cc: stable <stable@vger.kernel.org> # v4.4+
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      57b0be9c
    • Bart Van Assche's avatar
      IB/srp: Fix indirect data buffer rkey endianness · a745f4f4
      Bart Van Assche authored
      Detected by sparse.
      
      Fixes: commit 330179f2
      
       ("IB/srp: Register the indirect data buffer descriptor")
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Cc: stable <stable@vger.kernel.org> # v4.3+
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      a745f4f4
    • Christoph Hellwig's avatar
      IB/srp: Initialize dma_length in srp_map_idb · fc925518
      Christoph Hellwig authored
      Without this sg_dma_len will return 0 on architectures tha have
      the dma_length field.
      
      Fixes: commit f7f7aab1
      
       ("IB/srp: Convert to new registration API")
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      fc925518
    • Sagi Grimberg's avatar
      IB/srp: Fix possible send queue overflow · 09c0c0be
      Sagi Grimberg authored
      
      
      When using work request based memory registration (fast_reg)
      we must reserve SQ entries for registration and invalidation
      in addition to send operations. Each IO consumes 3 SQ entries
      (registration, send, invalidation) so we need to allocate 3x
      larger send-queue instead of 2x.
      
      Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
      CC: Stable <stable@vger.kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      09c0c0be
    • Bart Van Assche's avatar
      IB/srp: Fix a memory leak · 4d59ad29
      Bart Van Assche authored
      
      
      If srp_connect_ch() returns a positive value then that is considered
      by its caller as a connection failure but this does not result in a
      scsi_host_put() call and additionally causes the srp_create_target()
      function to return a positive value while it should return a negative
      value. Avoid all this confusion and additionally fix a memory leak by
      ensuring that srp_connect_ch() always returns a value that is <= 0.
      This patch avoids that a rejected login triggers the following memory
      leak:
      
      unreferenced object 0xffff88021b24a220 (size 8):
        comm "srp_daemon", pid 56421, jiffies 4295006762 (age 4240.750s)
        hex dump (first 8 bytes):
          68 6f 73 74 35 38 00 a5                          host58..
        backtrace:
          [<ffffffff8151014a>] kmemleak_alloc+0x7a/0xc0
          [<ffffffff81165c1e>] __kmalloc_track_caller+0xfe/0x160
          [<ffffffff81260d2b>] kvasprintf+0x5b/0x90
          [<ffffffff81260e2d>] kvasprintf_const+0x8d/0xb0
          [<ffffffff81254b0c>] kobject_set_name_vargs+0x3c/0xa0
          [<ffffffff81337e3c>] dev_set_name+0x3c/0x40
          [<ffffffff81355757>] scsi_host_alloc+0x327/0x4b0
          [<ffffffffa03edc8e>] srp_create_target+0x4e/0x8a0 [ib_srp]
          [<ffffffff8133778b>] dev_attr_store+0x1b/0x20
          [<ffffffff811f27fa>] sysfs_kf_write+0x4a/0x60
          [<ffffffff811f1e8e>] kernfs_fop_write+0x14e/0x180
          [<ffffffff81176eef>] __vfs_write+0x2f/0xf0
          [<ffffffff811771e4>] vfs_write+0xa4/0x100
          [<ffffffff81177c64>] SyS_write+0x54/0xc0
          [<ffffffff8151b257>] entry_SYSCALL_64_fastpath+0x12/0x6f
      
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Cc: Sebastian Parschauer <sebastian.riemer@profitbricks.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      4d59ad29
    • Kaike Wan's avatar
      IB/sa: Put netlink request into the request list before sending · 3ebd2fd0
      Kaike Wan authored
      
      
      It was found by Saurabh Sengar that the netlink code tried to allocate
      memory with GFP_KERNEL while holding a spinlock. While it is possible
      to fix the issue by replacing GFP_KERNEL with GFP_ATOMIC, it is better
      to get rid of the spinlock while sending the packet. However, in order
      to protect against a race condition that a quick response may be received
      before the request is put on the request list, we need to put the request
      on the list first.
      
      Signed-off-by: default avatarKaike Wan <kaike.wan@intel.com>
      Reviewed-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Reported-by: default avatarSaurabh Sengar <saurabh.truth@gmail.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3ebd2fd0