mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] nand-bb: Fix remove of nand-bb device.
@ 2012-11-19 13:22 Juergen Kilb
  2012-11-20  7:25 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Kilb @ 2012-11-19 13:22 UTC (permalink / raw)
  To: barebox

Fixed possible crashs if nand-bb device is removed
and the list entry was not deleted from the list.

Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>
---
 drivers/mtd/nand/nand-bb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c
index cdb4663..0292f2f 100644
--- a/drivers/mtd/nand/nand-bb.c
+++ b/drivers/mtd/nand/nand-bb.c
@@ -314,6 +314,7 @@ int dev_remove_bb_dev(const char *name)
 		if (!strcmp(bb->cdev.name, name)) {
 			devfs_remove(&bb->cdev);
 			cdev_close(bb->cdev_parent);
+			list_del_init(&bb->list);
 			free(bb);
 			return 0;
 		}
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] nand-bb: Fix remove of nand-bb device.
  2012-11-19 13:22 [PATCH] nand-bb: Fix remove of nand-bb device Juergen Kilb
@ 2012-11-20  7:25 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-11-20  7:25 UTC (permalink / raw)
  To: Juergen Kilb; +Cc: barebox

On Mon, Nov 19, 2012 at 02:22:05PM +0100, Juergen Kilb wrote:
> Fixed possible crashs if nand-bb device is removed
> and the list entry was not deleted from the list.
> 
> Signed-off-by: Juergen Kilb <J.Kilb@phytec.de>

Applied, thanks

Sascha

> ---
>  drivers/mtd/nand/nand-bb.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c
> index cdb4663..0292f2f 100644
> --- a/drivers/mtd/nand/nand-bb.c
> +++ b/drivers/mtd/nand/nand-bb.c
> @@ -314,6 +314,7 @@ int dev_remove_bb_dev(const char *name)
>  		if (!strcmp(bb->cdev.name, name)) {
>  			devfs_remove(&bb->cdev);
>  			cdev_close(bb->cdev_parent);
> +			list_del_init(&bb->list);
>  			free(bb);
>  			return 0;
>  		}
> -- 
> 1.7.0.4
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-11-20  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-19 13:22 [PATCH] nand-bb: Fix remove of nand-bb device Juergen Kilb
2012-11-20  7:25 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox