From: Mikulas Patocka Date: Thu, 2 Apr 2009 18:55:24 +0000 (+0100) Subject: dm io: make sync_io uninterruptible X-Git-Tag: v2.6.30-rc1~230^2~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b64b6bf4fd8b678a9f8477c11773c38a0a246a6d;p=pandora-kernel.git dm io: make sync_io uninterruptible If someone sends signal to a process performing synchronous dm-io call, the kernel may crash. The function sync_io attempts to exit with -EINTR if it has pending signal, however the structure "io" is allocated on stack, so already submitted io requests end up touching unallocated stack space and corrupting kernel memory. sync_io sets its state to TASK_UNINTERRUPTIBLE, so the signal can't break out of io_schedule() --- however, if the signal was pending before sync_io entered while (1) loop, the corruption of kernel memory will happen. There is no way to cancel in-progress IOs, so the best solution is to ignore signals at this point. Cc: stable@kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon --- Reading git-diff-tree failed