All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Andreas Oetken <ennoerlangen@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	Andreas Oetken <andreas.oetken@siemens-energy.com>
Subject: Re: [PATCH] drivers: mtd: Fixed breaking list in __mtd_del_partition.
Date: Tue, 26 Oct 2021 09:31:41 +0200	[thread overview]
Message-ID: <20211026093141.64be4e38@xps13> (raw)
In-Reply-To: <20211025205724.3306739-1-andreas.oetken@siemens-energy.com>

Hi Andreas,

ennoerlangen@gmail.com wrote on Mon, 25 Oct 2021 22:57:24 +0200:

> Not the child partition should be removed from the partition list
> but the partition itself. Otherwise the partition list gets broken
> and any subsequent remove operations leads to a kernel panic.
> 

Can you please Add a couple of Fixes: + Cc: stable tags?

> Signed-off-by: Andreas Oetken <andreas.oetken@siemens-energy.com>
> ---
>  drivers/mtd/mtdpart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
> index 95d47422bbf20..5725818fa199f 100644
> --- a/drivers/mtd/mtdpart.c
> +++ b/drivers/mtd/mtdpart.c
> @@ -313,7 +313,7 @@ static int __mtd_del_partition(struct mtd_info *mtd)
>  	if (err)
>  		return err;
>  
> -	list_del(&child->part.node);
> +	list_del(&mtd->part.node);
>  	free_partition(mtd);
>  
>  	return 0;


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Andreas Oetken <ennoerlangen@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	Andreas Oetken <andreas.oetken@siemens-energy.com>
Subject: Re: [PATCH] drivers: mtd: Fixed breaking list in __mtd_del_partition.
Date: Tue, 26 Oct 2021 09:31:41 +0200	[thread overview]
Message-ID: <20211026093141.64be4e38@xps13> (raw)
In-Reply-To: <20211025205724.3306739-1-andreas.oetken@siemens-energy.com>

Hi Andreas,

ennoerlangen@gmail.com wrote on Mon, 25 Oct 2021 22:57:24 +0200:

> Not the child partition should be removed from the partition list
> but the partition itself. Otherwise the partition list gets broken
> and any subsequent remove operations leads to a kernel panic.
> 

Can you please Add a couple of Fixes: + Cc: stable tags?

> Signed-off-by: Andreas Oetken <andreas.oetken@siemens-energy.com>
> ---
>  drivers/mtd/mtdpart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
> index 95d47422bbf20..5725818fa199f 100644
> --- a/drivers/mtd/mtdpart.c
> +++ b/drivers/mtd/mtdpart.c
> @@ -313,7 +313,7 @@ static int __mtd_del_partition(struct mtd_info *mtd)
>  	if (err)
>  		return err;
>  
> -	list_del(&child->part.node);
> +	list_del(&mtd->part.node);
>  	free_partition(mtd);
>  
>  	return 0;


Thanks,
Miquèl

  reply	other threads:[~2021-10-26  7:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 20:57 [PATCH] drivers: mtd: Fixed breaking list in __mtd_del_partition Andreas Oetken
2021-10-25 20:57 ` Andreas Oetken
2021-10-26  7:31 ` Miquel Raynal [this message]
2021-10-26  7:31   ` Miquel Raynal
  -- strict thread matches above, loose matches on Subject: below --
2021-10-26  8:46 Andreas Oetken
2021-10-26  8:46 ` Andreas Oetken

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211026093141.64be4e38@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=andreas.oetken@siemens-energy.com \
    --cc=ennoerlangen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.