[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210806061136.54e6926e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 6 Aug 2021 06:11:36 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: sock: add the case if sk is NULL
On Fri, 6 Aug 2021 14:38:15 +0800 Yajun Deng wrote:
> Add the case if sk is NULL in sock_{put, hold},
> The caller is free to use it.
>
> Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
The obvious complaint about this patch (and your previous netdev patch)
is that you're spraying branches everywhere in the code. Sure, it may
be okay for free(), given how expensive of an operation that is but
is having refcounting functions accept NULL really the best practice?
Can you give us examples in the kernel where that's the case?
Powered by blists - more mailing lists