All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
@ 2016-11-30  7:06 ` Christophe JAILLET
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2016-11-30  7:06 UTC (permalink / raw)
  To: alex.williamson; +Cc: kvm, linux-kernel, kernel-janitors, Christophe JAILLET

'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>
---
This could be split in 2 patches in order to have only one Fixes tag in
each
---
 drivers/vfio/vfio.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 0aac3ca54a53..7b39313abf0d 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -1933,8 +1933,8 @@ int vfio_pin_pages(struct device *dev, unsigned long *user_pfn, int npage,
 		return -E2BIG;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
@@ -1982,8 +1982,8 @@ int vfio_unpin_pages(struct device *dev, unsigned long *user_pfn, int npage)
 		return -E2BIG;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
@@ -2019,8 +2019,8 @@ int vfio_register_notifier(struct device *dev, struct notifier_block *nb)
 		return -EINVAL;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
@@ -2055,8 +2055,8 @@ int vfio_unregister_notifier(struct device *dev, struct notifier_block *nb)
 		return -EINVAL;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
@ 2016-11-30  7:06 ` Christophe JAILLET
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe JAILLET @ 2016-11-30  7:06 UTC (permalink / raw)
  To: alex.williamson; +Cc: kvm, linux-kernel, kernel-janitors, Christophe JAILLET

'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>
---
This could be split in 2 patches in order to have only one Fixes tag in
each
---
 drivers/vfio/vfio.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 0aac3ca54a53..7b39313abf0d 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -1933,8 +1933,8 @@ int vfio_pin_pages(struct device *dev, unsigned long *user_pfn, int npage,
 		return -E2BIG;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
@@ -1982,8 +1982,8 @@ int vfio_unpin_pages(struct device *dev, unsigned long *user_pfn, int npage)
 		return -E2BIG;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
@@ -2019,8 +2019,8 @@ int vfio_register_notifier(struct device *dev, struct notifier_block *nb)
 		return -EINVAL;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
@@ -2055,8 +2055,8 @@ int vfio_unregister_notifier(struct device *dev, struct notifier_block *nb)
 		return -EINVAL;
 
 	group = vfio_group_get_from_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	if (!group)
+		return -ENODEV;
 
 	ret = vfio_group_add_container_user(group);
 	if (ret)
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
  2016-11-30  7:06 ` Christophe JAILLET
@ 2016-11-30 16:36   ` Alex Williamson
  -1 siblings, 0 replies; 10+ messages in thread
From: Alex Williamson @ 2016-11-30 16:36 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kvm, linux-kernel, kernel-janitors, Dan Carpenter, Kirti Wankhede

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.  Dan & Kirti, I welcome any credits you'd like to apply to
this patch for identifying and reviewing the same issue.  Thanks,

Alex

> This could be split in 2 patches in order to have only one Fixes tag in
> each
> ---
>  drivers/vfio/vfio.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 0aac3ca54a53..7b39313abf0d 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -1933,8 +1933,8 @@ int vfio_pin_pages(struct device *dev, unsigned long *user_pfn, int npage,
>  		return -E2BIG;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)
> @@ -1982,8 +1982,8 @@ int vfio_unpin_pages(struct device *dev, unsigned long *user_pfn, int npage)
>  		return -E2BIG;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)
> @@ -2019,8 +2019,8 @@ int vfio_register_notifier(struct device *dev, struct notifier_block *nb)
>  		return -EINVAL;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)
> @@ -2055,8 +2055,8 @@ int vfio_unregister_notifier(struct device *dev, struct notifier_block *nb)
>  		return -EINVAL;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
@ 2016-11-30 16:36   ` Alex Williamson
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Williamson @ 2016-11-30 16:36 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kvm, linux-kernel, kernel-janitors, Dan Carpenter, Kirti Wankhede

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.  Dan & Kirti, I welcome any credits you'd like to apply to
this patch for identifying and reviewing the same issue.  Thanks,

Alex

> This could be split in 2 patches in order to have only one Fixes tag in
> each
> ---
>  drivers/vfio/vfio.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 0aac3ca54a53..7b39313abf0d 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -1933,8 +1933,8 @@ int vfio_pin_pages(struct device *dev, unsigned long *user_pfn, int npage,
>  		return -E2BIG;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)
> @@ -1982,8 +1982,8 @@ int vfio_unpin_pages(struct device *dev, unsigned long *user_pfn, int npage)
>  		return -E2BIG;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)
> @@ -2019,8 +2019,8 @@ int vfio_register_notifier(struct device *dev, struct notifier_block *nb)
>  		return -EINVAL;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)
> @@ -2055,8 +2055,8 @@ int vfio_unregister_notifier(struct device *dev, struct notifier_block *nb)
>  		return -EINVAL;
>  
>  	group = vfio_group_get_from_dev(dev);
> -	if (IS_ERR(group))
> -		return PTR_ERR(group);
> +	if (!group)
> +		return -ENODEV;
>  
>  	ret = vfio_group_add_container_user(group);
>  	if (ret)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
  2016-11-30 16:36   ` Alex Williamson
@ 2016-11-30 18:27     ` Dan Carpenter
  -1 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-11-30 18:27 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Christophe JAILLET, kvm, linux-kernel, kernel-janitors, Kirti Wankhede

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.  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?

thanks,
dan carpenter

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
@ 2016-11-30 18:27     ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-11-30 18:27 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Christophe JAILLET, kvm, linux-kernel, kernel-janitors, Kirti Wankhede

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.  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?

thanks,
dan carpenter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
  2016-11-30 18:27     ` Dan Carpenter
@ 2016-11-30 18:39       ` Alex Williamson
  -1 siblings, 0 replies; 10+ messages in thread
From: Alex Williamson @ 2016-11-30 18:39 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Christophe JAILLET, kvm, linux-kernel, kernel-janitors, Kirti Wankhede

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.  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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
@ 2016-11-30 18:39       ` Alex Williamson
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Williamson @ 2016-11-30 18:39 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Christophe JAILLET, kvm, linux-kernel, kernel-janitors, Kirti Wankhede

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.  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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
  2016-11-30 18:39       ` Alex Williamson
@ 2016-12-01  4:48         ` Kirti Wankhede
  -1 siblings, 0 replies; 10+ messages in thread
From: Kirti Wankhede @ 2016-12-01  4:48 UTC (permalink / raw)
  To: Alex Williamson, Dan Carpenter
  Cc: Christophe JAILLET, kvm, linux-kernel, kernel-janitors



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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'
@ 2016-12-01  4:48         ` Kirti Wankhede
  0 siblings, 0 replies; 10+ messages in thread
From: Kirti Wankhede @ 2016-12-01  4:48 UTC (permalink / raw)
  To: Alex Williamson, Dan Carpenter
  Cc: Christophe JAILLET, kvm, linux-kernel, kernel-janitors



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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-12-01  4:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30  7:06 [PATCH] vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' Christophe JAILLET
2016-11-30  7:06 ` Christophe JAILLET
2016-11-30 16:36 ` Alex Williamson
2016-11-30 16:36   ` Alex Williamson
2016-11-30 18:27   ` Dan Carpenter
2016-11-30 18:27     ` Dan Carpenter
2016-11-30 18:39     ` Alex Williamson
2016-11-30 18:39       ` Alex Williamson
2016-12-01  4:48       ` Kirti Wankhede
2016-12-01  4:48         ` Kirti Wankhede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.