You need to sign in or sign up before continuing.
  1. 28 2月, 2013 1 次提交
  2. 12 12月, 2012 1 次提交
    • Z
      Thermal: fix a NULL pointer dereference when generic thermal layer is built as a module · d567c686
      Zhang Rui 提交于
      [   12.761956] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
      [   12.762016] IP: [<ffffffffa0005277>] handle_thermal_trip+0x47/0x130 [thermal_sys]
      [   12.762060] PGD 1fec74067 PUD 1fee5b067 PMD 0
      [   12.762127] Oops: 0000 [#1] SMP
      [   12.762177] Modules linked in: hid_generic crc32c_intel usbhid hid firewire_ohci(+) e1000e(+) firewire_core crc_itu_t xhci_hcd(+) thermal(+) fan thermal_sys hwmon
      [   12.762423] CPU 1
      [   12.762443] Pid: 187, comm: modprobe Tainted: G       A     3.7.0-thermal-module+ #25                  /DH77DF
      [   12.762496] RIP: 0010:[<ffffffffa0005277>]  [<ffffffffa0005277>] handle_thermal_trip+0x47/0x130 [thermal_sys]
      [   12.762682] RSP: 0018:ffff8801fe7ddc18  EFLAGS: 00010282
      [   12.762704] RAX: 0000000000000000 RBX: ffff8801ff3e9c00 RCX: ffff8801fdc39800
      [   12.762728] RDX: ffff8801fe7ddc24 RSI: 0000000000000001 RDI: ffff8801ff3e9c00
      [   12.762764] RBP: ffff8801fe7ddc48 R08: 0000000004000000 R09: ffffffffa001f568
      [   12.762797] R10: ffffffff81363083 R11: 0000000000000001 R12: 0000000000000001
      [   12.762832] R13: 0000000000000000 R14: 0000000000000001 R15: ffff8801fde73e68
      [   12.762866] FS:  00007f5548516700(0000) GS:ffff88021f240000(0000) knlGS:0000000000000000
      [   12.762912] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   12.762946] CR2: 0000000000000018 CR3: 00000001fefe2000 CR4: 00000000001407e0
      [   12.762979] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   12.763014] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [   12.763048] Process modprobe (pid: 187, threadinfo ffff8801fe7dc000, task ffff8801fe5bdb40)
      [   12.763095] Stack:
      [   12.763122]  0000000000019640 00000000fdc39800 ffff8801fe7ddc48 ffff8801ff3e9c00
      [   12.763225]  0000000000000002 0000000000000000 ffff8801fe7ddc78 ffffffffa00053e7
      [   12.763338]  ffff8801ff3e9c00 0000000000006c98 ffffffffa0007480 ffff8801ff3e9c00
      [   12.763440] Call Trace:
      [   12.763470]  [<ffffffffa00053e7>] thermal_zone_device_update+0x77/0xa0 [thermal_sys]
      [   12.763515]  [<ffffffffa0006d38>] thermal_zone_device_register+0x788/0xa88 [thermal_sys]
      [   12.763562]  [<ffffffffa001f394>] acpi_thermal_add+0x360/0x4c8 [thermal]
      [   12.763598]  [<ffffffff8133902a>] acpi_device_probe+0x50/0x190
      [   12.763632]  [<ffffffff811bd793>] ? sysfs_create_link+0x13/0x20
      [   12.763666]  [<ffffffff813cc41b>] driver_probe_device+0x7b/0x240
      [   12.763699]  [<ffffffff813cc68b>] __driver_attach+0xab/0xb0
      [   12.763732]  [<ffffffff813cc5e0>] ? driver_probe_device+0x240/0x240
      [   12.763766]  [<ffffffff813ca836>] bus_for_each_dev+0x56/0x90
      [   12.763799]  [<ffffffff813cbf4e>] driver_attach+0x1e/0x20
      [   12.763831]  [<ffffffff813cbac0>] bus_add_driver+0x190/0x290
      [   12.763864]  [<ffffffffa0022000>] ? 0xffffffffa0021fff
      [   12.763896]  [<ffffffff813ccbea>] driver_register+0x7a/0x160
      [   12.763928]  [<ffffffffa0022000>] ? 0xffffffffa0021fff
      [   12.763960]  [<ffffffff813399fb>] acpi_bus_register_driver+0x43/0x45
      [   12.763995]  [<ffffffffa002203a>] acpi_thermal_init+0x3a/0x42 [thermal]
      [   12.764029]  [<ffffffff8100207f>] do_one_initcall+0x3f/0x170
      [   12.764063]  [<ffffffff810b1a5f>] sys_init_module+0x8f/0x200
      [   12.764097]  [<ffffffff815ff259>] system_call_fastpath+0x16/0x1b
      [   12.764129] Code: 48 8b 87 c8 02 00 00 41 89 f4 48 8d 55 dc ff 50 28 44 8b 6d dc 41 8d 45 fe 83 f8 01 76 5e 48 8b 83 d8 02 00 00 44 89 e6 48 89 df <ff> 50 18 4c 8d a3 10 03 00 00 4c 89 e7 e8 87 f1 5e e1 8b 83 bc
      [   12.765164] RIP  [<ffffffffa0005277>] handle_thermal_trip+0x47/0x130 [thermal_sys]
      [   12.765223]  RSP <ffff8801fe7ddc18>
      [   12.765252] CR2: 0000000000000018
      [   12.765284] ---[ end trace 7723294cdfb00d2a ]---
      
      This is because thermal_zone_device_update() is invoked before
      any thermal governors being registered.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      d567c686
  3. 05 11月, 2012 10 次提交
  4. 06 10月, 2012 1 次提交
  5. 24 9月, 2012 15 次提交
  6. 14 8月, 2012 1 次提交
    • T
      workqueue: use mod_delayed_work() instead of cancel + queue · 41f63c53
      Tejun Heo 提交于
      Convert delayed_work users doing cancel_delayed_work() followed by
      queue_delayed_work() to mod_delayed_work().
      
      Most conversions are straight-forward.  Ones worth mentioning are,
      
      * drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always
        use mod_delayed_work() and cancel loop in
        edac_mc_reset_delay_period() is dropped.
      
      * drivers/platform/x86/thinkpad_acpi.c: No need to remember whether
        watchdog is active or not.  @fan_watchdog_active and related code
        dropped.
      
      * drivers/power/charger-manager.c: Seemingly a lot of
        delayed_work_pending() abuse going on here.
        [delayed_]work_pending() are unsynchronized and racy when used like
        this.  I converted one instance in fullbatt_handler().  Please
        conver the rest so that it invokes workqueue APIs for the intended
        target state rather than trying to game work item pending state
        transitions.  e.g. if timer should be modified - call
        mod_delayed_work(), canceled - call cancel_delayed_work[_sync]().
      
      * drivers/thermal/thermal_sys.c: thermal_zone_device_set_polling()
        simplified.  Note that round_jiffies() calls in this function are
        meaningless.  round_jiffies() work on absolute jiffies not delta
        delay used by delayed_work.
      
      v2: Tomi pointed out that __cancel_delayed_work() users can't be
          safely converted to mod_delayed_work().  They could be calling it
          from irq context and if that happens while delayed_work_timer_fn()
          is running, it could deadlock.  __cancel_delayed_work() users are
          dropped.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Doug Thompson <dougthompson@xmission.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      41f63c53
  7. 31 7月, 2012 1 次提交
    • A
      thermal: Constify 'type' argument for the registration routine · 4b1bf587
      Anton Vorontsov 提交于
      thermal_zone_device_register() does not modify 'type' argument, so it is
      safe to declare it as const. Otherwise, if we pass a const string, we are
      getting the ugly warning:
      
      CC drivers/power/power_supply_core.o
      drivers/power/power_supply_core.c: In function 'psy_register_thermal':
      drivers/power/power_supply_core.c:204:6: warning: passing argument 1 of 'thermal_zone_device_register' discards 'const' qualifier from pointer target type [enabled by default]
      include/linux/thermal.h:140:29: note: expected 'char *' but argument is of type 'const char *'
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      4b1bf587
  8. 25 7月, 2012 2 次提交
  9. 22 3月, 2012 6 次提交
  10. 23 1月, 2012 1 次提交
  11. 07 11月, 2011 1 次提交