linux/drivers
Yury Polyanskiy 940370fc86 hangcheck-timer: fix x86_32 bugs
drivers/char/hangcheck-timer.c is doubly broken.  When the overflown value
of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT
messages "Hangcheck: hangcheck value past margin!" But whether it happens
or not depends on HZ and lpj in a complex way.  People have hit it
occasionally as far as google search can tell.

First, the following line overflows unsigned long:

# define TIMER_FREQ (HZ*loops_per_jiffy)

Second, and more importantly, loops_per_jiffy has little to do with the
con= version from the the time scale of get_cycles() (aka rdtsc) to the
time scale of jiffies.

The attached patch resolves both of the problems.

Acked-by: Joel Becker <joel.becker@oracle.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:02 -07:00
..
accessibility
acpi sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
amba
ata Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
atm Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
auxdisplay
base mm: compaction: add /sys trigger for per-node memory compaction 2010-05-25 08:06:59 -07:00
block Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
cdrom of: Always use 'struct device.of_node' to get device node pointer. 2010-05-18 16:10:44 -06:00
char hangcheck-timer: fix x86_32 bugs 2010-05-25 08:07:02 -07:00
clocksource Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-19 17:10:57 -07:00
connector
cpufreq Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:49:13 -07:00
cpuidle cpuidle: add a repeating pattern detector to the menu governor 2010-05-25 08:07:02 -07:00
crypto Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
dca
dio
dma Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-05-24 07:58:28 -07:00
edac Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
eisa
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
firmware sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
gpio Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
gpu Merge branch 'drm-for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-05-21 11:14:52 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2010-05-21 10:51:03 -07:00
hwmon Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
i2c Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 2010-05-24 08:05:29 -07:00
idle
ieee1394
ieee802154
infiniband Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
input Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
isdn Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
leds of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
lguest
macintosh Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
mca
md Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2010-05-21 19:37:45 -07:00
media Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
memstick
message fusion: fix kernel-doc notation 2010-05-24 07:31:20 -07:00
mfd sh: allow platforms to specify SD-card supported voltages 2010-05-22 17:05:22 +09:00
misc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-05-21 11:17:05 -07:00
mmc Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-05-24 07:58:28 -07:00
mtd Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
net Revert "ath9k: Group Key fix for VAPs" 2010-05-24 07:45:43 -07:00
nubus
of Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
oprofile
parisc
parport Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
pci Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-05-21 18:58:52 -07:00
pcmcia Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
platform Move N014, N051 and CR620 dmi information to load scm dmi table 2010-05-20 10:16:13 -04:00
pnp
power Merge git://git.infradead.org/battery-2.6 2010-05-24 08:00:13 -07:00
pps
ps3
rapidio sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
regulator Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
rtc Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
s390 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
sbus Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
scsi Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
serial m68knommu: fix broken use of BUAD_TABLE_SIZE in 68328serial driver 2010-05-25 08:07:02 -07:00
sfi
sh
sn include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
spi Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
ssb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2010-05-21 15:26:46 -07:00
tc
telephony
thermal
uio
usb Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
uwb
vhost
video Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
virtio Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus 2010-05-21 17:22:52 -07:00
vlynq
w1 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
watchdog Merge remote branch 'origin' into secretlab/next-devicetree 2010-05-22 00:36:56 -06:00
xen
zorro sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
Kconfig
Makefile