Skip to content
Snippets Groups Projects
  1. Jun 08, 2009
  2. Mar 30, 2009
  3. Mar 27, 2009
  4. Mar 12, 2009
    • Daniel Mack's avatar
      ds2760_battery.c: fix division by zero · a4e3f91b
      Daniel Mack authored
      
      The 'battery remaining capacity' calculation in
      drivers/power/ds2760_battery.c lacks a parameter check to a division
      operation which causes the kernel to oops on my board.
      
      [   21.233750] Division by zero in kernel.
      [   21.237646] [<c002955c>] (__div0+0x0/0x20) from [<c012561c>] (Ldiv0+0x8/0x10)
      [   21.244816] [<c01bef34>] (ds2760_battery_read_status+0x0/0x2a4) from [<c01bf3a4>] (ds2760_battery_get_property+0x30/0xdc)
      [   21.255803]  r8:c03a22c0 r7:c7886100 r6:00000009 r5:c782fe7c r4:c7886084
      [   21.262518] [<c01bf374>] (ds2760_battery_get_property+0x0/0xdc) from [<c01bde98>] (power_supply_show_property+0x48/0x114)
      [   21.273480]  r6:c7996000 r5:00000009 r4:00000000
      [   21.278111] [<c01bde50>] (power_supply_show_property+0x0/0x114) from [<c01be158>] (power_supply_uevent+0x188/0x280)
      [   21.288537]  r8:00000001 r7:c7886100 r6:c7996000 r5:000000b4 r4:00000000
      [   21.295222] [<c01bdfd0>] (power_supply_uevent+0x0/0x280) from [<c015c664>] (dev_uevent+0xd4/0x10c)
      [   21.304199] [<c015c590>] (dev_uevent+0x0/0x10c) from [<c0128440>] (kobject_uevent_env+0x180/0x390)
      [   21.313170]  r5:00000000 r4:c78860ac
      [   21.316725] [<c01282c0>] (kobject_uevent_env+0x0/0x390) from [<c0128664>] (kobject_uevent+0x14/0x18)
      [   21.325850] [<c0128650>] (kobject_uevent+0x0/0x18) from [<c01bdc34>] (power_supply_changed_work+0x5c/0x70)
      [   21.335506] [<c01bdbd8>] (power_supply_changed_work+0x0/0x70) from [<c004d290>] (run_workqueue+0xbc/0x144)
      [   21.345167]  r4:c7812040
      [   21.347716] [<c004d1d4>] (run_workqueue+0x0/0x144) from [<c004d94c>] (worker_thread+0xa8/0xbc)
      [   21.356296]  r7:c7812040 r6:c7820b00 r5:c782ffa4 r4:c7812048
      [   21.361957] [<c004d8a4>] (worker_thread+0x0/0xbc) from [<c0051008>] (kthread+0x5c/0x94)
      [   21.369971]  r7:00000000 r6:c004d8a4 r5:c7812040 r4:c782e000
      [   21.375612] [<c0050fac>] (kthread+0x0/0x94) from [<c00403d0>] (do_exit+0x0/0x688)
      
      Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
      Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>
      Acked-by: default avatarMatt Reimer <mreimer@vpop.net>
      Acked-by: default avatarAnton Vorontsov <cbou@mail.ru>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4e3f91b
  5. Feb 02, 2009
  6. Jan 25, 2009
  7. Jan 10, 2009
  8. Jan 06, 2009
  9. Jan 04, 2009
  10. Oct 20, 2008
    • Parag Warudkar's avatar
      x86: sysfs: kill owner field from attribute · 01e8ef11
      Parag Warudkar authored
      
      Tejun's commit 7b595756 made sysfs
      attribute->owner unnecessary.  But the field was left in the structure to
      ease the merge.  It's been over a year since that change and it is now
      time to start killing attribute->owner along with its users - one arch at
      a time!
      
      This patch is attempt #1 to get rid of attribute->owner only for
      CONFIG_X86_64 or CONFIG_X86_32 .  We will deal with other arches later on
      as and when possible - avr32 will be the next since that is something I
      can test.  Compile (make allyesconfig / make allmodconfig / custom config)
      and boot tested.
      
      akpm: the idea is that we put the declaration of sttribute.owner inside
      `#ifndef CONFIG_X86'.  But that proved to be too ambitious for now because
      new usages kept on turning up in subsystem trees.
      
      [akpm: remove the ifdef for now]
      Signed-off-by: default avatarParag Warudkar <parag.lkml@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Tejun Heo <htejun@gmail.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      01e8ef11
  11. Oct 16, 2008
  12. Oct 12, 2008
  13. Oct 02, 2008
  14. Sep 25, 2008
  15. Aug 31, 2008
  16. Aug 07, 2008
  17. Jul 25, 2008
  18. Jul 21, 2008
  19. Jul 10, 2008
  20. Jun 30, 2008
  21. Jun 09, 2008
  22. May 20, 2008
    • Greg Kroah-Hartman's avatar
      Power Supply: fix race in device_create · 54d29ad3
      Greg Kroah-Hartman authored
      
      There is a race from when a device is created with device_create() and
      then the drvdata is set with a call to dev_set_drvdata() in which a
      sysfs file could be open, yet the drvdata will be NULL, causing all
      sorts of bad things to happen.
      
      This patch fixes the problem by using the new function,
      device_create_drvdata().
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Anton Vorontsov <cbou@mail.ru>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      54d29ad3
  23. May 18, 2008
  24. May 13, 2008
  25. May 04, 2008
Loading