Anton Volkov a8c1d064d3 loop: fix to a race condition due to the early registration of device
The early device registration made possible a race leading to allocations
of disks with wrong minors.

This patch moves the device registration further down the loop_init
function to make the race infeasible.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Volkov <avolkov@ispras.ru>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-08-15 12:49:20 -06:00
..
2017-07-10 16:32:34 -07:00
2017-02-22 11:54:49 -07:00
2017-07-06 12:23:51 -06:00
2017-02-21 11:51:42 -08:00
2017-05-05 18:49:20 -07:00
2017-06-08 08:40:00 -06:00
2017-04-19 09:10:51 -06:00
2017-07-25 13:58:34 -06:00
2017-07-03 20:27:48 -07:00
2017-02-20 12:16:15 +01:00