From: Amit Shah Date: Fri, 8 Mar 2013 00:30:18 +0000 (+1100) Subject: virtio: rng: disallow multiple device registrations, fixes crashes X-Git-Tag: v3.9-rc3~24^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e84e7a56a3aa2963db506299e29a5f3f09377f9b;p=pandora-kernel.git 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: Peter Krempa Reported-by: Signed-off-by: Amit Shah Signed-off-by: Rusty Russell Cc: stable@kernel.org --- Reading git-diff-tree failed