[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZTdubh4IhXfQiTkl@nanopsycho>
Date: Tue, 24 Oct 2023 09:12:46 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, johannes.berg@...el.com, mpe@...erman.id.au,
j@...fi
Subject: Re: [PATCH net-next v2 4/6] net: trust the bitmap in
__dev_alloc_name()
Mon, Oct 23, 2023 at 05:23:44PM CEST, kuba@...nel.org wrote:
>Prior to restructuring __dev_alloc_name() handled both printf
>and non-printf names. In a clever attempt at code reuse it
>always prints the name into a buffer and checks if it's
>a duplicate.
>
>Trust the bitmap, and return an error if its full.
>
>This shrinks the possible ID space by one from 32K to 32K - 1,
>as previously the max value would have been tried as a valid ID.
>It seems very unlikely that anyone would care as we heard
>no requests to increase the max beyond 32k.
>
>Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Jiri Pirko <jiri@...dia.com>
Powered by blists - more mailing lists