1. 01 Aug, 2017 8 commits
    • Archit Taneja's avatar
      drm/msm/mdp5: Fix typo in encoder_enable path · b0e77fd8
      Archit Taneja authored
      The mdp5_cmd_encoder_disable is accidentally called in the encoder enable
      path. We've not seen any problems since we haven't tested with command
      mode panels in a while. Fix the copy-paste error.
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      b0e77fd8
    • Hans Verkuil's avatar
      drm/msm: NULL pointer dereference in drivers/gpu/drm/msm/msm_gem_vma.c · 79687057
      Hans Verkuil authored
      While I was testing the upcoming adv7533 CEC support with my Dragonboard c410
      I encountered this NULL pointer dereference:
      
      [   17.912822] Unable to handle kernel NULL pointer dereference at virtual address 000000e8
      [   17.917191] user pgtable: 4k pages, 48-bit VAs, pgd = ffff800030e9f000
      [   17.925249] [00000000000000e8] *pgd=00000000b0daf003, *pud=0000000000000000
      [   17.931650] Internal error: Oops: 96000005 [#1] PREEMPT SMP
      [   17.938395] Modules linked in: btqcomsmd btqca arc4 wcn36xx mac80211 bluetooth cfg80211 ecdh_generic r8152 snd_soc_hdmi_codec adv7511 cec
      qcom_wcnss_pil msm mdt_loader drm_kms_helper msm_rng rng_core drm
      [   17.943967] CPU: 0 PID: 1684 Comm: Xorg Tainted: G        W       4.13.0-rc1-dragonboard #111
      [   17.962005] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
      [   17.970685] task: ffff800031236c00 task.stack: ffff800033fbc000
      [   17.977582] PC is at msm_gem_unmap_vma+0x20/0x80 [msm]
      [   17.983213] LR is at put_iova+0x60/0xb8 [msm]
      [   17.988303] pc : [<ffff000000ac2d58>] lr : [<ffff000000ac07c8>] pstate: 20000145
      [   17.992733] sp : ffff800033fbfb30
      [   18.000193] x29: ffff800033fbfb30 x28: ffff800030b5f000
      [   18.003407] x27: 00000000000000b4 x26: ffff0000009f8cd8
      [   18.008789] x25: 0000000000000004 x24: dead000000000100
      [   18.014085] x23: dead000000000200 x22: ffff800030b5fd40
      [   18.019379] x21: ffff800030b5fc00 x20: 0000000000000000
      [   18.024675] x19: ffff80003082bf00 x18: 0000000000000000
      [   18.029970] x17: 0000ffffb3347e70 x16: ffff000008207638
      [   18.035265] x15: 0000000000000053 x14: 0000000000000000
      [   18.040560] x13: 0000000000000038 x12: 0101010101010101
      [   18.045855] x11: 7f7f7f7f7f7f7f7f x10: 0000000000000040
      [   18.051150] x9 : ffff800030b5f038 x8 : ffff800031657b50
      [   18.056446] x7 : ffff800031657b78 x6 : 0000000000000000
      [   18.061740] x5 : 0000000000000000 x4 : 00000000b5c01000
      [   18.067036] x3 : 0000000000000000 x2 : ffff8000337bf300
      [   18.072330] x1 : ffff80003082bf00 x0 : 0000000000000000
      [   18.077629] Process Xorg (pid: 1684, stack limit = 0xffff800033fbc000)
      [   18.082925] Stack: (0xffff800033fbfb30 to 0xffff800033fc0000)
      [   18.089262] fb20:                                   ffff800033fbfb60 ffff000000ac07c8
      [   18.095081] fb40: ffff80003082bf00 ffff800030b5fc90 ffff800030b5fc00 ffff000000abf4a0
      [   18.102893] fb60: ffff800033fbfba0 ffff000000ac16b0 ffff800030b5fc00 ffff8000338ff870
      [   18.110706] fb80: ffff8000338ff800 ffff800030b5fc00 ffff800030b5fda8 ffff800033fbfd80
      [   18.118518] fba0: ffff800033fbfbe0 ffff0000009d4244 ffff800030b5fc00 ffff800030b5f038
      [   18.126332] fbc0: ffff800033fbfbd0 ffff800030b5fc00 ffff800030b5f038 ffff0000009d4840
      [   18.134144] fbe0: ffff800033fbfbf0 ffff0000009d4858 ffff800033fbfc10 ffff0000009d48e4
      [   18.141955] fc00: ffff800030b5fc00 ffff8000338ffd98 ffff800033fbfc30 ffff0000009d49a4
      [   18.149768] fc20: ffff800030b5fc00 ffff800030b5f000 ffff800033fbfc60 ffff0000009d4a4c
      [   18.157581] fc40: ffff800030b5f050 ffff800030b5f000 0000000000000001 ffff800030b5fc00
      [   18.165394] fc60: ffff800033fbfca0 ffff0000009d4ab0 0000000000000018 ffff800030b5f000
      [   18.173206] fc80: ffff0000009efd28 ffff800033fbfd80 ffff8000338ff800 ffff0000009d56a8
      [   18.181019] fca0: ffff800033fbfcb0 ffff0000009efd54 ffff800033fbfcc0 ffff0000009d56c8
      [   18.188831] fcc0: ffff800033fbfd00 ffff0000009d58e0 ffff0000009fa6e0 00000000c00464b4
      [   18.196643] fce0: 0000000000000004 ffff80003082b400 0000ffffea1f0e00 0000000000000000
      [   18.204456] fd00: ffff800033fbfe00 ffff000008206f0c ffff80000335caf8 ffff80003082b400
      [   18.212269] fd20: 0000ffffea1f0e00 ffff80003082b400 00000000c00464b4 0000ffffea1f0e00
      [   18.220081] fd40: 0000000000000124 000000000000001d ffff0000089d2000 ffff800031236c00
      [   18.227894] fd60: ffff800033fbfd80 0000000000000004 ffff0000009efd28 ffff800033fbfd80
      [   18.235706] fd80: 0000000100000001 0000008000000001 0000001800000020 0000000000000001
      [   18.243518] fda0: 0000000100000000 0000000100000001 0000ffff00000000 0000ffff00000000
      [   18.251331] fdc0: 0000000000000124 0000000000000038 ffff0000089d2000 ffff800031236c00
      [   18.259144] fde0: ffff800033fbfe40 ffff000008214124 ffff800033fbfe30 ffff000008203290
      [   18.266956] fe00: ffff800033fbfe80 ffff0000082076b4 0000000000000000 ffff800030d8a000
      [   18.274768] fe20: ffff80003082b400 0000000000000016 ffff800033fbfe50 ffff0000081f0488
      [   18.282581] fe40: ffff800033fbfe80 ffff000008207678 0000000000000000 ffff80003082b400
      [   18.290393] fe60: ffff800033fbfe70 ffff0000082138b0 ffff800033fbfe80 ffff000008207658
      [   18.298207] fe80: 0000000000000000 ffff000008082f84 0000000000000000 0000800034a16000
      [   18.306017] fea0: ffffffffffffffff 0000ffffb3347e7c 0000000000000000 0000000000000015
      [   18.313832] fec0: 0000000000000016 00000000c00464b4 0000ffffea1f0e00 0000000000000001
      [   18.321643] fee0: 0000000000000020 0000000000000080 0000000000000001 0000000000000000
      [   18.329456] ff00: 000000000000001d 000000012692c5b0 0101010101010101 7f7f7f7f7f7f7f7f
      [   18.337269] ff20: 0101010101010101 0000000000000038 0000000000000000 0000000000000053
      [   18.345082] ff40: 0000ffffb368b2b8 0000ffffb3347e70 0000000000000000 0000ffffb3847000
      [   18.352894] ff60: 0000ffffea1f0e00 00000000c00464b4 0000000000000016 0000ffffea1f0edc
      [   18.360705] ff80: 000000012692ad20 0000000000000003 00000001214282e4 0000000121428388
      [   18.368518] ffa0: 0000000000000000 0000ffffea1f0da0 0000ffffb367185c 0000ffffea1f0da0
      [   18.376332] ffc0: 0000ffffb3347e7c 0000000000000000 0000000000000016 000000000000001d
      [   18.384142] ffe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [   18.391953] Call trace:
      [   18.399760] Exception stack(0xffff800033fbf950 to 0xffff800033fbfa80)
      [   18.402023] f940:                                   ffff80003082bf00 0001000000000000
      [   18.408622] f960: ffff800033fbfb30 ffff000000ac2d58 0000000020000145 ffff8000338ffa78
      [   18.416435] f980: 0000000000000000 0000000000000000 ffff800033fbf9e0 ffff0000089afcf0
      [   18.424248] f9a0: ffff80000348f230 ffff8000338ffa78 0000000000000000 0000000000000000
      [   18.432060] f9c0: ffff8000338ffaa8 0000000000000001 ffff800033fbfb80 ffff0000009e8f38
      [   18.439872] f9e0: ffff800033fbfa10 ffff0000089a9ff8 0000000000000027 ffff80003082b918
      [   18.447684] fa00: 0000000000000000 ffff80003082bf00 ffff8000337bf300 0000000000000000
      [   18.455497] fa20: 00000000b5c01000 0000000000000000 0000000000000000 ffff800031657b78
      [   18.463310] fa40: ffff800031657b50 ffff800030b5f038 0000000000000040 7f7f7f7f7f7f7f7f
      [   18.471122] fa60: 0101010101010101 0000000000000038 0000000000000000 0000000000000053
      [   18.479062] [<ffff000000ac2d58>] msm_gem_unmap_vma+0x20/0x80 [msm]
      [   18.486862] [<ffff000000ac07c8>] put_iova+0x60/0xb8 [msm]
      [   18.492938] [<ffff000000ac16b0>] msm_gem_free_object+0x60/0x198 [msm]
      [   18.498432] [<ffff0000009d4244>] drm_gem_object_free+0x1c/0x58 [drm]
      [   18.504854] [<ffff0000009d4858>] drm_gem_object_put_unlocked+0x90/0xa0 [drm]
      [   18.511273] [<ffff0000009d48e4>] drm_gem_object_handle_put_unlocked+0x64/0xd0 [drm]
      [   18.518300] [<ffff0000009d49a4>] drm_gem_object_release_handle+0x54/0x98 [drm]
      [   18.525679] [<ffff0000009d4a4c>] drm_gem_handle_delete+0x64/0xb8 [drm]
      [   18.532968] [<ffff0000009d4ab0>] drm_gem_dumb_destroy+0x10/0x18 [drm]
      [   18.539479] [<ffff0000009efd54>] drm_mode_destroy_dumb_ioctl+0x2c/0x40 [drm]
      [   18.545992] [<ffff0000009d56c8>] drm_ioctl_kernel+0x68/0xe0 [drm]
      [   18.553105] [<ffff0000009d58e0>] drm_ioctl+0x178/0x3b0 [drm]
      [   18.558970] [<ffff000008206f0c>] do_vfs_ioctl+0xa4/0x7d0
      [   18.564694] [<ffff0000082076b4>] SyS_ioctl+0x7c/0x98
      [   18.569992] [<ffff000008082f84>] el0_svc_naked+0x38/0x3c
      [   18.574941] Code: a90153f3 aa0003f4 f90013f5 aa0103f3 (f9407400)
      [   18.580502] ---[ end trace b1ac6888ec40b0be ]---
      
      It turns out that the aspace argument in msm_gem_unmap_vma() is NULL.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      [Note: this case gets hit with !IOMMU config]
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      79687057
    • Hans Verkuil's avatar
      drm/msm: fix WARN_ON in add_vma() with no iommu · b3949a9a
      Hans Verkuil authored
      While I was testing the upcoming adv7533 CEC support with my Dragonboard c410
      I encountered this warning several times during boot:
      
      [    4.408309] WARNING: CPU: 3 PID: 1347 at drivers/gpu/drm/msm/msm_gem.c:312 add_vma+0x78/0x88 [msm]
      [    4.412951] Modules linked in: snd_soc_hdmi_codec adv7511 cec qcom_wcnss_pil msm mdt_loader drm_kms_helper msm_rng rng_core drm
      [    4.421728] CPU: 3 PID: 1347 Comm: kworker/3:3 Not tainted 4.13.0-rc1-dragonboard #111
      [    4.433090] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
      [    4.441081] Workqueue: events deferred_probe_work_func
      [    4.447929] task: ffff800031243600 task.stack: ffff800003394000
      [    4.453023] PC is at add_vma+0x78/0x88 [msm]
      [    4.458823] LR is at _msm_gem_new+0xd4/0x188 [msm]
      [    4.463207] pc : [<ffff000000ac01f8>] lr : [<ffff000000ac06b4>] pstate: 40000145
      [    4.467811] sp : ffff8000033978a0
      [    4.475357] x29: ffff8000033978a0 x28: ffff8000031dea18
      [    4.478572] x27: ffff800003933a00 x26: ffff800003b39800
      [    4.483953] x25: ffff8000338ff800 x24: 0000000000000001
      [    4.489249] x23: 0000000000000000 x22: ffff800003b39800
      [    4.494544] x21: ffff8000338ff800 x20: 0000000000000000
      [    4.499839] x19: ffff800003932600 x18: 0000000000000001
      [    4.505135] x17: 0000ffff8969e9e0 x16: ffff7e00000ce7a0
      [    4.510429] x15: ffffffffffffffff x14: ffff8000833977ef
      [    4.515724] x13: ffff8000033977f3 x12: 0000000000000038
      [    4.521020] x11: 0101010101010101 x10: ffffff7f7fff7f7f
      [    4.526315] x9 : 0000000000000000 x8 : ffff800003932800
      [    4.531633] x7 : 0000000000000000 x6 : 000000000000003f
      [    4.531644] x5 : 0000000000000040 x4 : 0000000000000000
      [    4.531650] x3 : ffff800031243600 x2 : 0000000000000000
      [    4.531655] x1 : 0000000000000000 x0 : 0000000000000000
      [    4.531670] Call trace:
      [    4.531676] Exception stack(0xffff8000033976c0 to 0xffff8000033977f0)
      [    4.531683] 76c0: ffff800003932600 0001000000000000 ffff8000033978a0 ffff000000ac01f8
      [    4.531688] 76e0: 0000000000000140 0000000000000000 ffff800003932550 ffff800003397780
      [    4.531694] 7700: ffff800003397730 ffff000008261ce8 0000000000000000 ffff8000031d2f80
      [    4.531699] 7720: ffff800003397800 ffff0000081d671c 0000000000000140 0000000000000000
      [    4.531705] 7740: ffff000000ac04c0 0000000000004003 ffff800003397908 00000000014080c0
      [    4.531710] 7760: 0000000000000000 ffff800003b39800 0000000000000000 0000000000000000
      [    4.531716] 7780: 0000000000000000 ffff800031243600 0000000000000000 0000000000000040
      [    4.531721] 77a0: 000000000000003f 0000000000000000 ffff800003932800 0000000000000000
      [    4.531726] 77c0: ffffff7f7fff7f7f 0101010101010101 0000000000000038 ffff8000033977f3
      [    4.531730] 77e0: ffff8000833977ef ffffffffffffffff
      [    4.531881] [<ffff000000ac01f8>] add_vma+0x78/0x88 [msm]
      [    4.532011] [<ffff000000ac06b4>] _msm_gem_new+0xd4/0x188 [msm]
      [    4.532134] [<ffff000000ac1900>] msm_gem_new+0x10/0x18 [msm]
      [    4.532260] [<ffff000000acb274>] msm_dsi_host_modeset_init+0x17c/0x268 [msm]
      [    4.532384] [<ffff000000ac9024>] msm_dsi_modeset_init+0x34/0x1b8 [msm]
      [    4.532504] [<ffff000000ab6168>] modeset_init+0x408/0x488 [msm]
      [    4.532623] [<ffff000000ab6c4c>] mdp5_kms_init+0x2b4/0x338 [msm]
      [    4.532745] [<ffff000000abeff8>] msm_drm_bind+0x218/0x4e8 [msm]
      [    4.532755] [<ffff00000855d744>] try_to_bring_up_master+0x1f4/0x318
      [    4.532762] [<ffff00000855d900>] component_add+0x98/0x180
      [    4.532887] [<ffff000000ac8da0>] dsi_dev_probe+0x18/0x28 [msm]
      [    4.532895] [<ffff000008565fe8>] platform_drv_probe+0x58/0xc0
      [    4.532901] [<ffff00000856410c>] driver_probe_device+0x324/0x458
      [    4.532907] [<ffff00000856440c>] __device_attach_driver+0xac/0x170
      [    4.532913] [<ffff000008561ef4>] bus_for_each_drv+0x4c/0x98
      [    4.532918] [<ffff000008563c38>] __device_attach+0xc0/0x160
      [    4.532924] [<ffff000008564530>] device_initial_probe+0x10/0x18
      [    4.532929] [<ffff000008562f84>] bus_probe_device+0x94/0xa0
      [    4.532934] [<ffff0000085635d4>] deferred_probe_work_func+0x8c/0xe8
      [    4.532941] [<ffff0000080d79bc>] process_one_work+0x1d4/0x330
      [    4.532946] [<ffff0000080d7b60>] worker_thread+0x48/0x468
      [    4.532952] [<ffff0000080ddae4>] kthread+0x12c/0x130
      [    4.532958] [<ffff000008082f10>] ret_from_fork+0x10/0x40
      [    4.532962] ---[ end trace b1ac6888ec40b0bb ]---
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      b3949a9a
    • Archit Taneja's avatar
      drm/msm/dsi: Calculate link clock rates with updated dsi->lanes · d4cea38e
      Archit Taneja authored
      After the commit mentioned below, we start computing the byte and pixel
      clocks (dsi_calc_clk_rate) in the DSI bridge's mode_set() op. The
      calculation involves the number of DSI lanes being used by the
      downstream bridge/panel.
      
      If the downstream bridge/panel tries to change the number of DSI lanes
      (as done in the ADV7533 driver) in its mode_set() op, then our DSI
      host driver will not have the correct number of lanes when computing
      byte/pixel clocks.
      
      Fix this by delaying the clock rate calculation in the DSI bridge
      enable path. In particular, compute the clock rates in
      msm_dsi_host_get_phy_clk_req().
      
      This fixes the DSI host error interrupts seen when we try to switch
      between modes that require different number of lanes (4 to 3 lanes, or
      vice versa) on db410c. The error interrupts occur since the byte/pixel
      clock rates aren't according to what the DSI video mode timing engine
      expects.
      
      Fixes: b62aa70a ("drm/msm/dsi: Move PHY operations out of host")
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      d4cea38e
    • Rob Clark's avatar
      drm/msm/mdp5: fix unclocked register access in _cursor_set() · af1f5f12
      Rob Clark authored
      Fixes an insta-reboot when screen-blanking kicks in, due to cursor
      updates without clocks enabled.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      af1f5f12
    • Dan Carpenter's avatar
      drm/msm: unlock on error in msm_gem_get_iova() · 71e3dfa1
      Dan Carpenter authored
      We recently added locking to this function but there was a direct return
      that was overlooked where we need to unlock.
      
      Fixes: 0e08270a ("drm/msm: Separate locking of buffer resources from struct_mutex")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      71e3dfa1
    • Dan Carpenter's avatar
      drm/msm: fix an integer overflow test · 65e93108
      Dan Carpenter authored
      We recently added an integer overflow check but it needs an additional
      tweak to work properly on 32 bit systems.
      
      The problem is that we're doing the right hand side of the assignment as
      type unsigned long so the max it will have an integer overflow instead
      of being larger than SIZE_MAX.  That means the "sz > SIZE_MAX" condition
      is never true even on 32 bit systems.  We need to first cast it to u64
      and then do the math.
      
      Fixes: 4a630fad ("drm/msm: Fix potential buffer overflow issue")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      65e93108
    • Viresh Kumar's avatar
      drm/msm/mdp5: Fix compilation warnings · d490c9cd
      Viresh Kumar authored
      Following compilation warnings were observed for these files:
      
        CC [M]  drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.o
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c: In function 'blend_setup':
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:223:7: warning: missing braces around initializer [-Wmissing-braces]
        enum mdp5_pipe stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { SSPP_NONE };
             ^
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:223:7: warning: (near initialization for 'stage[0]') [-Wmissing-braces]
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:224:7: warning: missing braces around initializer [-Wmissing-braces]
        enum mdp5_pipe r_stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { SSPP_NONE };
             ^
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c:224:7: warning: (near initialization for 'r_stage[0]') [-Wmissing-braces]
      
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c: In function 'mdp5_plane_mode_set':
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:892:9: warning: missing braces around initializer [-Wmissing-braces]
        struct phase_step step = { 0 };
               ^
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:892:9: warning: (near initialization for 'step.x') [-Wmissing-braces]
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:893:9: warning: missing braces around initializer [-Wmissing-braces]
        struct pixel_ext pe = { 0 };
               ^
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c:893:9: warning: (near initialization for 'pe.left') [-Wmissing-braces]
      
      This happens because in the first case we were initializing a two
      dimensional array with {0} and in the second case we were initializing a
      struct containing two arrays with {0}.
      
      Fix them by adding another pair of {}.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      d490c9cd
  2. 30 Jul, 2017 5 commits
  3. 29 Jul, 2017 1 commit
  4. 28 Jul, 2017 20 commits
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs · 286ba844
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
       "More NFS client bugfixes for 4.13.
      
        Most of these fix locking bugs that Ben and Neil noticed, but I also
        have a patch to fix one more access bug that was reported after last
        week.
      
        Stable fixes:
         - Fix a race where CB_NOTIFY_LOCK fails to wake a waiter
         - Invalidate file size when taking a lock to prevent corruption
      
        Other fixes:
         - Don't excessively generate tiny writes with fallocate
         - Use the raw NFS access mask in nfs4_opendata_access()"
      
      * tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter
        NFS: Optimize fallocate by refreshing mapping when needed.
        NFS: invalidate file size when taking a lock.
        NFS: Use raw NFS access mask in nfs4_opendata_access()
      286ba844
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 19993e73
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
      
       - fix firstfsb variables that we left uninitialized, which could lead
         to locking problems.
      
       - check for NULL metadata buffer pointers before using them.
      
       - don't allow btree cursor manipulation if the btree block is corrupt.
         Better to just shut down.
      
       - fix infinite loop problems in quotacheck.
      
       - fix buffer overrun when validating directory blocks.
      
       - fix deadlock problem in bunmapi.
      
      * tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix multi-AG deadlock in xfs_bunmapi
        xfs: check that dir block entries don't off the end of the buffer
        xfs: fix quotacheck dquot id overflow infinite loop
        xfs: check _alloc_read_agf buffer pointer before using
        xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write
        xfs: check _btree_check_block value
      19993e73
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 81554693
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "s390:
         - SRCU fix
      
        PPC:
         - host crash fixes
      
        x86:
         - bugfixes, including making nested posted interrupts really work
      
        Generic:
         - tweaks to kvm_stat and to uevents"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: LAPIC: Fix reentrancy issues with preempt notifiers
        tools/kvm_stat: add '-f help' to get the available event list
        tools/kvm_stat: use variables instead of hard paths in help output
        KVM: nVMX: Fix loss of L2's NMI blocking state
        KVM: nVMX: Fix posted intr delivery when vcpu is in guest mode
        x86: irq: Define a global vector for nested posted interrupts
        KVM: x86: do mask out upper bits of PAE CR3
        KVM: make pid available for uevents without debugfs
        KVM: s390: take srcu lock when getting/setting storage keys
        KVM: VMX: remove unused field
        KVM: PPC: Book3S HV: Fix host crash on changing HPT size
        KVM: PPC: Book3S HV: Enable TM before accessing TM registers
      81554693
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 8562e89e
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Three minor cleanups for xen related drivers"
      
      * tag 'for-linus-4.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: dont fiddle with event channel masking in suspend/resume
        xen: selfballoon: remove unnecessary static in frontswap_selfshrink()
        xen: Drop un-informative message during boot
      8562e89e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 3d9d7405
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "I'd been collecting these whilst we debugged a CPU hotplug failure,
        but we ended up diagnosing that one to tglx, who has taken a fix via
        the -tip tree separately.
      
        We're seeing some NFS issues that we haven't gotten to the bottom of
        yet, and we've uncovered some issues with our backtracing too so there
        might be another fixes pull before we're done.
      
        Summary:
      
         - Ensure we have a guard page after the kernel image in vmalloc
      
         - Fix incorrect prefetch stride in copy_page
      
         - Ensure irqs are disabled in die()
      
         - Fix for event group validation in QCOM L2 PMU driver
      
         - Fix requesting of PMU IRQs on AMD Seattle
      
         - Minor cleanups and fixes"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: mmu: Place guard page after mapping of kernel image
        drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU
        arm64: sysreg: Fix unprotected macro argmuent in write_sysreg
        perf: qcom_l2: fix column exclusion check
        arm64/lib: copy_page: use consistent prefetch stride
        arm64/numa: Drop duplicate message
        perf: Convert to using %pOF instead of full_name
        arm64: Convert to using %pOF instead of full_name
        arm64: traps: disable irq in die()
        arm64: atomics: Remove '&' from '+&' asm constraint in lse atomics
        arm64: uaccess: Remove redundant __force from addr cast in __range_ok
      3d9d7405
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 080012ba
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "The highlight is Ben's patch to work around a host killing bug when
        running KVM guests with the Radix MMU on Power9. See the long change
        log of that commit for more detail.
      
        And then three fairly minor fixes:
      
         - fix of_node_put() underflow during reconfig remove, using old DLPAR
           tools.
      
         - fix recently introduced ld version check with 64-bit LE-only
           toolchain.
      
         - free the subpage_prot_table correctly, avoiding a memory leak.
      
        Thanks to: Aneesh Kumar K.V, Benjamin Herrenschmidt, Laurent Vivier"
      
      * tag 'powerpc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm/hash: Free the subpage_prot_table correctly
        powerpc/Makefile: Fix ld version check with 64-bit LE-only toolchain
        powerpc/pseries: Fix of_node_put() underflow during reconfig remove
        powerpc/mm/radix: Workaround prefetch issue with KVM
      080012ba
    • Benjamin Coddington's avatar
      NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter · b7dbcc0e
      Benjamin Coddington authored
      nfs4_retry_setlk() sets the task's state to TASK_INTERRUPTIBLE within the
      same region protected by the wait_queue's lock after checking for a
      notification from CB_NOTIFY_LOCK callback.  However, after releasing that
      lock, a wakeup for that task may race in before the call to
      freezable_schedule_timeout_interruptible() and set TASK_WAKING, then
      freezable_schedule_timeout_interruptible() will set the state back to
      TASK_INTERRUPTIBLE before the task will sleep.  The result is that the task
      will sleep for the entire duration of the timeout.
      
      Since we've already set TASK_INTERRUPTIBLE in the locked section, just use
      freezable_schedule_timout() instead.
      
      Fixes: a1d617d8 ("nfs: allow blocking locks to be awoken by lock callbacks")
      Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Cc: stable@vger.kernel.org # v4.9+
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      b7dbcc0e
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · e26f1bea
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - remove broken dt bindings in inside-secure
      
       - fix authencesn crash when used with digest_null
      
       - fix cavium/nitrox firmware path
      
       - fix SHA3 failure in brcm
      
       - fix Kconfig dependency for brcm
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: authencesn - Fix digest_null crash
        crypto: brcm - remove BCM_PDC_MBOX dependency in Kconfig
        Documentation/bindings: crypto: remove the dma-mask property
        crypto: inside-secure - do not parse the dma mask from dt
        crypto: cavium/nitrox - Change in firmware path.
        crypto: brcm - Fix SHA3-512 algorithm failure
      e26f1bea
    • Linus Torvalds's avatar
      Merge branch 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 0a2a1330
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Fixes addressing problems reported by users, and there's one more
        regression fix"
      
      * 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: round down size diff when shrinking/growing device
        Btrfs: fix early ENOSPC due to delalloc
        btrfs: fix lockup in find_free_extent with read-only block groups
        Btrfs: fix dir item validation when replaying xattr deletes
      0a2a1330
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 9583f1c9
      Linus Torvalds authored
      Pull MD fixes from Shaohua Li:
       "This fixes several bugs, three of them are marked for stable:
      
         - an initialization issue fixed by Ming
      
         - a bio clone race issue fixed by me
      
         - an async tx flush issue fixed by Ofer
      
         - other cleanups"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
        MD: fix warnning for UP case
        md/raid5: add thread_group worker async_tx_issue_pending_all
        md: simplify code with bio_io_error
        md/raid1: fix writebehind bio clone
        md: raid1-10: move raid1/raid10 common code into raid1-10.c
        md: raid1/raid10: initialize bvec table via bio_add_page()
        md: remove 'idx' from 'struct resync_pages'
      9583f1c9
    • Linus Torvalds's avatar
      Merge tag 'for-4.13/dm-fixes' of... · 1731a474
      Linus Torvalds authored
      Merge tag 'for-4.13/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - a few DM integrity fixes that improve performance. One that address
         inefficiencies in the on-disk journal device layout. Another that
         makes use of the block layer's on-stack plugging when writing the
         journal.
      
       - a dm-bufio fix for the blk_status_t conversion that went in during
         the merge window.
      
       - a few DM raid fixes that address correctness when suspending the
         device and a validation fix for validation that occurs during device
         activation.
      
       - a couple DM zoned target fixes. Important one being the fix to not
         use GFP_KERNEL in the IO path due to concerns about deadlock in
         low-memory conditions (e.g. swap over a DM zoned device, etc).
      
       - a DM DAX device fix to make sure dm_dax_flush() is called if the
         underlying DAX device is operating as a write cache.
      
      * tag 'for-4.13/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm, dax: Make sure dm_dax_flush() is called if device supports it
        dm verity fec: fix GFP flags used with mempool_alloc()
        dm zoned: use GFP_NOIO in I/O path
        dm zoned: remove test for impossible REQ_OP_FLUSH conditions
        dm raid: bump target version
        dm raid: avoid mddev->suspended access
        dm raid: fix activation check in validate_raid_redundancy()
        dm raid: remove WARN_ON() in raid10_md_layout_to_format()
        dm bufio: fix error code in dm_bufio_write_dirty_buffers()
        dm integrity: test for corrupted disk format during table load
        dm integrity: WARN_ON if variables representing journal usage get out of sync
        dm integrity: use plugging when writing the journal
        dm integrity: fix inefficient allocation of journal space
      1731a474
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 0fa8dc42
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A small collection of fixes that should go into this series. This
        contains:
      
         - NVMe pull request from Christoph, with various fixes for nvme
           proper and nvme-fc.
      
         - disable runtime PM for blk-mq for now.
      
           With scsi now defaulting to using blk-mq, this reared its head as
           an issue. Longer term we'll fix up runtime PM for blk-mq, for now
           just disable it to prevent a hang on laptop resume for some folks.
      
         - blk-mq CPU <-> hw queue map fix from Christoph.
      
         - xen/blkfront pull request from Konrad, with two small fixes for the
           blkfront driver.
      
         - a few fixups for nbd from Joseph.
      
         - a stable fix for pblk from Javier"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        lightnvm: pblk: advance bio according to lba index
        nvme: validate admin queue before unquiesce
        nbd: clear disconnected on reconnect
        nvme-pci: fix HMB size calculation
        nvme-fc: revise TRADDR parsing
        nvme-fc: address target disconnect race conditions in fcp io submit
        nvme: fabrics commands should use the fctype field for data direction
        nvme: also provide a UUID in the WWID sysfs attribute
        xen/blkfront: always allocate grants first from per-queue persistent grants
        xen-blkfront: fix mq start/stop race
        blk-mq: map queues to all present CPUs
        block: disable runtime-pm for blk-mq
        xen-blkfront: Fix handling of non-supported operations
        nbd: only set sndtimeo if we have a timeout set
        nbd: take tx_lock before disconnecting
        nbd: allow multiple disconnects to be sent
      0fa8dc42
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · a2d48756
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Here are a couple of mmc fixes intended for v4.13-rc1.
      
        I have also included a couple of cleanup patches in this pull request
        for OMAP2+, related to the omap_hsmmc driver. The reason is because of
        the changes are also depending on OMAP SoC specific code, so this
        simplifies how to deal with this.
      
        Summary:
      
        MMC host:
         - sunxi: Correct time phase settings
         - omap_hsmmc: Clean up some dead code
         - dw_mmc: Fix message printed for deprecated num-slots DT binding
         - dw_mmc: Fix DT documentation"
      
      * tag 'mmc-v4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        Documentation: dw-mshc: deprecate num-slots
        mmc: dw_mmc: fix the wrong condition check of getting num-slots from DT
        mmc: host: omap_hsmmc: remove unused platform callbacks
        ARM: OMAP2+: hsmmc.c: Remove dead code
        mmc: sunxi: Keep default timing phase settings for new timing mode
      a2d48756
    • Javier González's avatar
      lightnvm: pblk: advance bio according to lba index · 75cb8e93
      Javier González authored
      When a lba either hits the cache or corresponds to an empty entry in the
      L2P table, we need to advance the bio according to the position in which
      the lba is located. Otherwise, we will copy data in the wrong page, thus
      causing data corruption for the application.
      
      In case of a cache hit, we assumed that bio->bi_iter.bi_idx would
      contain the correct index, but this is no necessarily true. Instead, use
      the local bio advance counter and iterator. This guarantees that lbas
      hitting the cache are copied into the right bv_page.
      
      In case of an empty L2P entry, we omitted to advance the bio. In the
      cases when the same I/O also contains a cache hit, data corresponding
      to this lba will be copied to the wrong bv_page. Fix this by advancing
      the bio as we do in the case of a cache hit.
      
      Fixes: a4bd217b lightnvm: physical block device (pblk) target
      Signed-off-by: default avatarJavier González <javier@javigon.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      75cb8e93
    • Will Deacon's avatar
      arm64: mmu: Place guard page after mapping of kernel image · 92bbd16e
      Will Deacon authored
      The vast majority of virtual allocations in the vmalloc region are followed
      by a guard page, which can help to avoid overruning on vma into another,
      which may map a read-sensitive device.
      
      This patch adds a guard page to the end of the kernel image mapping (i.e.
      following the data/bss segments).
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      92bbd16e
    • Matthias Kaehlcke's avatar
      x86/boot: Disable the address-of-packed-member compiler warning · 20c6c189
      Matthias Kaehlcke authored
      The clang warning 'address-of-packed-member' is disabled for the general
      kernel code, also disable it for the x86 boot code.
      
      This suppresses a bunch of warnings like this when building with clang:
      
      ./arch/x86/include/asm/processor.h:535:30: warning: taking address of
        packed member 'sp0' of class or structure 'x86_hw_tss' may result in an
        unaligned pointer value [-Waddress-of-packed-member]
          return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
                                      ^~~~~~~~~~~~~~~~~~~
      ./arch/x86/include/asm/percpu.h:391:59: note: expanded from macro
        'this_cpu_read_stable'
          #define this_cpu_read_stable(var)       percpu_stable_op("mov", var)
                                                                          ^~~
      ./arch/x86/include/asm/percpu.h:228:16: note: expanded from macro
        'percpu_stable_op'
          : "p" (&(var)));
                   ^~~
      Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Cc: Doug Anderson <dianders@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20170725215053.135586-1-mka@chromium.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      20c6c189
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.13-rc3' of git://people.freedesktop.org/~airlied/linux · 0b5477d9
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "These iare the fixes for 4.13-rc3: vmwgfx, exynos, i915, amdgpu,
        nouveau, host1x and displayport fixes.
      
        As expected people woke up this week, i915 didn't do an -rc2 pull so
        got a bumper -rc3 pull, and Ben resurfaced on nouveau and fixed a
        bunch of major crashers seen on Fedora 26, and there are a few vmwgfx
        fixes as well.
      
        Otherwise exynos had some regression fixes/cleanups, and amdgpu has an
        rcu locking regression fix and a couple of minor fixes"
      
      * tag 'drm-fixes-for-v4.13-rc3' of git://people.freedesktop.org/~airlied/linux: (44 commits)
        drm/i915: Fix bad comparison in skl_compute_plane_wm.
        drm/i915: Force CPU synchronisation even if userspace requests ASYNC
        drm/i915: Only skip updating execobject.offset after error
        drm/i915: Only mark the execobject as pinned on success
        drm/i915: Remove assertion from raw __i915_vma_unpin()
        drm/i915/cnl: Fix loadgen select programming on ddi vswing sequence
        drm/i915: Fix scaler init during CRTC HW state readout
        drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
        drm/i915: Unbreak gpu reset vs. modeset locking
        gpu: host1x: Free the IOMMU domain when there is no device to attach
        drm/i915: Fix cursor updates on some platforms
        drm/i915: Fix user ptr check size in eb_relocate_vma()
        drm: exynos: mark pm functions as __maybe_unused
        drm/exynos: select CEC_CORE if CEC_NOTIFIER
        drm/exynos/hdmi: fix disable sequence
        drm/exynos: mic: add a bridge at probe
        drm/exynos/dsi: Remove error handling for bridge_node DT parsing
        drm/exynos: dsi: do not try to find bridge
        drm: exynos: hdmi: make of_device_ids const.
        drm: exynos: constify mixer_match_types and *_mxr_drv_data.
        ...
      0b5477d9
    • Dave Airlie's avatar
      Merge tag 'exynos-drm-fixes-for-v4.13-rc3' of... · 20806588
      Dave Airlie authored
      Merge tag 'exynos-drm-fixes-for-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      Summary:
      - fix probing fail issue of dsi driver without bridge device.
      - fix disable sequence of hdmi driver.
      - trivial cleanups.
      
      * tag 'exynos-drm-fixes-for-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm: exynos: mark pm functions as __maybe_unused
        drm/exynos: select CEC_CORE if CEC_NOTIFIER
        drm/exynos/hdmi: fix disable sequence
        drm/exynos: mic: add a bridge at probe
        drm/exynos/dsi: Remove error handling for bridge_node DT parsing
        drm/exynos: dsi: do not try to find bridge
        drm: exynos: hdmi: make of_device_ids const.
        drm: exynos: constify mixer_match_types and *_mxr_drv_data.
        exynos_drm: Clean up duplicated assignment in exynos_drm_driver
      20806588
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2017-07-27' of... · d5bcd111
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
      
      i915 fixes for -rc3
      
      Bit more than usual since we missed -rc2. 4x cc: stable, 2 gvt
      patches, but all fairly minor stuff. Last minute rebase was to add a
      few missing cc: stable, I did prep the pull this morning already and
      made sure CI approves.
      
      * tag 'drm-intel-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-intel:
        drm/i915: Fix bad comparison in skl_compute_plane_wm.
        drm/i915: Force CPU synchronisation even if userspace requests ASYNC
        drm/i915: Only skip updating execobject.offset after error
        drm/i915: Only mark the execobject as pinned on success
        drm/i915: Remove assertion from raw __i915_vma_unpin()
        drm/i915/cnl: Fix loadgen select programming on ddi vswing sequence
        drm/i915: Fix scaler init during CRTC HW state readout
        drm/i915/selftests: Fix an error handling path in 'mock_gem_device()'
        drm/i915: Unbreak gpu reset vs. modeset locking
        drm/i915: Fix cursor updates on some platforms
        drm/i915: Fix user ptr check size in eb_relocate_vma()
        drm/i915/gvt: Extend KBL platform support in GVT-g
        drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
      d5bcd111
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes · 2213b666
      Dave Airlie authored
      Core Changes:
      - dp: A few fixes in drm_dp_downstream_debug() (Chris)
      - rockchip: sanitize the Kconfig dependencies (fallout from EXTCON) (Arnd)
      - host1x: Free the iommu domain when attach_device fails (Paul)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      
      * tag 'drm-misc-fixes-2017-07-27' of git://anongit.freedesktop.org/git/drm-misc:
        gpu: host1x: Free the IOMMU domain when there is no device to attach
        drm/rockchip: fix Kconfig dependencies
        drm/dp: Don't trust drm_dp_downstream_id()
        drm/dp: Fix read pointer for drm_dp_downsteam_debug()
      2213b666
  5. 27 Jul, 2017 6 commits