From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH 1/1] virtio: rng: disallow multiple device registrations, fixes crashes Date: Thu, 07 Mar 2013 12:06:31 +1100 Message-ID: <8762149fxk.fsf@rustcorp.com.au> References: <58c84c464bca72f80fec188f0ae0269058c6cf03.1362557573.git.amit.shah@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <58c84c464bca72f80fec188f0ae0269058c6cf03.1362557573.git.amit.shah@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Virtualization List Cc: Amit Shah List-Id: virtualization@lists.linuxfoundation.org Amit Shah writes: > 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 > --- > > Also valid for stable? Yes. We could fix virtio-rng to allow multiple rngs, but of course it will fail anyway since hwrng wants unique names. And changing the name to be virtio-%u will probably break things, for no real upside. Applied, and Cc:stable added. Thanks, Rusty.