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
| ||
|
Message-ID: <747f7b9a-e95d-a872-7e30-ea235b91593a@suse.cz> Date: Fri, 6 Jan 2017 14:29:33 +0100 From: Vlastimil Babka <vbabka@...e.cz> To: Michal Hocko <mhocko@...nel.org>, Andrew Morton <akpm@...ux-foundation.org> Cc: David Rientjes <rientjes@...gle.com>, Mel Gorman <mgorman@...e.de>, Johannes Weiner <hannes@...xchg.org>, Al Viro <viro@...iv.linux.org.uk>, linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>, kvm@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-security-module@...r.kernel.org, linux-ext4@...r.kernel.org, Joe Perches <joe@...ches.com>, Michal Hocko <mhocko@...e.com>, Anatoly Stepanov <astepanov@...udlinux.com>, Paolo Bonzini <pbonzini@...hat.com>, Mike Snitzer <snitzer@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>, Theodore Ts'o <tytso@....edu>, Andreas Dilger <adilger@...ger.ca> Subject: Re: [PATCH] mm: introduce kv[mz]alloc helpers On 01/02/2017 02:37 PM, Michal Hocko wrote: > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -514,18 +514,9 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > } > EXPORT_SYMBOL_GPL(vhost_dev_set_owner); > > -static void *vhost_kvzalloc(unsigned long size) > -{ > - void *n = kzalloc(size, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); Hi, I just noticed that this had __GFP_REPEAT, so you'll probably want to move these hunks to patch 3 with the rest of vhost. > - > - if (!n) > - n = vzalloc(size); > - return n; > -} > - > struct vhost_umem *vhost_dev_reset_owner_prepare(void) > { > - return vhost_kvzalloc(sizeof(struct vhost_umem)); > + return kvzalloc(sizeof(struct vhost_umem), GFP_KERNEL); > } > EXPORT_SYMBOL_GPL(vhost_dev_reset_owner_prepare); > > @@ -1189,7 +1180,7 @@ EXPORT_SYMBOL_GPL(vhost_vq_access_ok); > > static struct vhost_umem *vhost_umem_alloc(void) > { > - struct vhost_umem *umem = vhost_kvzalloc(sizeof(*umem)); > + struct vhost_umem *umem = kvzalloc(sizeof(*umem), GFP_KERNEL); > > if (!umem) > return NULL; > @@ -1215,7 +1206,7 @@ static long vhost_set_memory(struct vhost_dev *d, struct vhost_memory __user *m) > return -EOPNOTSUPP; > if (mem.nregions > max_mem_regions) > return -E2BIG; > - newmem = vhost_kvzalloc(size + mem.nregions * sizeof(*m->regions)); > + newmem = kvzalloc(size + mem.nregions * sizeof(*m->regions), GFP_KERNEL); > if (!newmem) > return -ENOMEM; > > diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c > index 7ae43c59bc79..bb49409172d9 100644 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists