1. 08 8月, 2015 1 次提交
  2. 07 8月, 2015 2 次提交
  3. 06 8月, 2015 8 次提交
  4. 05 8月, 2015 5 次提交
  5. 04 8月, 2015 12 次提交
  6. 03 8月, 2015 12 次提交
    • K
      thermal: Drop owner assignment from platform_driver · 6b5e38dc
      Krzysztof Kozlowski 提交于
      platform_driver does not need to set an owner because
      platform_driver_register() will set it.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      6b5e38dc
    • A
      usb: udc: core: add device_del() call to error pathway · c93e64e9
      Alan Stern 提交于
      This patch fixes a bug in the error pathway of
      usb_add_gadget_udc_release() in udc-core.c.  If the udc registration
      fails, the gadget registration is not fully undone; there's a
      put_device(&gadget->dev) call but no device_del().
      
      CC: <stable@vger.kernel.org>
      Acked-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c93e64e9
    • A
      MIPS: SMP: Don't increment irq_count multiple times for call function IPIs · 4ace6139
      Alex Smith 提交于
      The majority of SMP platforms handle their IPIs through do_IRQ()
      which calls irq_{enter/exit}(). When a call function IPI is received,
      smp_call_function_interrupt() is called which also calls
      irq_{enter,exit}(), meaning irq_count is raised twice.
      
      When tick broadcasting is used (which is implemented via a call
      function IPI), this incorrectly causes all CPU idle time on the core
      receiving broadcast ticks to be accounted as time spent servicing
      IRQs, as account_process_tick() will account as such if irq_count is
      greater than 1. This results in 100% CPU usage being reported on a
      core which receives its ticks via broadcast.
      
      This patch removes the SMP smp_call_function_interrupt() wrapper which
      calls irq_{enter,exit}(). Platforms which handle their IPIs through
      do_IRQ() now call generic_smp_call_function_interrupt() directly to
      avoid incrementing irq_count a second time. Platforms which don't
      (loongson, sgi-ip27, sibyte) call generic_smp_call_function_interrupt()
      wrapped in irq_{enter,exit}().
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10770/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4ace6139
    • R
      CPUFREQ: Loongson2: Fix broken build due to incorrect include. · 9b2b6f7f
      Ralf Baechle 提交于
      71eeedcf (MIPS: Lemote 2F: Fix build caused
      by recent mass rename.) only fixed one instance of this issue in arch/mips
      but missed a 2nd one in drivers/cpufreq/loongson2_cpufreq.c.
      
      [ralf@linux-mips.org: dropped the one segment for the already fixed
      instance and changed the other avoiding an include <path.h> without a /
      because that's generally is a bad idea.]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10659/
      9b2b6f7f
    • N
      md/raid5: don't let shrink_slab shrink too far. · 49895bcc
      NeilBrown 提交于
      I have a report of drop_one_stripe() called from
      raid5_cache_scan() apparently finding ->max_nr_stripes == 0.
      
      This should not be allowed.
      
      So add a test to keep max_nr_stripes above min_nr_stripes.
      
      Also use a 'mask' rather than a 'mod' in drop_one_stripe
      to ensure 'hash' is valid even if max_nr_stripes does reach zero.
      
      
      Fixes: edbe83ab ("md/raid5: allow the stripe_cache to grow and shrink.")
      Cc: stable@vger.kernel.org (4.1 - please release with 2d5b569b)
      Reported-by: NTomas Papan <tomas.papan@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      49895bcc
    • B
      md: use kzalloc() when bitmap is disabled · b6878d9e
      Benjamin Randazzo 提交于
      In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
      mdu_bitmap_file_t called "file".
      
      5769         file = kmalloc(sizeof(*file), GFP_NOIO);
      5770         if (!file)
      5771                 return -ENOMEM;
      
      This structure is copied to user space at the end of the function.
      
      5786         if (err == 0 &&
      5787             copy_to_user(arg, file, sizeof(*file)))
      5788                 err = -EFAULT
      
      But if bitmap is disabled only the first byte of "file" is initialized
      with zero, so it's possible to read some bytes (up to 4095) of kernel
      space memory from user space. This is an information leak.
      
      5775         /* bitmap disabled, zero the first byte and copy out */
      5776         if (!mddev->bitmap_info.file)
      5777                 file->pathname[0] = '\0';
      Signed-off-by: NBenjamin Randazzo <benjamin@randazzo.fr>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      b6878d9e
    • C
      thermal: exynos: Remove unused code related to platform_data on probe() · 3c19d237
      Chanwoo Choi 提交于
      This patch removes the unused code related to struct exynos_tmu_platform_data
      because exynos_tmu_probe() don't handle the struct exynos_tmu_platform_data *pdata.
      
      Test HW: Exynos4412 - Trats2 board
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Tested-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      3c19d237
    • C
      thermal: exynos: Add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF · f87e6bd3
      Chanwoo Choi 提交于
      The exynos thermal driver use the of_thermal_*() API to parse the basic data
      for thermal management from devicetree file. So, if CONFIG_EXYNOS_THERMAL is
      selected without CONFIG_THERMAL_OF, kernel can build it without any problem.
      But, exynos thermal driver is not working with following error log. This patch
      add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF.
      
      [    1.458644] get_th_reg: Cannot get trip points from of-thermal.c!
      [    1.459096] get_th_reg: Cannot get trip points from of-thermal.c!
      [    1.465211] exynos4412_tmu_initialize: No CRITICAL trip point defined at of-thermal.c!
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      f87e6bd3
    • K
      thermal: exynos: Disable the regulator on probe failure · 5f09a5cb
      Krzysztof Kozlowski 提交于
      During probe the regulator (if present) was enabled but not disabled in
      case of failure. So an unsuccessful probe lead to enabling the
      regulator which was actually not needed because the device was not
      enabled.
      
      Additionally each deferred probe lead to increase of regulator enable
      count so it would not be effectively disabled during removal of the
      device.
      
      Test HW: Exynos4412 - Trats2 board
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Fixes: 498d22f6 ("thermal: exynos: Support for TMU regulator defined at device tree")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Tested-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      5f09a5cb
    • J
      thermal: power_allocator: trace the real requested power · d5f83109
      Javi Merino 提交于
      The power allocator governor uses ftrace to output a bunch of internal
      data for debugging and tuning.  Currently, the requested power it
      outputs is the "weighted" requested power, that is, what each cooling
      device has requested multiplied by the cooling device weight.  It is
      more useful to trace the real request, without any weight being
      applied.
      
      This commit only affects the data traced, there is no functional change.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      d5f83109
    • V
      thermal: remove dangling 'weight_attr' device file · 528464ea
      Viresh Kumar 提交于
      This file isn't getting removed while we unbind a device from thermal
      zone. And this causes following messages when the device is registered
      again:
      
      WARNING: CPU: 0 PID: 2228 at /home/viresh/linux/fs/sysfs/dir.c:31 sysfs_warn_dup+0x60/0x70()
      sysfs: cannot create duplicate filename '/devices/virtual/thermal/thermal_zone0/cdev0_weight'
      Modules linked in: cpufreq_dt(+) [last unloaded: cpufreq_dt]
      CPU: 0 PID: 2228 Comm: insmod Not tainted 4.2.0-rc3-00059-g44fffd9473eb #272
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c00153e8>] (unwind_backtrace) from [<c0012368>] (show_stack+0x10/0x14)
      [<c0012368>] (show_stack) from [<c053a684>] (dump_stack+0x84/0xc4)
      [<c053a684>] (dump_stack) from [<c002284c>] (warn_slowpath_common+0x80/0xb0)
      [<c002284c>] (warn_slowpath_common) from [<c00228ac>] (warn_slowpath_fmt+0x30/0x40)
      [<c00228ac>] (warn_slowpath_fmt) from [<c012d524>] (sysfs_warn_dup+0x60/0x70)
      [<c012d524>] (sysfs_warn_dup) from [<c012d244>] (sysfs_add_file_mode_ns+0x13c/0x190)
      [<c012d244>] (sysfs_add_file_mode_ns) from [<c012d2d4>] (sysfs_create_file_ns+0x3c/0x48)
      [<c012d2d4>] (sysfs_create_file_ns) from [<c03c04a8>] (thermal_zone_bind_cooling_device+0x260/0x358)
      [<c03c04a8>] (thermal_zone_bind_cooling_device) from [<c03c2e70>] (of_thermal_bind+0x88/0xb4)
      [<c03c2e70>] (of_thermal_bind) from [<c03c10d0>] (__thermal_cooling_device_register+0x17c/0x2e0)
      [<c03c10d0>] (__thermal_cooling_device_register) from [<c03c3f50>] (__cpufreq_cooling_register+0x3a0/0x51c)
      [<c03c3f50>] (__cpufreq_cooling_register) from [<bf00505c>] (cpufreq_ready+0x44/0x88 [cpufreq_dt])
      [<bf00505c>] (cpufreq_ready [cpufreq_dt]) from [<c03d6c30>] (cpufreq_add_dev+0x4a0/0x7dc)
      [<c03d6c30>] (cpufreq_add_dev) from [<c02cd3ec>] (subsys_interface_register+0x94/0xd8)
      [<c02cd3ec>] (subsys_interface_register) from [<c03d785c>] (cpufreq_register_driver+0x10c/0x1f0)
      [<c03d785c>] (cpufreq_register_driver) from [<bf0057d4>] (dt_cpufreq_probe+0x60/0x8c [cpufreq_dt])
      [<bf0057d4>] (dt_cpufreq_probe [cpufreq_dt]) from [<c02d03e4>] (platform_drv_probe+0x44/0xa4)
      [<c02d03e4>] (platform_drv_probe) from [<c02cead8>] (driver_probe_device+0x174/0x2b4)
      [<c02cead8>] (driver_probe_device) from [<c02ceca4>] (__driver_attach+0x8c/0x90)
      [<c02ceca4>] (__driver_attach) from [<c02cd078>] (bus_for_each_dev+0x68/0x9c)
      [<c02cd078>] (bus_for_each_dev) from [<c02ce2f0>] (bus_add_driver+0x19c/0x214)
      [<c02ce2f0>] (bus_add_driver) from [<c02cf490>] (driver_register+0x78/0xf8)
      [<c02cf490>] (driver_register) from [<c0009710>] (do_one_initcall+0x8c/0x1d4)
      [<c0009710>] (do_one_initcall) from [<c05396b0>] (do_init_module+0x5c/0x1b8)
      [<c05396b0>] (do_init_module) from [<c0086490>] (load_module+0xd34/0xed8)
      [<c0086490>] (load_module) from [<c0086704>] (SyS_init_module+0xd0/0x120)
      [<c0086704>] (SyS_init_module) from [<c000f480>] (ret_fast_syscall+0x0/0x3c)
      ---[ end trace 3be0e7b7dc6e3c4f ]---
      
      Fixes: db916513 ("thermal: export weight to sysfs")
      Acked-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      528464ea
    • N
      md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies · 423f04d6
      NeilBrown 提交于
      raid1_end_read_request() assumes that the In_sync bits are consistent
      with the ->degaded count.
      raid1_spare_active updates the In_sync bit before the ->degraded count
      and so exposes an inconsistency, as does error()
      So extend the spinlock in raid1_spare_active() and error() to hide those
      inconsistencies.
      
      This should probably be part of
        Commit: 34cab6f4 ("md/raid1: fix test for 'was read error from
        last working device'.")
      as it addresses the same issue.  It fixes the same bug and should go
      to -stable for same reasons.
      
      Fixes: 76073054 ("md/raid1: clean up read_balance.")
      Cc: stable@vger.kernel.org (v3.0+)
      Signed-off-by: NNeilBrown <neilb@suse.com>
      423f04d6