[PATCH] vfio: Fix bug in vfio_device_get_from_name()

2015-11-04 Thread Joerg Roedel
From: Joerg Roedel The vfio_device_get_from_name() function might return a non-NULL pointer, when called with a device name that is not found in the list. This causes undefined behavior, in my case calling an invalid function pointer later on: kernel tried to execute

Re: [PATCH] vfio: Fix bug in vfio_device_get_from_name()

2015-11-04 Thread Alex Williamson
On Wed, 2015-11-04 at 13:53 +0100, Joerg Roedel wrote: > From: Joerg Roedel > > The vfio_device_get_from_name() function might return a > non-NULL pointer, when called with a device name that is not > found in the list. This causes undefined behavior, in my > case calling an