From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio Subject: Re: [PATCH v2] net: ipv6: xfrm6_state: remove VLA usage Date: Sat, 10 Mar 2018 09:43:27 +0100 Message-ID: <20180310094327.685d181d@epycfail> References: <1520667645-21975-1-git-send-email-andreaschristofo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: keescook@chromium.org, kernel-hardening@lists.openwall.com, Steffen Klassert , Herbert Xu , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Andreas Christoforou Return-path: In-Reply-To: <1520667645-21975-1-git-send-email-andreaschristofo@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Sat, 10 Mar 2018 09:40:44 +0200 Andreas Christoforou wrote: > diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c > index b15075a..270a53a 100644 > --- a/net/ipv6/xfrm6_state.c > +++ b/net/ipv6/xfrm6_state.c > @@ -62,7 +62,7 @@ __xfrm6_sort(void **dst, void **src, int n, int (*cmp)(void *p), int maxclass) > { > int i; > int class[XFRM_MAX_DEPTH]; > - int count[maxclass]; > + int count[XFRM_MAX_DEPTH]; > > memset(count, 0, sizeof(count)); Can you perhaps initialize 'count' instead of calling memset(), now? -- Stefano