1. 08 8月, 2017 15 次提交
  2. 06 8月, 2017 1 次提交
  3. 04 8月, 2017 1 次提交
  4. 03 8月, 2017 6 次提交
    • S
      mmc: block: bypass the queue even if usage is present for hotplug · 7c84b8b4
      Shawn Lin 提交于
      The commit 304419d8 ("mmc: core: Allocate per-request data using the
      block layer core") refactored mechanism of queue handling caused
      mmc_init_request() can be called just after mmc_cleanup_queue() caused null
      pointer dereference.
      
      Another commit bbdc74dc ("mmc: block: Prevent new req entering queue
      after its cleanup") tried to fix the problem. However it actually miss one
      corner case.
      
      We could still reproduce the issue mentioned with these steps:
      (1) insert a SD card and mount it
      (2) hotplug it, so it will leave md->usage still be counted
      (3) reboot the system which will sync data and umount the card
      
      [Unable to handle kernel NULL pointer dereference at virtual address
      00000000
      [user pgtable: 4k pages, 48-bit VAs, pgd = ffff80007bab3000
      [[0000000000000000] *pgd=000000007a828003, *pud=0000000078dce003,
      *pmd=000000007aab6003, *pte=0000000000000000
      [Internal error: Oops: 96000007 [#1] PREEMPT SMP
      [Modules linked in:
      [CPU: 3 PID: 3507 Comm: umount Tainted: G        W
      4.13.0-rc1-next-20170720-00012-g9d9bf45 #33
      [Hardware name: Firefly-RK3399 Board (DT)
      [task: ffff80007a1de200 task.stack: ffff80007a01c000
      [PC is at mmc_init_request+0x14/0xc4
      [LR is at alloc_request_size+0x4c/0x74
      [pc : [<ffff0000087d7150>] lr : [<ffff000008378fe0>] pstate: 600001c5
      [sp : ffff80007a01f8f0
      
      ....
      
      [[<ffff0000087d7150>] mmc_init_request+0x14/0xc4
      [[<ffff000008378fe0>] alloc_request_size+0x4c/0x74
      [[<ffff00000817ac28>] mempool_create_node+0xb8/0x17c
      [[<ffff00000837aadc>] blk_init_rl+0x9c/0x120
      [[<ffff000008396580>] blkg_alloc+0x110/0x234
      [[<ffff000008396ac8>] blkg_create+0x424/0x468
      [[<ffff00000839877c>] blkg_lookup_create+0xd8/0x14c
      [[<ffff0000083796bc>] generic_make_request_checks+0x368/0x3b0
      [[<ffff00000837b050>] generic_make_request+0x1c/0x240
      
      So mmc_blk_put wouldn't calling blk_cleanup_queue which actually the
      QUEUE_FLAG_DYING and QUEUE_FLAG_BYPASS should stay. Block core expect
      blk_queue_bypass_{start, end} internally to bypass/drain the queue before
      actually dying the queue, so it didn't expose API to set the queue bypass.
      I think we should set QUEUE_FLAG_BYPASS whenever queue is removed, although
      the md->usage is still counted, as no dispatch queue could be found then.
      
      Fixes: 304419d8 ("mmc: core: Allocate per-request data using the block layer core")
      Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      7c84b8b4
    • L
      mmc: sdhci-of-at91: force card detect value for non removable devices · 7a1e3f14
      Ludovic Desroches 提交于
      When the device is non removable, the card detect signal is often used
      for another purpose i.e. muxed to another SoC peripheral or used as a
      GPIO. It could lead to wrong behaviors depending the default value of
      this signal if not muxed to the SDHCI controller.
      
      Fixes: bb5f8ea4 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC")
      Signed-off-by: NLudovic Desroches <ludovic.desroches@microchip.com>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      7a1e3f14
    • A
      isdn/i4l: fix buffer overflow · 9f5af546
      Annie Cherkaev 提交于
      This fixes a potential buffer overflow in isdn_net.c caused by an
      unbounded strcpy.
      
      [ ISDN seems to be effectively unmaintained, and the I4L driver in
        particular is long deprecated, but in case somebody uses this..
          - Linus ]
      Signed-off-by: NJiten Thakkar <jitenmt@gmail.com>
      Signed-off-by: NAnnie Cherkaev <annie.cherk@gmail.com>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9f5af546
    • T
      clk: keystone: sci-clk: Fix sci_clk_get · f54d2cd3
      Tero Kristo 提交于
      Currently a bug in the sci_clk_get implementation causes it to always
      return a clock belonging to the last device in the static list of clock
      data. This is due to a bug in the init code that causes the array
      used by sci_clk_get to only be populated with the clocks for the last
      device, as each device overwrites the entire array with its own clocks.
      
      Fix this by calculating the actual number of clocks for the SoC, and
      allocating the whole array in one go. Also, we don't need the handle
      to the init data array anymore after doing this, instead we can
      just compare the dev_id / clk_id against the registered clocks and
      use binary search for speed.
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      Reported-by: NDave Gerlach <d-gerlach@ti.com>
      Fixes: b745c079 ("clk: keystone: Add sci-clk driver support")
      Cc: Nishanth Menon <nm@ti.com>
      Tested-by: NFranklin Cooper <fcooper@ti.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      f54d2cd3
    • F
      drm/amdgpu: Use list_del_init in amdgpu_mn_unregister · 68c9793d
      Felix Kuehling 提交于
      Otherwise bo->shadow_list (which is aliased by bo->mn_list) will not
      appear empty in amdgpu_ttm_bo_destroy and cause an oops when freeing
      former userptr BOs.
      Signed-off-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      68c9793d
    • J
      drm/amdgpu: Fix undue fallthroughs in golden registers initialization · 5694785c
      Jean Delvare 提交于
      As I was staring at the si_init_golden_registers code, I noticed that
      the Pitcairn initialization silently falls through the Cape Verde
      initialization, and the Oland initialization falls through the Hainan
      initialization. However there is no comment stating that this is
      intentional, and the radeon driver doesn't have any such fallthrough,
      so I suspect this is not supposed to happen.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: 62a37553 ("drm/amdgpu: add si implementation v10")
      Cc: Ken Wang <Qingqing.Wang@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Marek Olšák" <maraeo@gmail.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Flora Cui <Flora.Cui@amd.com>
      Reviewed-by: NMarek Olšák <marek.olsak@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      5694785c
  5. 02 8月, 2017 2 次提交
  6. 01 8月, 2017 14 次提交
  7. 31 7月, 2017 1 次提交
    • J
      libata: fix a couple of doc build warnings · 2f60e1ab
      Jonathan Corbet 提交于
      The kerneldoc comments for a couple of functions in drivers/ata/libata-eh.c
      had fallen behind the current implementation, resulting in these doc build
      warnings:
      
        ./drivers/ata/libata-eh.c:1449: warning: No description found for parameter 'link'
        ./drivers/ata/libata-eh.c:1449: warning: Excess function parameter 'ap' description in 'ata_eh_done'
        ./drivers/ata/libata-eh.c:1590: warning: No description found for parameter 'qc'
        ./drivers/ata/libata-eh.c:1590: warning: Excess function parameter 'dev' description in 'ata_eh_request_sense'
      
      Update the comments and make the warnings go away.
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      2f60e1ab