]> git.baikalelectronics.ru Git - kernel.git/commit
tools/vm/page-types.c: catch sigbus if raced with truncate
authorKonstantin Khlebnikov <koct9i@gmail.com>
Wed, 4 Jun 2014 23:05:30 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:53:51 +0000 (16:53 -0700)
commitd0af6da5cd0c81b93fe61fbb952129824d8b2170
tree162df1711beca7f301a0c1d8b1967dde7012e72c
parentb012dd972a075af27ebc0c9fd61ba1db90d5a1f7
tools/vm/page-types.c: catch sigbus if raced with truncate

Recently added page-cache dumping is known to be a little bit racy.
But after race with truncate it just dies due to unhandled SIGBUS
when it tries to poke pages beyond the new end of file.
This patch adds handler for SIGBUS which skips the rest of the file.

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/vm/page-types.c