Re: [PATCH net-next] net: net_namespace: Fix undefined member in key_remove_domain()

From: Cong Wang
Date: Sun Sep 19 2021 - 19:25:22 EST


On Sat, Sep 18, 2021 at 7:28 AM Yajun Deng <yajun.deng@xxxxxxxxx> wrote:
>
> The key_domain member in struct net only exists if we define CONFIG_KEYS.
> So we should add the define when we used key_domain.

But key_remove_domain() is just a nop if !CONFIG_KEYS:

#else /* CONFIG_KEYS */
...
#define key_remove_domain(d) do { } while(0)

So what exactly are you fixing?

Thanks.