lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Jun 2020 11:22:31 -0700 (PDT)
From:   Mat Martineau <mathew.j.martineau@...ux.intel.com>
To:     Geliang Tang <geliangtang@...il.com>
cc:     Matthieu Baerts <matthieu.baerts@...sares.net>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        mptcp@...ts.01.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mptcp: use list_first_entry_or_null


Hello Geliang,

On Fri, 12 Jun 2020, Geliang Tang wrote:

> Use list_first_entry_or_null to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@...il.com>
> ---
> net/mptcp/protocol.h | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 86d265500cf6..55c65abcad64 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -234,10 +234,7 @@ static inline struct mptcp_data_frag *mptcp_rtx_head(const struct sock *sk)
> {
> 	struct mptcp_sock *msk = mptcp_sk(sk);
>
> -	if (list_empty(&msk->rtx_queue))
> -		return NULL;
> -
> -	return list_first_entry(&msk->rtx_queue, struct mptcp_data_frag, list);
> +	return list_first_entry_or_null(&msk->rtx_queue, struct mptcp_data_frag, list);
> }
>
> struct mptcp_subflow_request_sock {
> -- 
> 2.17.1

As Matthieu mentioned on your earlier patch, please submit patches to 
netdev with either a [PATCH net] or [PATCH net-next] tag. In this case, 
these are non-critical bug fixes so they should be targeted at net-next.

Note that net-next branch is currently closed to submissions due to the 
v5.8 merge window. Please resubmit both MPTCP patches for net-next when 
David announces that it is open again. The change does look ok but will 
not be merged now.

Thanks for your patch,

--
Mat Martineau
Intel

Powered by blists - more mailing lists