Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 13 Mar 2018 13:06:33 -0700
From: Florian Fainelli <>
To: Vivien Didelot <>,
 Salvatore Mesoraca <>,
 "David S. Miller" <>, Andrew Lunn <>,
 Kees Cook <>
Subject: Re: [PATCH] net: dsa: drop some VLAs in switch.c

On 03/13/2018 12:58 PM, Vivien Didelot wrote:
> Hi Salvatore,
> Salvatore Mesoraca <> writes:
>> dsa_switch's num_ports is currently fixed to DSA_MAX_PORTS. So we avoid
>> 2 VLAs[1] by using DSA_MAX_PORTS instead of ds->num_ports.
>> [1]
>> Signed-off-by: Salvatore Mesoraca <>
> NAK.
> We are in the process to remove hardcoded limits such as DSA_MAX_PORTS
> and DSA_MAX_SWITCHES, so we have to stick with ds->num_ports.

Then this means that we need to allocate a bitmap from the heap, which
sounds a bit superfluous and could theoretically fail... not sure which
way is better, but bumping the size to DSA_MAX_PORTS definitively does
help people working on enabling -Wvla.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.