]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] cfq-iosched: fix crash in do_div()
authorJens Axboe <axboe@suse.de>
Wed, 14 Jun 2006 17:11:57 +0000 (19:11 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 14 Jun 2006 17:22:16 +0000 (10:22 -0700)
commitbf61e740a89f22570d7e3c430e1f9a8947b55a4c
tree2c9019e43218a3afc92fbb32a44de794123295f4
parent2fcebca1069cc22957f8773e60046952f3312717
[PATCH] cfq-iosched: fix crash in do_div()

We don't clear the seek stat values in cfq_alloc_io_context(), and if
->seek_mean is unlucky enough to be set to -36 by chance, the first
invocation of cfq_update_io_seektime() will oops with a divide by zero
in do_div().

Just memset the entire cic instead of filling invididual values
independently.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
block/cfq-iosched.c