Skip to content
Commit e84e7a56 authored by Amit Shah's avatar Amit Shah Committed by Rusty Russell
Browse files

virtio: rng: disallow multiple device registrations, fixes crashes



The code currently only supports one virtio-rng device at a time.
Invoking guests with multiple devices causes the guest to blow up.

Check if we've already registered and initialised the driver.  Also
cleanup in case of registration errors or hot-unplug so that a new
device can be used.

Reported-by: default avatarPeter Krempa <pkrempa@redhat.com>
Reported-by: default avatar <yunzheng@redhat.com>
Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
parent f7f154f1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment