[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89c167ff-91d3-7a27-78c6-82710bb11771@I-love.SAKURA.ne.jp>
Date: Sat, 8 Sep 2018 02:08:03 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Kent Overstreet <kent.overstreet@...il.com>
Cc: linux-kernel@...r.kernel.org, Dave Hansen <dave.hansen@...el.com>,
Matthew Wilcox <willy@...radead.org>,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH 3/6] selinux: convert to kvmalloc
On 2018/09/08 1:56, Kent Overstreet wrote:
> @@ -329,8 +328,7 @@ int avtab_alloc(struct avtab *h, u32 nrules)
> nslot = MAX_AVTAB_HASH_BUCKETS;
> mask = nslot - 1;
>
> - h->htable = flex_array_alloc(sizeof(struct avtab_node *), nslot,
> - GFP_KERNEL | __GFP_ZERO);
> + h->htable = kvmalloc_array(nslot, sizeof(void *), GFP_KERNEL);
> if (!h->htable)
> return -ENOMEM;
>
kvmalloc_array() does not imply __GFP_ZERO.
Powered by blists - more mailing lists