similar to: [PATCH] net: Use kmemdup instead of kmalloc and memcpy

Displaying 20 results from an estimated 900 matches similar to: "[PATCH] net: Use kmemdup instead of kmalloc and memcpy"

2016 Dec 28
0
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
From: Shyam Saini <mayhs11saini at gmail.com> Date: Sat, 24 Dec 2016 00:44:58 +0530 > when some other buffer is immediately copied into allocated region. > Replace calls to kmalloc followed by a memcpy with a direct > call to kmemdup. > > Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> Applied.
2013 Mar 10
1
[PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup
Replaced calls to kmalloc followd by memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru at gmail.com> --- fs/ocfs2/localalloc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index aebeacd..839183f 100644 --- a/fs/ocfs2/localalloc.c +++
2013 Mar 11
2
[PATCH] block: replace kmalloc and then memcpy with kmemdup
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb at gmail.com> --- drivers/block/xen-blkfront.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index c3dae2e..9620644 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1203,11 +1203,10 @@ static int blkif_recover(struct
2013 Mar 11
2
[PATCH] block: replace kmalloc and then memcpy with kmemdup
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb at gmail.com> --- drivers/block/xen-blkfront.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index c3dae2e..9620644 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1203,11 +1203,10 @@ static int blkif_recover(struct
2020 Apr 21
1
[PATCH -next] drm/nouveau/acr: Use kmemdup instead of kmalloc and memcpy
Fixes coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:103:23-30: WARNING opportunity for kmemdup drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:113:22-29: WARNING opportunity for kmemdup Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"") Reported-by: Hulk Robot <hulkci at huawei.com> Signed-off-by: Zou Wei
2017 Feb 06
4
[Bug 1118] New: nft: nft -f and nft list ruleset use different sets of service -> port mappings
https://bugzilla.netfilter.org/show_bug.cgi?id=1118 Bug ID: 1118 Summary: nft: nft -f and nft list ruleset use different sets of service -> port mappings Product: nftables Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P5
2018 Feb 06
5
[Bug 1224] New: nft export json fails with successful return code
https://bugzilla.netfilter.org/show_bug.cgi?id=1224 Bug ID: 1224 Summary: nft export json fails with successful return code Product: nftables Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 Component: nft Assignee: pablo at netfilter.org
2017 Mar 09
0
[Bug 1046] mobility header with range gives illegible rule
https://bugzilla.netfilter.org/show_bug.cgi?id=1046 Shyam Saini <mayhs11saini at gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED CC|
2017 Jan 13
1
[Bug 1112] New: xtables-compat-multi fails to parse comments
https://bugzilla.netfilter.org/show_bug.cgi?id=1112 Bug ID: 1112 Summary: xtables-compat-multi fails to parse comments Product: iptables Version: CVS (please indicate timestamp) Hardware: x86_64 OS: Gentoo Status: NEW Severity: minor Priority: P5 Component: unknown Assignee:
2015 Jan 13
2
Forest/Domain Functional Level of Active Directory
On 1/12/2015 10:47 PM, avinesh saini wrote: > On Sun, Jan 11, 2015 at 4:34 PM, Marc Muehlfeld <mmuehlfeld at samba.org> > wrote: > >> Samba DCs > > Hi, > > Thank you for your responses. > In our setup samba version is 3.6. Can you please let me know if samba 3.6 > supports domain/forest functional levels or if there is any impact, when > samba acts as
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Laura Abbott <labbott at redhat.com> Reported-by: zbyszek at in.waw.pl Signed-off-by: Andy Lutomirski <luto at kernel.org> ---
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Laura Abbott <labbott at redhat.com> Reported-by: zbyszek at in.waw.pl Signed-off-by: Andy Lutomirski <luto at kernel.org> ---
2019 Jul 03
0
[PATCH 05/30] crypto: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memset. Signed-off-by: Fuqian Huang <huangfq.daxian
2019 Jul 03
0
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
On Thu, Jul 04, 2019 at 12:27:08AM +0800, Fuqian Huang wrote: > kmemdup is introduced to duplicate a region of memory in a neat way. > Rather than kmalloc/kzalloc + memcpy, which the programmer needs to > write the size twice (sometimes lead to mistakes), kmemdup improves > readability, leads to smaller code and also reduce the chances of mistakes. > Suggestion to use kmemdup rather
2024 Jan 09
1
[PATCH linux-next v2] drm/nouveau/disp: switch to use kmemdup() helper
From: Chen Haonan <chen.haonan2 at zte.com.cn> Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> Reviewed-by: Yang Guang <yang.guang5 at zte.com.cn> --- drivers/gpu/drm/nouveau/nvif/outp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c
2023 Dec 14
2
[PATCH linux-next] drm/nouveau/disp: switch to use kmemdup() helper
From: Yang Guang <yang.guang5 at zte.com.cn> Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> --- drivers/gpu/drm/nouveau/nvif/outp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c index 5d3190c05250..6daeb7f0b09b
2024 Jan 10
0
[PATCH linux-next v2] drm/nouveau/disp: switch to use kmemdup() helper
On 1/9/24 07:24, yang.guang5 at zte.com.cn wrote: > From: Chen Haonan <chen.haonan2 at zte.com.cn> > > Use kmemdup() helper instead of open-coding to > simplify the code. > > Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> > Reviewed-by: Yang Guang <yang.guang5 at zte.com.cn> Applied to drm-misc-next, thanks! > --- >
2019 Oct 12
0
drm/nouveau: Checking a kmemdup() call in nouveau_connector_of_detect()
Hello, I tried another script for the semantic patch language out. This source code analysis approach points out that the implementation of the function ?nouveau_connector_of_detect? contains still an unchecked call of the function ?kmemdup?.
2023 Dec 14
0
[PATCH linux-next] drm/nouveau/disp: switch to use kmemdup() helper
On Thu, Dec 14, 2023 at 08:03:22PM +0800, yang.guang5 at zte.com.cn wrote: > From: Yang Guang <yang.guang5 at zte.com.cn> > > Use kmemdup() helper instead of open-coding to > simplify the code. > > Signed-off-by: Chen Haonan <chen.haonan2 at zte.com.cn> Sure, good cleanup. Reviewed-by: Kees Cook <keescook at chromium.org> -- Kees Cook
2019 Jul 03
3
[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang <huangfq.daxian