1. 10 2月, 2008 1 次提交
  2. 09 2月, 2008 4 次提交
  3. 07 2月, 2008 1 次提交
    • M
      time: fix sysfs_show_{available,current}_clocksources() buffer overflow problem · 5e2cb101
      Miao Xie 提交于
      I found that there is a buffer overflow problem in the following code.
      
      Version:	2.6.24-rc2,
      File:		kernel/time/clocksource.c:417-432
      --------------------------------------------------------------------
      static ssize_t
      sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
      {
      	struct clocksource *src;
      	char *curr = buf;
      
      	spin_lock_irq(&clocksource_lock);
      	list_for_each_entry(src, &clocksource_list, list) {
      		curr += sprintf(curr, "%s ", src->name);
      	}
      	spin_unlock_irq(&clocksource_lock);
      
      	curr += sprintf(curr, "\n");
      
      	return curr - buf;
      }
      -----------------------------------------------------------------------
      
      sysfs_show_current_clocksources() also has the same problem though in practice
      the size of current clocksource's name won't exceed PAGE_SIZE.
      
      I fix the bug by using snprintf according to the specification of the kernel
      (Version:2.6.24-rc2,File:Documentation/filesystems/sysfs.txt)
      
      Fix sysfs_show_available_clocksources() and sysfs_show_current_clocksources()
      buffer overflow problem with snprintf().
      Signed-off-by: NMiao Xie <miaox@cn.fujitsu.com>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5e2cb101
  4. 02 2月, 2008 2 次提交
  5. 30 1月, 2008 10 次提交
  6. 26 1月, 2008 2 次提交
  7. 25 1月, 2008 1 次提交
  8. 19 12月, 2007 1 次提交
    • T
      clockevents: fix reprogramming decision in oneshot broadcast · cdc6f27d
      Thomas Gleixner 提交于
      Resolve the following regression of a choppy, almost unusable laptop:
      
       http://lkml.org/lkml/2007/12/7/299
       http://bugzilla.kernel.org/show_bug.cgi?id=9525
      
      A previous version of the code did the reprogramming of the broadcast
      device in the return from idle code. This was removed, but the logic in
      tick_handle_oneshot_broadcast() was kept the same.
      
      When a broadcast interrupt happens we signal the expiry to all CPUs
      which have an expired event. If none of the CPUs has an expired event,
      which can happen in dyntick mode, then we reprogram the broadcast
      device. We do not reprogram otherwise, but this is only correct if all
      CPUs, which are in the idle broadcast state have been woken up.
      
      The code ignores, that there might be pending not yet expired events on
      other CPUs, which are in the idle broadcast state. So the delivery of
      those events can be delayed for quite a time.
      
      Change the tick_handle_oneshot_broadcast() function to check for CPUs,
      which are in broadcast state and are not woken up by the current event,
      and enforce the rearming of the broadcast device for those CPUs.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cdc6f27d
  9. 08 12月, 2007 1 次提交
  10. 28 11月, 2007 1 次提交
  11. 27 11月, 2007 1 次提交
  12. 17 11月, 2007 1 次提交
    • D
      ntp: fix typo that makes sync_cmos_clock erratic · fa6a1a55
      David P. Reed 提交于
      Fix a typo in ntp.c that has caused updating of the persistent (RTC)
      clock when synced to NTP to behave erratically.
      
      When debugging a freeze that arises on my AMD64 machines when I
      run the ntpd service, I added a number of printk's to monitor the
      sync_cmos_clock procedure.  I discovered that it was not syncing to
      cmos RTC every 11 minutes as documented, but instead would keep trying
      every second for hours at a time.  The reason turned out to be a typo
      in sync_cmos_clock, where it attempts to ensure that
      update_persistent_clock is called very close to 500 msec. after a 1
      second boundary (required by the PC RTC's spec). That typo referred to
      "xtime" in one spot, rather than "now", which is derived from "xtime"
      but not equal to it.  This makes the test erratic, creating a
      "coin-flip" that decides when update_persistent_clock is called - when
      it is called, which is rarely, it may be at any time during the one
      second period, rather than close to 500 msec, so the value written is
      needlessly incorrect, too.
      
      Signed-off-by: David P. Reed
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      fa6a1a55
  13. 06 11月, 2007 1 次提交
  14. 29 10月, 2007 2 次提交
  15. 26 10月, 2007 1 次提交
  16. 20 10月, 2007 1 次提交
  17. 18 10月, 2007 1 次提交
  18. 17 10月, 2007 4 次提交
  19. 15 10月, 2007 1 次提交
    • T
      clockevents: introduce force broadcast notifier · 1595f452
      Thomas Gleixner 提交于
      The 64bit SMP bootup is slightly different to the 32bit one. It enables
      the boot CPU local APIC timer before all CPUs are brought up. Some AMD C1E
      systems have the C1E feature flag only set in the secondary CPU. Due to
      the early enable of the boot CPU local APIC timer the APIC timer is
      registered as a fully functional device. When we detect the wreckage during
      the bringup of the secondary CPU, we need to force the boot CPU into
      broadcast mode. 
      
      Add a new notifier reason and implement the force broadcast in the clock
      events layer.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      1595f452
  20. 13 10月, 2007 3 次提交