All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
  2019-09-04  8:33 ` Wei Yongjun
  (?)
@ 2019-09-04  8:31   ` Cornelia Huck
  -1 siblings, 0 replies; 8+ messages in thread
From: Cornelia Huck @ 2019-09-04  8:31 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Eric Farman, Halil Pasic, Sebastian Ott, Peter Oberparleiter,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-s390,
	kvm, kernel-janitors

On Wed, 4 Sep 2019 08:33:15 +0000
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the memory alloc failed
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Ah, yes.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

Heiko/Vasily/Christian: can you queue this directly?

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

* Re: [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
@ 2019-09-04  8:31   ` Cornelia Huck
  0 siblings, 0 replies; 8+ messages in thread
From: Cornelia Huck @ 2019-09-04  8:31 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Eric Farman, Halil Pasic, Sebastian Ott, Peter Oberparleiter,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-s390,
	kvm, kernel-janitors

On Wed, 4 Sep 2019 08:33:15 +0000
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the memory alloc failed
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Ah, yes.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

Heiko/Vasily/Christian: can you queue this directly?

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

* Re: [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
@ 2019-09-04  8:31   ` Cornelia Huck
  0 siblings, 0 replies; 8+ messages in thread
From: Cornelia Huck @ 2019-09-04  8:31 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Eric Farman, Halil Pasic, Sebastian Ott, Peter Oberparleiter,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-s390,
	kvm, kernel-janitors

On Wed, 4 Sep 2019 08:33:15 +0000
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> Fix to return negative error code -ENOMEM from the memory alloc failed
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Ah, yes.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

Heiko/Vasily/Christian: can you queue this directly?

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

* [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
  2019-09-04  8:31   ` Cornelia Huck
  (?)
@ 2019-09-04  8:33 ` Wei Yongjun
  -1 siblings, 0 replies; 8+ messages in thread
From: Wei Yongjun @ 2019-09-04  8:33 UTC (permalink / raw)
  To: Cornelia Huck, Eric Farman, Halil Pasic, Sebastian Ott,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger
  Cc: Wei Yongjun, linux-s390, kvm, kernel-janitors

Fix to return negative error code -ENOMEM from the memory alloc failed
error handling case instead of 0, as done elsewhere in this function.

Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 45e792f6afd0..e401a3d0aa57 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -317,15 +317,19 @@ static int __init vfio_ccw_sch_init(void)
 					sizeof(struct ccw_io_region), 0,
 					SLAB_ACCOUNT, 0,
 					sizeof(struct ccw_io_region), NULL);
-	if (!vfio_ccw_io_region)
+	if (!vfio_ccw_io_region) {
+		ret = -ENOMEM;
 		goto out_err;
+	}
 
 	vfio_ccw_cmd_region = kmem_cache_create_usercopy("vfio_ccw_cmd_region",
 					sizeof(struct ccw_cmd_region), 0,
 					SLAB_ACCOUNT, 0,
 					sizeof(struct ccw_cmd_region), NULL);
-	if (!vfio_ccw_cmd_region)
+	if (!vfio_ccw_cmd_region) {
+		ret = -ENOMEM;
 		goto out_err;
+	}
 
 	isc_register(VFIO_CCW_ISC);
 	ret = css_driver_register(&vfio_ccw_sch_driver);

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

* [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
@ 2019-09-04  8:33 ` Wei Yongjun
  0 siblings, 0 replies; 8+ messages in thread
From: Wei Yongjun @ 2019-09-04  8:33 UTC (permalink / raw)
  To: Cornelia Huck, Eric Farman, Halil Pasic, Sebastian Ott,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger
  Cc: Wei Yongjun, linux-s390, kvm, kernel-janitors

Fix to return negative error code -ENOMEM from the memory alloc failed
error handling case instead of 0, as done elsewhere in this function.

Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 45e792f6afd0..e401a3d0aa57 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -317,15 +317,19 @@ static int __init vfio_ccw_sch_init(void)
 					sizeof(struct ccw_io_region), 0,
 					SLAB_ACCOUNT, 0,
 					sizeof(struct ccw_io_region), NULL);
-	if (!vfio_ccw_io_region)
+	if (!vfio_ccw_io_region) {
+		ret = -ENOMEM;
 		goto out_err;
+	}
 
 	vfio_ccw_cmd_region = kmem_cache_create_usercopy("vfio_ccw_cmd_region",
 					sizeof(struct ccw_cmd_region), 0,
 					SLAB_ACCOUNT, 0,
 					sizeof(struct ccw_cmd_region), NULL);
-	if (!vfio_ccw_cmd_region)
+	if (!vfio_ccw_cmd_region) {
+		ret = -ENOMEM;
 		goto out_err;
+	}
 
 	isc_register(VFIO_CCW_ISC);
 	ret = css_driver_register(&vfio_ccw_sch_driver);

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

* [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
@ 2019-09-04  8:33 ` Wei Yongjun
  0 siblings, 0 replies; 8+ messages in thread
From: Wei Yongjun @ 2019-09-04  8:33 UTC (permalink / raw)
  To: Cornelia Huck, Eric Farman, Halil Pasic, Sebastian Ott,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger
  Cc: Wei Yongjun, linux-s390, kvm, kernel-janitors

Fix to return negative error code -ENOMEM from the memory alloc failed
error handling case instead of 0, as done elsewhere in this function.

Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
index 45e792f6afd0..e401a3d0aa57 100644
--- a/drivers/s390/cio/vfio_ccw_drv.c
+++ b/drivers/s390/cio/vfio_ccw_drv.c
@@ -317,15 +317,19 @@ static int __init vfio_ccw_sch_init(void)
 					sizeof(struct ccw_io_region), 0,
 					SLAB_ACCOUNT, 0,
 					sizeof(struct ccw_io_region), NULL);
-	if (!vfio_ccw_io_region)
+	if (!vfio_ccw_io_region) {
+		ret = -ENOMEM;
 		goto out_err;
+	}
 
 	vfio_ccw_cmd_region = kmem_cache_create_usercopy("vfio_ccw_cmd_region",
 					sizeof(struct ccw_cmd_region), 0,
 					SLAB_ACCOUNT, 0,
 					sizeof(struct ccw_cmd_region), NULL);
-	if (!vfio_ccw_cmd_region)
+	if (!vfio_ccw_cmd_region) {
+		ret = -ENOMEM;
 		goto out_err;
+	}
 
 	isc_register(VFIO_CCW_ISC);
 	ret = css_driver_register(&vfio_ccw_sch_driver);




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

* Re: [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
  2019-09-04  8:33 ` Wei Yongjun
@ 2019-09-04 13:58   ` Christian Borntraeger
  -1 siblings, 0 replies; 8+ messages in thread
From: Christian Borntraeger @ 2019-09-04 13:58 UTC (permalink / raw)
  To: Wei Yongjun, Cornelia Huck, Eric Farman, Halil Pasic,
	Sebastian Ott, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik
  Cc: linux-s390, kvm, kernel-janitors



On 04.09.19 10:33, Wei Yongjun wrote:
> Fix to return negative error code -ENOMEM from the memory alloc failed
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

thanks applied to s390 tree. 

> ---
>  drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
> index 45e792f6afd0..e401a3d0aa57 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -317,15 +317,19 @@ static int __init vfio_ccw_sch_init(void)
>  					sizeof(struct ccw_io_region), 0,
>  					SLAB_ACCOUNT, 0,
>  					sizeof(struct ccw_io_region), NULL);
> -	if (!vfio_ccw_io_region)
> +	if (!vfio_ccw_io_region) {
> +		ret = -ENOMEM;
>  		goto out_err;
> +	}
>  
>  	vfio_ccw_cmd_region = kmem_cache_create_usercopy("vfio_ccw_cmd_region",
>  					sizeof(struct ccw_cmd_region), 0,
>  					SLAB_ACCOUNT, 0,
>  					sizeof(struct ccw_cmd_region), NULL);
> -	if (!vfio_ccw_cmd_region)
> +	if (!vfio_ccw_cmd_region) {
> +		ret = -ENOMEM;
>  		goto out_err;
> +	}
>  
>  	isc_register(VFIO_CCW_ISC);
>  	ret = css_driver_register(&vfio_ccw_sch_driver);
> 
> 
> 

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

* Re: [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init()
@ 2019-09-04 13:58   ` Christian Borntraeger
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Borntraeger @ 2019-09-04 13:58 UTC (permalink / raw)
  To: Wei Yongjun, Cornelia Huck, Eric Farman, Halil Pasic,
	Sebastian Ott, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik
  Cc: linux-s390, kvm, kernel-janitors



On 04.09.19 10:33, Wei Yongjun wrote:
> Fix to return negative error code -ENOMEM from the memory alloc failed
> error handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 60e05d1cf087 ("vfio-ccw: add some logging")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

thanks applied to s390 tree. 

> ---
>  drivers/s390/cio/vfio_ccw_drv.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_drv.c b/drivers/s390/cio/vfio_ccw_drv.c
> index 45e792f6afd0..e401a3d0aa57 100644
> --- a/drivers/s390/cio/vfio_ccw_drv.c
> +++ b/drivers/s390/cio/vfio_ccw_drv.c
> @@ -317,15 +317,19 @@ static int __init vfio_ccw_sch_init(void)
>  					sizeof(struct ccw_io_region), 0,
>  					SLAB_ACCOUNT, 0,
>  					sizeof(struct ccw_io_region), NULL);
> -	if (!vfio_ccw_io_region)
> +	if (!vfio_ccw_io_region) {
> +		ret = -ENOMEM;
>  		goto out_err;
> +	}
>  
>  	vfio_ccw_cmd_region = kmem_cache_create_usercopy("vfio_ccw_cmd_region",
>  					sizeof(struct ccw_cmd_region), 0,
>  					SLAB_ACCOUNT, 0,
>  					sizeof(struct ccw_cmd_region), NULL);
> -	if (!vfio_ccw_cmd_region)
> +	if (!vfio_ccw_cmd_region) {
> +		ret = -ENOMEM;
>  		goto out_err;
> +	}
>  
>  	isc_register(VFIO_CCW_ISC);
>  	ret = css_driver_register(&vfio_ccw_sch_driver);
> 
> 
> 

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

end of thread, other threads:[~2019-09-04 13:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04  8:33 [PATCH -next] vfio-ccw: fix error return code in vfio_ccw_sch_init() Wei Yongjun
2019-09-04  8:33 ` Wei Yongjun
2019-09-04  8:33 ` Wei Yongjun
2019-09-04  8:31 ` Cornelia Huck
2019-09-04  8:31   ` Cornelia Huck
2019-09-04  8:31   ` Cornelia Huck
2019-09-04 13:58 ` Christian Borntraeger
2019-09-04 13:58   ` Christian Borntraeger

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.