linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit
@ 2019-04-24 19:23 Eugeniu Rosca
  2019-05-01 16:17 ` Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eugeniu Rosca @ 2019-04-24 19:23 UTC (permalink / raw)
  To: Christian Gromm, Greg Kroah-Hartman, devel, linux-kernel
  Cc: Andrey Shvetsov, Dan Carpenter, Colin Ian King, Takashi Sakamoto,
	Takashi Iwai, Marcin Ciupak, Suresh Udipi, Eugeniu Rosca,
	Eugeniu Rosca

From: Suresh Udipi <sudipi@jp.adit-jv.com>

It looks like v4.18-rc1 commit [0] which upstreams mld-1.8.0
commit [1] missed to fix the memory leak in mod_exit function.

Do it now.

[0] aba258b7310167 ("staging: most: cdev: fix chrdev_region leak")
[1] https://github.com/microchip-ais/linux/commit/a2d8f7ae7ea381
    ("staging: most: cdev: fix leak for chrdev_region")

Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
 drivers/staging/most/cdev/cdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index f2b347cda8b7..d5f236889021 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -549,7 +549,7 @@ static void __exit mod_exit(void)
 		destroy_cdev(c);
 		destroy_channel(c);
 	}
-	unregister_chrdev_region(comp.devno, 1);
+	unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE);
 	ida_destroy(&comp.minor_id);
 	class_destroy(comp.class);
 }
-- 
2.21.0


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

* Re: [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit
  2019-04-24 19:23 [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit Eugeniu Rosca
@ 2019-05-01 16:17 ` Greg Kroah-Hartman
  2019-05-02  8:02 ` Christian.Gromm
  2019-05-02 17:39 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2019-05-01 16:17 UTC (permalink / raw)
  To: Eugeniu Rosca
  Cc: Christian Gromm, devel, linux-kernel, Andrey Shvetsov,
	Dan Carpenter, Colin Ian King, Takashi Sakamoto, Takashi Iwai,
	Marcin Ciupak, Suresh Udipi, Eugeniu Rosca

On Wed, Apr 24, 2019 at 09:23:43PM +0200, Eugeniu Rosca wrote:
> From: Suresh Udipi <sudipi@jp.adit-jv.com>
> 
> It looks like v4.18-rc1 commit [0] which upstreams mld-1.8.0
> commit [1] missed to fix the memory leak in mod_exit function.
> 
> Do it now.
> 
> [0] aba258b7310167 ("staging: most: cdev: fix chrdev_region leak")
> [1] https://github.com/microchip-ais/linux/commit/a2d8f7ae7ea381
>     ("staging: most: cdev: fix leak for chrdev_region")
> 
> Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> ---
>  drivers/staging/most/cdev/cdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Christian, I'd like your ack/review on this before applying it.

thanks,

greg k-h

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

* Re: [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit
  2019-04-24 19:23 [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit Eugeniu Rosca
  2019-05-01 16:17 ` Greg Kroah-Hartman
@ 2019-05-02  8:02 ` Christian.Gromm
  2019-05-02 17:39 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 5+ messages in thread
From: Christian.Gromm @ 2019-05-02  8:02 UTC (permalink / raw)
  To: erosca, linux-kernel, gregkh, devel
  Cc: dan.carpenter, sudipi, o-takashi, colin.king, andrey.shvetsov,
	tiwai, roscaeugeniu, marcin.s.ciupak

On Mi, 2019-04-24 at 21:23 +0200, Eugeniu Rosca wrote:
> External E-Mail
> 
> 
> From: Suresh Udipi <sudipi@jp.adit-jv.com>
> 
> It looks like v4.18-rc1 commit [0] which upstreams mld-1.8.0
> commit [1] missed to fix the memory leak in mod_exit function.
> 
> Do it now.
> 
> [0] aba258b7310167 ("staging: most: cdev: fix chrdev_region leak")
> [1] https://github.com/microchip-ais/linux/commit/a2d8f7ae7ea381
>     ("staging: most: cdev: fix leak for chrdev_region")
> 
> Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>

Acked-by: Christian Gromm <christian.gromm@microchip.com>

> ---
>  drivers/staging/most/cdev/cdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/most/cdev/cdev.c
> b/drivers/staging/most/cdev/cdev.c
> index f2b347cda8b7..d5f236889021 100644
> --- a/drivers/staging/most/cdev/cdev.c
> +++ b/drivers/staging/most/cdev/cdev.c
> @@ -549,7 +549,7 @@ static void __exit mod_exit(void)
>  		destroy_cdev(c);
>  		destroy_channel(c);
>  	}
> -	unregister_chrdev_region(comp.devno, 1);
> +	unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE);
>  	ida_destroy(&comp.minor_id);
>  	class_destroy(comp.class);
>  }

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

* Re: [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit
  2019-04-24 19:23 [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit Eugeniu Rosca
  2019-05-01 16:17 ` Greg Kroah-Hartman
  2019-05-02  8:02 ` Christian.Gromm
@ 2019-05-02 17:39 ` Greg Kroah-Hartman
  2019-05-03  7:40   ` Eugeniu Rosca
  2 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2019-05-02 17:39 UTC (permalink / raw)
  To: Eugeniu Rosca
  Cc: Christian Gromm, devel, linux-kernel, Andrey Shvetsov,
	Dan Carpenter, Colin Ian King, Takashi Sakamoto, Takashi Iwai,
	Marcin Ciupak, Suresh Udipi, Eugeniu Rosca

On Wed, Apr 24, 2019 at 09:23:43PM +0200, Eugeniu Rosca wrote:
> From: Suresh Udipi <sudipi@jp.adit-jv.com>
> 
> It looks like v4.18-rc1 commit [0] which upstreams mld-1.8.0
> commit [1] missed to fix the memory leak in mod_exit function.
> 
> Do it now.
> 
> [0] aba258b7310167 ("staging: most: cdev: fix chrdev_region leak")
> [1] https://github.com/microchip-ais/linux/commit/a2d8f7ae7ea381
>     ("staging: most: cdev: fix leak for chrdev_region")
> 
> Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> Acked-by: Christian Gromm <christian.gromm@microchip.com>

In the future, please use the "correct" way to mark a fixup patch.  For
this, it would be:
Fixes: aba258b73101 ("staging: most: cdev: fix chrdev_region leak")

I'll go add it, and the needed stable tag to the patch when applying it.

thanks,

greg k-h

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

* Re: [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit
  2019-05-02 17:39 ` Greg Kroah-Hartman
@ 2019-05-03  7:40   ` Eugeniu Rosca
  0 siblings, 0 replies; 5+ messages in thread
From: Eugeniu Rosca @ 2019-05-03  7:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Christian Gromm, devel, linux-kernel, Andrey Shvetsov,
	Dan Carpenter, Colin Ian King, Takashi Sakamoto, Takashi Iwai,
	Marcin Ciupak, Suresh Udipi, Eugeniu Rosca, Eugeniu Rosca

On Thu, May 02, 2019 at 07:39:20PM +0200, Greg Kroah-Hartman wrote:
> On Wed, Apr 24, 2019 at 09:23:43PM +0200, Eugeniu Rosca wrote:
> > From: Suresh Udipi <sudipi@jp.adit-jv.com>
> > 
> > It looks like v4.18-rc1 commit [0] which upstreams mld-1.8.0
> > commit [1] missed to fix the memory leak in mod_exit function.
> > 
> > Do it now.
> > 
> > [0] aba258b7310167 ("staging: most: cdev: fix chrdev_region leak")
> > [1] https://github.com/microchip-ais/linux/commit/a2d8f7ae7ea381
> >     ("staging: most: cdev: fix leak for chrdev_region")
> > 
> > Signed-off-by: Suresh Udipi <sudipi@jp.adit-jv.com>
> > Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> > Acked-by: Christian Gromm <christian.gromm@microchip.com>
> 
> In the future, please use the "correct" way to mark a fixup patch.  For
> this, it would be:
> Fixes: aba258b73101 ("staging: most: cdev: fix chrdev_region leak")
> 
> I'll go add it, and the needed stable tag to the patch when applying it.

Thank you for the suggestion. I'll follow it next time.

> 
> thanks,
> 
> greg k-h

-- 
Best Regards,
Eugeniu.

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

end of thread, other threads:[~2019-05-03  7:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 19:23 [PATCH] staging: most: cdev: fix chrdev_region leak in mod_exit Eugeniu Rosca
2019-05-01 16:17 ` Greg Kroah-Hartman
2019-05-02  8:02 ` Christian.Gromm
2019-05-02 17:39 ` Greg Kroah-Hartman
2019-05-03  7:40   ` Eugeniu Rosca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).