]> git.baikalelectronics.ru Git - kernel.git/commit
tsacct: fix bacct_add_tsk()'s use of do_div()
authorDavid Howells <dhowells@redhat.com>
Fri, 25 Jul 2008 08:48:50 +0000 (01:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:47 +0000 (10:53 -0700)
commit67ea0dc94526129aad65d6c623d59fe607a12c26
tree104931bdb095bd9f7cb987e50800a036b0c2dcb4
parentb893ba77a28258d7c10a209ebdbec597e46d7b84
tsacct: fix bacct_add_tsk()'s use of do_div()

Fix bacct_add_tsk()'s use of do_div() on an s64 by making ac_etime a u64
instead and dividing that.

Possibly this should be guarded lest the interval calculation turn up
negative, but the possible negativity of the result of the division is
cast away, and it shouldn't end up negative anyway.

This was introduced by patch fea7aba941bbc23a3a30e0ee459248726b2928de.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Jay Lan <jlan@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/tsacct.c