* [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation
[not found] <1438934377-4922-1-git-send-email-a.hajda@samsung.com>
@ 2015-08-07 7:59 ` Andrzej Hajda
2015-08-07 19:46 ` Nathan Fontenot
2015-08-19 23:14 ` [05/31] " Michael Ellerman
2015-08-07 7:59 ` [PATCH 06/31] arch/powerpc/pseries: " Andrzej Hajda
1 sibling, 2 replies; 6+ messages in thread
From: Andrzej Hajda @ 2015-08-07 7:59 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
linux-kernel, linuxppc-dev
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
arch/powerpc/kernel/nvram_64.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 1e703f8..6f6597b 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -541,10 +541,9 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,
time->tv_sec = be64_to_cpu(oops_hdr->timestamp);
time->tv_nsec = 0;
}
- *buf = kmalloc(length, GFP_KERNEL);
+ *buf = kmemdup(buff + hdr_size, length, GFP_KERNEL);
if (*buf == NULL)
return -ENOMEM;
- memcpy(*buf, buff + hdr_size, length);
kfree(buff);
if (err_type == ERR_TYPE_KERNEL_PANIC_GZ)
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 06/31] arch/powerpc/pseries: use kmemdup rather than duplicating its implementation
[not found] <1438934377-4922-1-git-send-email-a.hajda@samsung.com>
2015-08-07 7:59 ` [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation Andrzej Hajda
@ 2015-08-07 7:59 ` Andrzej Hajda
2015-08-07 19:46 ` Nathan Fontenot
2015-08-19 23:14 ` [06/31] " Michael Ellerman
1 sibling, 2 replies; 6+ messages in thread
From: Andrzej Hajda @ 2015-08-07 7:59 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
linux-kernel, linuxppc-dev
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
arch/powerpc/platforms/pseries/hotplug-memory.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index 0ced387..e9ff44c 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -92,13 +92,12 @@ static struct property *dlpar_clone_drconf_property(struct device_node *dn)
return NULL;
new_prop->name = kstrdup(prop->name, GFP_KERNEL);
- new_prop->value = kmalloc(prop->length, GFP_KERNEL);
+ new_prop->value = kmemdup(prop->value, prop->length, GFP_KERNEL);
if (!new_prop->name || !new_prop->value) {
dlpar_free_drconf_property(new_prop);
return NULL;
}
- memcpy(new_prop->value, prop->value, prop->length);
new_prop->length = prop->length;
/* Convert the property to cpu endian-ness */
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation
2015-08-07 7:59 ` [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation Andrzej Hajda
@ 2015-08-07 19:46 ` Nathan Fontenot
2015-08-19 23:14 ` [05/31] " Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Nathan Fontenot @ 2015-08-07 19:46 UTC (permalink / raw)
To: Andrzej Hajda, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman
Cc: Marek Szyprowski, linuxppc-dev, linux-kernel,
Bartlomiej Zolnierkiewicz
On 08/07/2015 02:59 AM, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 06/31] arch/powerpc/pseries: use kmemdup rather than duplicating its implementation
2015-08-07 7:59 ` [PATCH 06/31] arch/powerpc/pseries: " Andrzej Hajda
@ 2015-08-07 19:46 ` Nathan Fontenot
2015-08-19 23:14 ` [06/31] " Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Nathan Fontenot @ 2015-08-07 19:46 UTC (permalink / raw)
To: Andrzej Hajda, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman
Cc: Marek Szyprowski, linuxppc-dev, linux-kernel,
Bartlomiej Zolnierkiewicz
On 08/07/2015 02:59 AM, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [06/31] arch/powerpc/pseries: use kmemdup rather than duplicating its implementation
2015-08-07 7:59 ` [PATCH 06/31] arch/powerpc/pseries: " Andrzej Hajda
2015-08-07 19:46 ` Nathan Fontenot
@ 2015-08-19 23:14 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2015-08-19 23:14 UTC (permalink / raw)
To: Andrzej Hajda, Benjamin Herrenschmidt, Paul Mackerras
Cc: Andrzej Hajda, Marek Szyprowski, linuxppc-dev, linux-kernel,
Bartlomiej Zolnierkiewicz
On Fri, 2015-07-08 at 07:59:12 UTC, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/2e16acc5ee3626bcd32e
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation
2015-08-07 7:59 ` [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation Andrzej Hajda
2015-08-07 19:46 ` Nathan Fontenot
@ 2015-08-19 23:14 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Michael Ellerman @ 2015-08-19 23:14 UTC (permalink / raw)
To: Andrzej Hajda, Benjamin Herrenschmidt, Paul Mackerras
Cc: Andrzej Hajda, Marek Szyprowski, linuxppc-dev, linux-kernel,
Bartlomiej Zolnierkiewicz
On Fri, 2015-07-08 at 07:59:11 UTC, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/fc9e9cbf4e48f28525ed
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-19 23:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1438934377-4922-1-git-send-email-a.hajda@samsung.com>
2015-08-07 7:59 ` [PATCH 05/31] arch/powerpc/nvram: use kmemdup rather than duplicating its implementation Andrzej Hajda
2015-08-07 19:46 ` Nathan Fontenot
2015-08-19 23:14 ` [05/31] " Michael Ellerman
2015-08-07 7:59 ` [PATCH 06/31] arch/powerpc/pseries: " Andrzej Hajda
2015-08-07 19:46 ` Nathan Fontenot
2015-08-19 23:14 ` [06/31] " Michael Ellerman
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).