Re: [PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
On Sat, Dec 08, 2012 at 07:01:20PM +0100, Julia Lawall wrote: > From: Julia Lawall > > Using kfree to free data allocated with devm_kzalloc causes double frees. Ugh, actually this doesn't merge down very well against -next at all, can you regenerate against current code please? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
On Mon, Dec 10, 2012 at 07:10:16AM +0100, Julia Lawall wrote: > Sorry, I just resent the patch as is. 1 and 2 were I guess applied, > because I odn't findthe problem any more. It looks like this is what happened the first time round as well - I only got patch 3 but it was flagged as part of a three patch series. Please don't do things like this, it makes the patch look like part of a series which has already been applied but didn't get deleted when it's sitting in an inbox. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
On Mon, 10 Dec 2012, Mark Brown wrote: On Sat, Dec 08, 2012 at 07:01:20PM +0100, Julia Lawall wrote: The kfrees were introduced in b761c0ca. I sent this a few months ago, and I still think it should be applied... I'm missing patches 1 and 2? Sorry, I just resent the patch as is. 1 and 2 were I guess applied, because I odn't findthe problem any more. julia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
On Sat, Dec 08, 2012 at 07:01:20PM +0100, Julia Lawall wrote: > The kfrees were introduced in b761c0ca. > I sent this a few months ago, and I still think it should be applied... I'm missing patches 1 and 2? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
From: Julia Lawall Using kfree to free data allocated with devm_kzalloc causes double frees. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // Signed-off-by: Julia Lawall --- The kfrees were introduced in b761c0ca. I sent this a few months ago, and I still think it should be applied... sound/soc/soc-core.c |2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f81c597..86d7a36 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4136,7 +4136,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, dev_err(card->dev, "Property '%s' index %d could not be read: %d\n", propname, 2 * i, ret); - kfree(routes); return -EINVAL; } ret = of_property_read_string_index(np, propname, @@ -4145,7 +4144,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, dev_err(card->dev, "Property '%s' index %d could not be read: %d\n", propname, (2 * i) + 1, ret); - kfree(routes); return -EINVAL; } } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
On Sat, Aug 04, 2012 at 02:00:32PM +0200, Julia Lawall wrote: > From: Julia Lawall > > Using kfree to free data allocated with devm_kzalloc causes double frees. > > The semantic patch that fixes this problem is as follows: > (http://coccinelle.lip6.fr/) Might it make more sense to devm_kfree() them? If we don't expect to immediately abort driver instantiation it'll save having them lying around for the entire lifetime of the device even if they're not strictly leaked. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] sound/soc/soc-core.c: drop kfree of devm_kzalloc's data
From: Julia Lawall Using kfree to free data allocated with devm_kzalloc causes double frees. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // Signed-off-by: Julia Lawall --- The kfrees were introduced in b761c0ca. sound/soc/soc-core.c |2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f81c597..86d7a36 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4136,7 +4136,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, dev_err(card->dev, "Property '%s' index %d could not be read: %d\n", propname, 2 * i, ret); - kfree(routes); return -EINVAL; } ret = of_property_read_string_index(np, propname, @@ -4145,7 +4144,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, dev_err(card->dev, "Property '%s' index %d could not be read: %d\n", propname, (2 * i) + 1, ret); - kfree(routes); return -EINVAL; } } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/