1. 11 Jan, 2016 1 commit
  2. 06 Jan, 2016 8 commits
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 9d993885
      Takashi Iwai authored
       Conflicts:
      	drivers/gpu/drm/i915/intel_display.c
      	sound/soc/intel/skylake/skl.h
      9d993885
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v4.4-rc8' of... · 3f37b26f
      Takashi Iwai authored
      Merge tag 'asoc-fix-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Last minute fixes for v4.4
      
      A few final fixes for v4.4, the main one being the two patches to the
      new Sky Lake drivers which fix a previous incorrect fix that went in
      during an earlier -rc.
      3f37b26f
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · ca9ea7a5
      Takashi Iwai authored
      ca9ea7a5
    • Julia Lawall's avatar
      ALSA: emux: constify nrpn_conv_table structures · 3643b46c
      Julia Lawall authored
      The nrpn_conv_table structures are never modified, so declare them as
      const.
      
      Done with the help of Coccinelle.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3643b46c
    • Takashi Sakamoto's avatar
      ALSA: dice: expand timeout to wait for Dice notification · 2eb65d67
      Takashi Sakamoto authored
      Some users have reported that their Dice based models generate ETIMEDOUT
      when starting PCM playback. It means that current timeout (=100msec) is
      not enough for their models to transfer notifications.
      
      This commit expands the timeout up to 2 sec. As a result, in a worst case,
      any operations to start AMDTP streams takes 2 sec or more. Then, in
      userspace, snd_pcm_hw_params(), snd_pcm_prepare(), snd_pcm_recover(),
      snd_rawmidi_open(), snd_seq_connect_from() and snd_seq_connect_to() may
      take the time.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2eb65d67
    • Takashi Sakamoto's avatar
      ALSA: dice: purge transaction initialization at timeout of Dice notification · a2875a92
      Takashi Sakamoto authored
      In previous commit, card registration is processed under situation
      with few bus reset. There's no need to add a workaround of transaction
      re-initialization at timeout.
      
      This commit purges the re-initialization.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a2875a92
    • Takashi Sakamoto's avatar
      ALSA: dice: postpone card registration · b59fb190
      Takashi Sakamoto authored
      Some models based on ASIC for Dice II series (STD, CP) change their
      hardware configurations after appearing on IEEE 1394 bus. This is due to
      interactions of boot loader (RedBoot), firmwares (eCos) and vendor's
      configurations. This causes current ALSA dice driver to get wrong
      information about the hardware's capability because its probe function
      runs just after detecting unit of the model.
      
      As long as I investigated, it takes a bit time (less than 1 second) to load
      the firmware after bootstrap. Just after loaded, the driver can get
      information about the unit. Then the hardware is initialized according to
      vendor's configurations. After, the got information becomes wrong.
      Between bootstrap, firmware loading and post configuration, some bus resets
      are observed.
      
      This commit offloads most processing of probe function into workqueue and
      schedules the workqueue after successive bus resets. This has an effect to
      get correct hardware information and avoid involvement to bus reset storm.
      
      For code simplicity, this change effects all of Dice-based models, i.e.
      Dice II, Dice Jr., Dice Mini and Dice III.
      
      I use a loose strategy to manage a race condition between the work and the
      bus reset. This is due to a specification of dice transaction. When bus
      reset occurs, registered address for the transaction is cleared. Drivers
      must re-register their own address again. While, this operation is required
      for the work because the work includes to wait for the transaction. This
      commit uses no lock primitives for the race condition. Instead, checking
      'registered' member of 'struct snd_dice' avoid executing the work again.
      If sound card is not registered, the work can be scheduled again by bus
      reset handler.
      
      When .remove callback is executed, the sound card is going to be released.
      The work should not be pending or executed in the releasing. This commit
      uses cancel_delayed_work_sync() in .remove callback and wait till the
      pending work finished. After .remove callback, .update callback is not
      executed, therefore no works are scheduled again.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b59fb190
    • Takashi Sakamoto's avatar
      ALSA: dice: split subaddress check from category check · 4a47a87d
      Takashi Sakamoto authored
      Before allocating an instance of sound card, ALSA dice driver checks
      chip_ID_hi in Bus information block of Config ROM, then also checks
      subaddresses. The former operation reads cache of Config ROM in Linux
      FireWire subsystem, while the latter operation sends read transaction.
      The latter can be merged into initialization of transaction system.
      
      This commit splits these two operations to reduce needless transactions
      in probe processing.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4a47a87d
  3. 05 Jan, 2016 6 commits
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • Mark Brown's avatar
    • 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
  4. 03 Jan, 2016 3 commits
  5. 31 Dec, 2015 5 commits
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.4-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 9c982e86
      Linus Torvalds authored
      Pull PCI bugfix from Bjorn Helgaas:
       "Here's another fix for v4.4.
      
        This fixes 32-bit config reads for the HiSilicon driver.  Obviously
        the driver is completely broken without this fix (apparently it
        actually was tested internally, but got broken somehow in the process
        of upstreaming it).
      
        Summary:
      
        HiSilicon host bridge driver
          Fix 32-bit config reads (Dongdong Liu)"
      
      * tag 'pci-v4.4-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: hisi: Fix hisi_pcie_cfg_read() 32-bit reads
      9c982e86
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 7c672dd6
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
       "Just some missing syscall wire ups"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: Wire up mlock2 system call.
        sparc: Add all necessary direct socket system calls.
      7c672dd6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 8f5daf2a
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Prevent XFRM per-cpu counter updates for one namespace from being
          applied to another namespace.  Fix from DanS treetman.
      
       2) Fix RCU de-reference in iwl_mvm_get_key_sta_id(), from Johannes
          Berg.
      
       3) Remove ethernet header assumption in nft_do_chain_netdev(), from
          Pablo Neira Ayuso.
      
       4) Fix cpsw PHY ident with multiple slaves and fixed-phy, from Pascal
          Speck.
      
       5) Fix use after free in sixpack_close and mkiss_close.
      
       6) Fix VXLAN fw assertion on bnx2x, from Yuval Mintz.
      
       7) natsemi doesn't check for DMA mapping errors, from Alexey
          Khoroshilov.
      
       8) Fix inverted test in ip6addrlbl_get(), from ANdrey Ryabinin.
      
       9) Missing initialization of needed_headroom in geneve tunnel driver,
          from Paolo Abeni.
      
      10) Fix conntrack template leak in openvswitch, from Joe Stringer.
      
      11) Mission initialization of wq->flags in sock_alloc_inode(), from
          Nicolai Stange.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits)
        sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close
        net, socket, socket_wq: fix missing initialization of flags
        drivers: net: cpsw: fix error return code
        openvswitch: Fix template leak in error cases.
        sctp: label accepted/peeled off sockets
        sctp: use GFP_USER for user-controlled kmalloc
        qlcnic: fix a loop exit condition better
        net: cdc_ncm: avoid changing RX/TX buffers on MTU changes
        geneve: initialize needed_headroom
        ipv6: honor ifindex in case we receive ll addresses in router advertisements
        addrconf: always initialize sysctl table data
        ipv6/addrlabel: fix ip6addrlbl_get()
        switchdev: bridge: Pass ageing time as clock_t instead of jiffies
        sh_eth: fix 16-bit descriptor field access endianness too
        veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.
        net: usb: cdc_ncm: Adding Dell DW5813 LTE AT&T Mobile Broadband Card
        net: usb: cdc_ncm: Adding Dell DW5812 LTE Verizon Mobile Broadband Card
        natsemi: add checks for dma mapping errors
        rhashtable: Kill harmless RCU warning in rhashtable_walk_init
        openvswitch: correct encoding of set tunnel action attributes
        ...
      8f5daf2a
    • David S. Miller's avatar
      sparc: Wire up mlock2 system call. · 42d85c52
      David S. Miller authored
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42d85c52
    • David S. Miller's avatar
      sparc: Add all necessary direct socket system calls. · 8b30ca73
      David S. Miller authored
      The GLIBC folks would like to eliminate socketcall support
      eventually, and this makes sense regardless so wire them
      all up.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b30ca73
  6. 30 Dec, 2015 17 commits
    • Xin Long's avatar
      sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close · 068d8bd3
      Xin Long authored
      In sctp_close, sctp_make_abort_user may return NULL because of memory
      allocation failure. If this happens, it will bypass any state change
      and never free the assoc. The assoc has no chance to be freed and it
      will be kept in memory with the state it had even after the socket is
      closed by sctp_close().
      
      So if sctp_make_abort_user fails to allocate memory, we should abort
      the asoc via sctp_primitive_ABORT as well. Just like the annotation in
      sctp_sf_cookie_wait_prm_abort and sctp_sf_do_9_1_prm_abort said,
      "Even if we can't send the ABORT due to low memory delete the TCB.
      This is a departure from our typical NOMEM handling".
      
      But then the chunk is NULL (low memory) and the SCTP_CMD_REPLY cmd would
      dereference the chunk pointer, and system crash. So we should add
      SCTP_CMD_REPLY cmd only when the chunk is not NULL, just like other
      places where it adds SCTP_CMD_REPLY cmd.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      068d8bd3
    • Julia Lawall's avatar
      ALSA: dummy: constify dummy_timer_ops structures · d8c5ed75
      Julia Lawall authored
      The dummy_timer_ops structures are never modified, so declare them as
      const.
      
      Done with the help of Coccinelle.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d8c5ed75
    • Julia Lawall's avatar
      ALSA: cs5535audio: constify cs5535audio_dma_ops structures · 55a8aeef
      Julia Lawall authored
      The cs5535audio_dma_ops structures are never modified, so declare them as
      const.
      
      Done with the help of Coccinelle.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      55a8aeef
    • Julia Lawall's avatar
      ALSA: atiixp: constify atiixp_dma_ops structures · 064e186f
      Julia Lawall authored
      The atiixp_dma_ops structures are never modified, so declare them as const.
      
      Done with the help of Coccinelle.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      064e186f
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-for-davem-2015-12-28' of... · a0ccc3f2
      David S. Miller authored
      Merge tag 'wireless-drivers-for-davem-2015-12-28' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      iwlwifi
      
      * don't load firmware that won't exist for 7260
      * fix RCU splat
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0ccc3f2
    • Nicolai Stange's avatar
      net, socket, socket_wq: fix missing initialization of flags · 574aab1e
      Nicolai Stange authored
      Commit ceb5d58b ("net: fix sock_wake_async() rcu protection") from
      the current 4.4 release cycle introduced a new flags member in
      struct socket_wq and moved SOCKWQ_ASYNC_NOSPACE and SOCKWQ_ASYNC_WAITDATA
      from struct socket's flags member into that new place.
      
      Unfortunately, the new flags field is never initialized properly, at least
      not for the struct socket_wq instance created in sock_alloc_inode().
      
      One particular issue I encountered because of this is that my GNU Emacs
      failed to draw anything on my desktop -- i.e. what I got is a transparent
      window, including the title bar. Bisection lead to the commit mentioned
      above and further investigation by means of strace told me that Emacs
      is indeed speaking to my Xorg through an O_ASYNC AF_UNIX socket. This is
      reproducible 100% of times and the fact that properly initializing the
      struct socket_wq ->flags fixes the issue leads me to the conclusion that
      somehow SOCKWQ_ASYNC_WAITDATA got set in the uninitialized ->flags,
      preventing my Emacs from receiving any SIGIO's due to data becoming
      available and it got stuck.
      
      Make sock_alloc_inode() set the newly created struct socket_wq's ->flags
      member to zero.
      
      Fixes: ceb5d58b ("net: fix sock_wake_async() rcu protection")
      Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      574aab1e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · c6169202
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Make the block layer great again.
      
        Basically three amazing fixes in this pull request, split into 4
        patches.  Believe me, they should go into 4.4.  Two of them fix a
        regression, the third and last fixes an easy-to-trigger bug.
      
         - Fix a bad irq enable through null_blk, for queue_mode=1 and using
           timer completions.  Add a block helper to restart a queue
           asynchronously, and use that from null_blk.  From me.
      
         - Fix a performance issue in NVMe.  Some devices (Intel Pxxxx) expose
           a stripe boundary, and performance suffers if we cross it.  We took
           that into account for merging, but not for the newer splitting
           code.  Fix from Keith.
      
         - Fix a kernel oops in lightnvm with multiple channels.  From Matias"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        lightnvm: wrong offset in bad blk lun calculation
        null_blk: use async queue restart helper
        block: add blk_start_queue_async()
        block: Split bios on chunk boundaries
      c6169202
    • Charles Keepax's avatar
      ASoC: Use nested lock for snd_soc_dapm_mutex_lock · 783513ee
      Charles Keepax authored
      snd_soc_dapm_mutex_lock currently uses the un-nested call which can
      cause lockdep warnings when called from control handlers (a relatively
      common usage) and using modules. As creating the control causes a
      potential mutex inversion with the handler, creating the control will
      take the controls_rwsem under the dapm_mutex and accessing the control
      will take the dapm_mutex under controls_rwsem.
      
      All the users look like they want to be using the runtime class of the
      lock anyway, so this patch just changes snd_soc_dapm_mutex_lock to use
      the nested call, with the SND_SOC_DAPM_CLASS_RUNTIME class.
      
      Fixes: f6d5e586 ("ASoC: dapm: Add helpers to lock/unlock DAPM mutex")
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      783513ee
    • Bard Liao's avatar
      ASoC: rt5645: add sys clk detection · ca8457bb
      Bard Liao authored
      Add system clock detection to prevent output DC from SPO.
      Signed-off-by: default avatarBard Liao <bardliao@realtek.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ca8457bb
    • Gary Wang's avatar
      drm/i915: increase the tries for HDMI hotplug live status checking · 3d8acd1f
      Gary Wang authored
      The total delay of HDMI hotplug detecting with 30ms is sometimes not
      enoughtfor HDMI live status up with specific HDMI monitors in BSW platform.
      
      After doing experiments for following monitors, it needs 80ms at least
      for those worst cases.
      
      Lenovo L246 1xwA (4 failed, necessary hot-plug delay: 58/40/60/40ms)
      Philips HH2AP (9 failed, necessary hot-plug delay: 80/50/50/60/46/40/58/58/39ms)
      BENQ ET-0035-N (6 failed, necessary hot-plug delay: 60/50/50/80/80/40ms)
      DELL U2713HM (2 failed, necessary hot-plug delay: 58/59ms)
      HP HP-LP2475w (5 failed, necessary hot-plug delay: 70/50/40/60/40ms)
      
      It looks like 70-80 ms is BSW platform needs in some bad cases of the
      monitors at this end (8 times delay at most). Keep less than 100ms for
      HDCP pulse HPD low (with at least 100ms) to respond a plug out.
      Reviewed-by: default avatarCooper Chiou <cooper.chiou@intel.com>
      Tested-by: default avatarGary Wang <gary.c.wang@intel.com>
      Cc: Gavin Hindman <gavin.hindman@intel.com>
      Cc: Sonika Jindal <sonika.jindal@intel.com>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Shobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: default avatarGary Wang <gary.c.wang@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1450858295-12804-1-git-send-email-gary.c.wang@intel.comTested-by: default avatarShobhit Kumar <shobhit.kumar@intel.com>
      Cc: drm-intel-fixes@lists.freedesktop.org
      Fixes: 237ed86c ("drm/i915: Check live status before reading edid")
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      (cherry picked from commit f8d03ea0)
      [Jani: undo the file mode change of the original commit]
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      3d8acd1f
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 866be88a
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "9 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm/vmstat: fix overflow in mod_zone_page_state()
        ocfs2/dlm: clear migration_pending when migration target goes down
        mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone()
        ocfs2: fix flock panic issue
        m32r: add io*_rep helpers
        m32r: fix build failure
        arch/x86/xen/suspend.c: include xen/xen.h
        mm: memcontrol: fix possible memcg leak due to interrupted reclaim
        ocfs2: fix BUG when calculate new backup super
      866be88a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · e25bd6ca
      Linus Torvalds authored
      Pull vfs fix from Al Viro:
       "Fix for 3.15 breakage of fcntl64() in arm OABI compat.  -stable
        fodder"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        [PATCH] arm: fix handling of F_OFD_... in oabi_fcntl64()
      e25bd6ca
    • Heiko Carstens's avatar
      mm/vmstat: fix overflow in mod_zone_page_state() · 6cdb18ad
      Heiko Carstens authored
      mod_zone_page_state() takes a "delta" integer argument.  delta contains
      the number of pages that should be added or subtracted from a struct
      zone's vm_stat field.
      
      If a zone is larger than 8TB this will cause overflows.  E.g.  for a
      zone with a size slightly larger than 8TB the line
      
          mod_zone_page_state(zone, NR_ALLOC_BATCH, zone->managed_pages);
      
      in mm/page_alloc.c:free_area_init_core() will result in a negative
      result for the NR_ALLOC_BATCH entry within the zone's vm_stat, since 8TB
      contain 0x8xxxxxxx pages which will be sign extended to a negative
      value.
      
      Fix this by changing the delta argument to long type.
      
      This could fix an early boot problem seen on s390, where we have a 9TB
      system with only one node.  ZONE_DMA contains 2GB and ZONE_NORMAL the
      rest.  The system is trying to allocate a GFP_DMA page but ZONE_DMA is
      completely empty, so it tries to reclaim pages in an endless loop.
      
      This was seen on a heavily patched 3.10 kernel.  One possible
      explaination seem to be the overflows caused by mod_zone_page_state().
      Unfortunately I did not have the chance to verify that this patch
      actually fixes the problem, since I don't have access to the system
      right now.  However the overflow problem does exist anyway.
      
      Given the description that a system with slightly less than 8TB does
      work, this seems to be a candidate for the observed problem.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6cdb18ad
    • xuejiufei's avatar
      ocfs2/dlm: clear migration_pending when migration target goes down · cc28d6d8
      xuejiufei authored
      We have found a BUG on res->migration_pending when migrating lock
      resources.  The situation is as follows.
      
      dlm_mark_lockres_migration
        res->migration_pending = 1;
        __dlm_lockres_reserve_ast
        dlm_lockres_release_ast returns with res->migration_pending remains
            because other threads reserve asts
        wait dlm_migration_can_proceed returns 1
        >>>>>>> o2hb found that target goes down and remove target
                from domain_map
        dlm_migration_can_proceed returns 1
        dlm_mark_lockres_migrating returns -ESHOTDOWN with
            res->migration_pending still remains.
      
      When reentering dlm_mark_lockres_migrating(), it will trigger the BUG_ON
      with res->migration_pending.  So clear migration_pending when target is
      down.
      Signed-off-by: default avatarJiufei Xue <xuejiufei@huawei.com>
      Reviewed-by: default avatarJoseph Qi <joseph.qi@huawei.com>
      Cc: Mark Fasheh <mfasheh@suse.de>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cc28d6d8
    • Andrew Banman's avatar
      mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone() · 5f0f2887
      Andrew Banman authored
      test_pages_in_a_zone() does not account for the possibility of missing
      sections in the given pfn range.  pfn_valid_within always returns 1 when
      CONFIG_HOLES_IN_ZONE is not set, allowing invalid pfns from missing
      sections to pass the test, leading to a kernel oops.
      
      Wrap an additional pfn loop with PAGES_PER_SECTION granularity to check
      for missing sections before proceeding into the zone-check code.
      
      This also prevents a crash from offlining memory devices with missing
      sections.  Despite this, it may be a good idea to keep the related patch
      '[PATCH 3/3] drivers: memory: prohibit offlining of memory blocks with
      missing sections' because missing sections in a memory block may lead to
      other problems not covered by the scope of this fix.
      Signed-off-by: default avatarAndrew Banman <abanman@sgi.com>
      Acked-by: default avatarAlex Thorlton <athorlton@sgi.com>
      Cc: Russ Anderson <rja@sgi.com>
      Cc: Alex Thorlton <athorlton@sgi.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Seth Jennings <sjennings@variantweb.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5f0f2887
    • Junxiao Bi's avatar
      ocfs2: fix flock panic issue · b5a8bc33
      Junxiao Bi authored
      Commit 4f656367 ("Move locks API users to locks_lock_inode_wait()")
      move flock/posix lock indentify code to locks_lock_inode_wait(), but
      missed to set fl_flags to FL_FLOCK which caused the following kernel
      panic on 4.4.0_rc5.
      
        kernel BUG at fs/locks.c:1895!
        invalid opcode: 0000 [#1] SMP
        Modules linked in: ocfs2(O) ocfs2_dlmfs(O) ocfs2_stack_o2cb(O) ocfs2_dlm(O) ocfs2_nodemanager(O) ocfs2_stackglue(O) iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi xen_kbdfront xen_netfront xen_fbfront xen_blkfront
        CPU: 0 PID: 20268 Comm: flock_unit_test Tainted: G           O    4.4.0-rc5-next-20151217 #1
        Hardware name: Xen HVM domU, BIOS 4.3.1OVM 05/14/2014
        task: ffff88007b3672c0 ti: ffff880028b58000 task.ti: ffff880028b58000
        RIP: locks_lock_inode_wait+0x2e/0x160
        Call Trace:
          ocfs2_do_flock+0x91/0x160 [ocfs2]
          ocfs2_flock+0x76/0xd0 [ocfs2]
          SyS_flock+0x10f/0x1a0
          entry_SYSCALL_64_fastpath+0x12/0x71
        Code: e5 41 57 41 56 49 89 fe 41 55 41 54 53 48 89 f3 48 81 ec 88 00 00 00 8b 46 40 83 e0 03 83 f8 01 0f 84 ad 00 00 00 83 f8 02 74 04 <0f> 0b eb fe 4c 8d ad 60 ff ff ff 4c 8d 7b 58 e8 0e 8e 73 00 4d
        RIP  locks_lock_inode_wait+0x2e/0x160
         RSP <ffff880028b5bce8>
        ---[ end trace dfca74ec9b5b274c ]---
      
      Fixes: 4f656367 ("Move locks API users to locks_lock_inode_wait()")
      Signed-off-by: default avatarJunxiao Bi <junxiao.bi@oracle.com>
      Cc: Mark Fasheh <mfasheh@suse.de>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Joseph Qi <joseph.qi@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b5a8bc33
    • Sudip Mukherjee's avatar
      m32r: add io*_rep helpers · 92a8ed4c
      Sudip Mukherjee authored
      m32r allmodconfig was failing with the error:
      
        error: implicit declaration of function 'read'
      
      On checking io.h it turned out that 'read' is not defined but 'readb' is
      defined and 'ioread8' will then obviously mean 'readb'.
      
      At the same time some of the helper functions ioreadN_rep() and
      iowriteN_rep() were missing which also led to the build failure.
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      92a8ed4c