lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 10 Nov 2011 22:19:09 -0800 (PST) From: Sage Weil <sage@...dream.net> To: Thomas Meyer <thomas@...3r.de> cc: "David S. Miller" <davem@...emloft.net>, ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] ceph: Use kmemdup rather than duplicating its implementation Applied, thanks! On Thu, 10 Nov 2011, Thomas Meyer wrote: > Use kmemdup rather than duplicating its implementation > > The semantic patch that makes this change is available > in scripts/coccinelle/api/memdup.cocci. > > Signed-off-by: Thomas Meyer <thomas@...3r.de> > --- > > diff -u -p a/net/ceph/crypto.c b/net/ceph/crypto.c > --- a/net/ceph/crypto.c 2011-11-07 19:38:30.130592543 +0100 > +++ b/net/ceph/crypto.c 2011-11-08 10:58:06.915274800 +0100 > @@ -15,10 +15,9 @@ int ceph_crypto_key_clone(struct ceph_cr > const struct ceph_crypto_key *src) > { > memcpy(dst, src, sizeof(struct ceph_crypto_key)); > - dst->key = kmalloc(src->len, GFP_NOFS); > + dst->key = kmemdup(src->key, src->len, GFP_NOFS); > if (!dst->key) > return -ENOMEM; > - memcpy(dst->key, src->key, src->len); > return 0; > } > > > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@...r.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists