Files
rockchip-kernel/drivers/md
Joe Thornber 09edef606e dm io: fix a race condition in the wake up code for sync_io
commit 10f1d5d111 upstream.

There's a race condition between the atomic_dec_and_test(&io->count)
in dec_count() and the waking of the sync_io() thread.  If the thread
is spuriously woken immediately after the decrement it may exit,
making the on stack io struct invalid, yet the dec_count could still
be using it.

Fix this race by using a completion in sync_io() and dec_count().

Reported-by: Minfei Huang <huangminfei@ucloud.cn>
Signed-off-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 15:58:02 -07:00
..
2014-02-06 11:08:16 -08:00
2013-04-24 11:42:41 +10:00
2013-03-01 22:45:51 +00:00
2013-03-01 22:45:51 +00:00
2012-03-28 18:41:29 +01:00
2013-03-01 22:45:51 +00:00
2012-07-30 17:25:16 -07:00
2014-02-13 13:48:02 -08:00
2013-03-01 22:45:47 +00:00
2014-02-13 13:48:02 -08:00
2014-02-13 13:48:02 -08:00
2013-03-23 14:15:29 -07:00
2014-02-13 13:48:02 -08:00
2013-03-23 14:15:29 -07:00
2014-02-13 13:48:02 -08:00