Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533794
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' |
| Date | 2016-12-01 05:50 +0100 |
| Message-ID | <sJrtL-7pP-1@gated-at.bofh.it> (permalink) |
| References | <sJ7bH-2YL-3@gated-at.bofh.it> <sJg5j-8ux-7@gated-at.bofh.it> <sJhNL-1aw-23@gated-at.bofh.it> <sJhXr-1dw-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 12/1/2016 12:09 AM, Alex Williamson wrote:
> On Wed, 30 Nov 2016 21:27:07 +0300
> Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
>> On Wed, Nov 30, 2016 at 09:36:46AM -0700, Alex Williamson wrote:
>>> On Wed, 30 Nov 2016 08:06:12 +0100
>>> Christophe JAILLET <christophe.jaillet@wanadoo.fr> wrote:
>>>
>>>> 'vfio_group_get_from_dev()' seems to return only NULL on error, not an error
>>>> pointer.
>>>>
>>>> Fixes: 2169037dc322 ("vfio iommu: Added pin and unpin callback functions to vfio_iommu_driver_ops")
>>>> Fixes: c086de818dd8 ("vfio iommu: Add blocking notifier to notify DMA_UNMAP")
>>>>
>>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>>> ---
>>>
>>> Dan Carpenter proposed a nearly identical patch:
>>>
>>> http://www.spinics.net/lists/kvm/msg141468.html
>>>
>>> The difference is you return -ENODEV while Dan returns -EINVAL. I tend
>>> to prefer -ENODEV to distinguish this error case versus validation of
>>> the other parameters. This patch also identifies both commits
>>> introducing these, so I'm inclined to take this one rather than Dan's
>>> version.
Agree with you Alex. This version looks better.
Thanks,
Kirti
>>> Dan & Kirti, I welcome any credits you'd like to apply to
>>> this patch for identifying and reviewing the same issue. Thanks,
>>>
>>
>> Could I get a Reported-by?
>
> Sure thing, thanks,
>
> Alex
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-11-30 08:10 +0100
Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' Alex Williamson <alex.williamson@redhat.com> - 2016-11-30 17:40 +0100
Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' Dan Carpenter <dan.carpenter@oracle.com> - 2016-11-30 19:30 +0100
Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' Alex Williamson <alex.williamson@redhat.com> - 2016-11-30 19:40 +0100
Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' Kirti Wankhede <kwankhede@nvidia.com> - 2016-12-01 05:50 +0100
csiph-web