1. 20 4月, 2009 2 次提交
    • T
      acpi-cpufreq: Cleanup: Use printk_once · e0e8c4e5
      Thomas Renninger 提交于
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e0e8c4e5
    • P
      x86, acpi_cpufreq: Fix the NULL pointer dereference in get_measured_perf · 093f13e2
      Pallipadi, Venkatesh 提交于
      Fix for a regression that was introduced by earlier commit
      18b2646f on Mon Apr 6 11:26:08 2009
      
      Regression resulted in the below error happened on systems with
      software coordination where per_cpu acpi data will not be initiated for
      secondary CPUs in a P-state domain.
      
      On Tue, 2009-04-14 at 23:01 -0700, Zhang, Yanmin wrote:
       My machine hanged with kernel 2.6.30-rc2 when script read
      > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.
      >
      > opps happens in get_measured_perf:
      >
      >         cur.aperf.whole = readin.aperf.whole -
      >                                 per_cpu(drv_data, cpu)->saved_aperf;
      >
      > Because per_cpu(drv_data, cpu)=NULL.
      >
      > So function get_measured_perf should check if (per_cpu(drv_data,
      > cpu)==NULL)
      > and return 0 if it's NULL.
      
      --------------sys log------------------
      
      BUG: unable to handle kernel NULL pointer dereference at
      0000000000000020
      IP: [<ffffffff8021af75>] get_measured_perf+0x4a/0xf9
      PGD a7dd88067 PUD a7ccf5067 PMD 0
      Oops: 0000 [#1] SMP
      last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
      CPU 0
      Modules linked in: video output
      Pid: 2091, comm: kondemand/0 Not tainted 2.6.30-rc2 #1 MP Server
      RIP: 0010:[<ffffffff8021af75>]  [<ffffffff8021af75>]
      get_measured_perf+0x4a/0xf9
      RSP: 0018:ffff880a7d56de20  EFLAGS: 00010246
      RAX: 0000000000000000 RBX: 00000046241a42b6 RCX: ffff88004d219000
      RDX: 000000000000b660 RSI: 0000000000000020 RDI: 0000000000000001
      RBP: ffff880a7f052000 R08: 00000046241a42b6 R09: ffffffff807639f0
      R10: 00000000ffffffea R11: ffffffff802207f4 R12: ffff880a7f052000
      R13: ffff88004d20e460 R14: 0000000000ddd5a6 R15: 0000000000000001
      FS:  0000000000000000(0000) GS:ffff88004d200000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 0000000000000020 CR3: 0000000a7f1bf000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process kondemand/0 (pid: 2091, threadinfo ffff880a7d56c000, task
      ffff880a7d4d18c0)
      Stack:
       ffff880a7f052078 ffffffff803efd54 00000046241a42b6 000000462ffa9e95
       0000000000000001 0000000000000001 00000000ffffffea ffffffff8064f41a
       0000000000000012 0000000000000012 ffff880a7f052000 ffffffff80650547
      Call Trace:
       [<ffffffff803efd54>] ? kobject_get+0x12/0x17
       [<ffffffff8064f41a>] ? __cpufreq_driver_getavg+0x42/0x57
       [<ffffffff80650547>] ? do_dbs_timer+0x147/0x272
       [<ffffffff80650400>] ? do_dbs_timer+0x0/0x272
       [<ffffffff802474ca>] ? worker_thread+0x15b/0x1f5
       [<ffffffff8024a02c>] ? autoremove_wake_function+0x0/0x2e
       [<ffffffff8024736f>] ? worker_thread+0x0/0x1f5
       [<ffffffff80249f0d>] ? kthread+0x54/0x83
       [<ffffffff8020c87a>] ? child_rip+0xa/0x20
       [<ffffffff80249eb9>] ? kthread+0x0/0x83
       [<ffffffff8020c870>] ? child_rip+0x0/0x20
      Code: 99 a6 03 00 31 c9 85 c0 0f 85 c3 00 00 00 89 df 4c 8b 44 24 10 48
      c7 c2 60 b6 00 00 48 8b 0c fd e0 30 a5 80 4c 89 c3 48 8b 04 0a <48> 2b
      58 20 48 8b 44 24 18 48 89 1c 24 48 8b 34 0a 48 2b 46 28
      RIP  [<ffffffff8021af75>] get_measured_perf+0x4a/0xf9
       RSP <ffff880a7d56de20>
      CR2: 0000000000000020
      ---[ end trace 2b8fac9a49e19ad4 ]---
      Tested-by: N"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      093f13e2
  2. 15 4月, 2009 1 次提交
    • L
      acpi-cpufreq: fix 'smp_call_function_many()' confusion · ea34f43a
      Linus Torvalds 提交于
      It turns out that 'smp_call_function_many()' doesn't work at all like
      'smp_call_function_single()', and my change to Andrew's patch to use it
      rather than a loop over all CPU's acpi-cpufreq doesn't work.
      
      My bad.
      
      'smp_call_function_many()' has two "features" (aka "documented bugs"):
      
       (a) it needs to be called with preemption disabled, because it uses
           smp_processor_id() without guarding the CPU lookup with 'get_cpu()'
           and 'put_cpu()' like the 'single' variant does.
      
       (b) even if the current CPU is part of the CPU mask, it won't do the
           call on that CPU.
      
      Still, we're better off trying to use 'smp_call_function_many()' than
      looping over CPU's, since it at least in theory allows us to use a
      broadcast IPI and do it all in parallel.  So let's just work around the
      silly semantic bugs in that function.
      Reported-and-tested-by: NAli Gholami Rudi <ali@rudi.ir>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andrew Morton <akpm@linux-foundation.org>,
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Dave Jones <davej@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea34f43a
  3. 14 4月, 2009 2 次提交
  4. 09 4月, 2009 1 次提交
  5. 08 4月, 2009 3 次提交
  6. 07 4月, 2009 1 次提交
  7. 04 4月, 2009 1 次提交
    • I
      x86, mtrr: remove debug message · c5c67c7c
      Ingo Molnar 提交于
      The MTRR code grew a new debug message which triggers commonly:
      
      [   40.142276]   get_mtrr: cpu0 reg00 base=0000000000 size=0000080000 write-back
      [   40.142280]   get_mtrr: cpu0 reg01 base=0000080000 size=0000040000 write-back
      [   40.142284]   get_mtrr: cpu0 reg02 base=0000100000 size=0000040000 write-back
      [   40.142311]   get_mtrr: cpu0 reg00 base=0000000000 size=0000080000 write-back
      [   40.142314]   get_mtrr: cpu0 reg01 base=0000080000 size=0000040000 write-back
      [   40.142317]   get_mtrr: cpu0 reg02 base=0000100000 size=0000040000 write-back
      
      Remove this annoyance.
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c5c67c7c
  8. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  9. 28 3月, 2009 2 次提交
  10. 23 3月, 2009 1 次提交
  11. 18 3月, 2009 3 次提交
  12. 17 3月, 2009 1 次提交
  13. 16 3月, 2009 1 次提交
  14. 15 3月, 2009 1 次提交
  15. 14 3月, 2009 5 次提交
  16. 13 3月, 2009 10 次提交
  17. 12 3月, 2009 1 次提交
  18. 11 3月, 2009 3 次提交