Subject: Re: [patch net-next v7 5/9] genetlink: introduce per-sock family private storage

From: Jiri Pirko <[email-masked]>
Date: Sat, 16 Dec 2023 10:17:56 +0100

Sat, Dec 16, 2023 at 02:47:07AM CET, [email-masked] wrote:
>Sorry for the latency...

Np.

>
>On Fri, 15 Dec 2023 11:17:14 +0100 Jiri Pirko wrote:
>> Wait, let me make your suggestion clear. Do you suggest to remove the
>> WARN_ON_ONCE from __genl_sk_priv_get() as well?
>> 
>> To put it in code:
>> void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
>> {
>> 	if (WARN_ON_ONCE(!family->sock_privs))
>> 		return ERR_PTR(-EINVAL);
>> 	return xa_load(family->sock_privs, (unsigned long) sk);
>> }
>
>I meant this, although no strong feelings.

Got it. Will send v8. Hopefully that will be the last.

Thanks!

>
>> OR:
>> void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
>> {
>> 	if (!family->sock_privs)
>> 		return ERR_PTR(-EINVAL);
>> 	return xa_load(family->sock_privs, (unsigned long) sk);
>> }
>> ?