[PATCH] nl80211: Avoid bogus ENFILE with use_existing
Jouni Malinen
j at w1.fi
Mon Jul 27 10:02:59 PDT 2026
On Mon, Jul 20, 2026 at 05:12:33PM +0800, Yanghan Ye wrote:
> When use_existing is set, nl80211_create_iface() may be called for an
> interface that already exists. The current code still sends
> NL80211_CMD_NEW_INTERFACE first and only falls back to reusing the
> existing netdev after the create attempt fails.
>
> This can produce a misleading ENFILE/"Too many open files in system"
> failure in the log even though the subsequent use_existing path succeeds.
>
> Check for an existing interface before attempting to create it when
> use_existing is allowed. Keep the fallback path for races where the
> interface appears after the initial check or for other create failures
> that leave an existing netdev behind.
Thanks, applied.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list