Details

[Home]

Issue of the Implementation # L0298

Brief

loop: fix to a race condition due to the early registration of device

Detailed Description

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>

Component

linux-kernel 4.14

Accepted

https://lkml.org/lkml/2017/8/7/390
commit

Status

Fixed in kernel v4.14-rc1

[Home]