Mikulas Patocka b64b6bf4fd 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 <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-04-02 19:55:24 +01:00
..
2006-01-01 22:21:50 +01:00
2007-10-20 02:01:11 +01:00
2009-04-02 19:55:24 +01:00
2009-01-06 03:05:12 +00:00
2009-01-06 03:05:10 +00:00
2007-10-20 02:01:26 +01:00
2009-01-06 03:05:12 +00:00
2009-03-04 00:57:25 -07:00
2008-02-06 10:41:18 -08:00
2009-02-25 13:18:47 +11:00
2005-09-17 11:49:58 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2005-04-16 15:20:36 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2007-10-29 07:41:32 -07:00
2009-02-25 13:18:47 +11:00
2005-04-16 15:20:36 -07:00