[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f9cfcede-2684-8723-4979-c0534d711483@gmail.com>
Date: Wed, 23 Jun 2021 12:47:46 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: 13145886936@....com, davem@...emloft.net, kuba@...nel.org
Cc: linux-decnet-user@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, gushengxian <gushengxian@...ong.com>
Subject: Re: [PATCH] decnet: af_decnet: pmc should not be referenced when it's
NULL
On 6/23/21 5:35 AM, 13145886936@....com wrote:
> From: gushengxian <gushengxian@...ong.com>
>
> pmc should not be referenced when it's NULL.
>
> Signed-off-by: gushengxian <gushengxian@...ong.com>
> ---
> net/decnet/af_decnet.c | 67 ++++++++++++++++--------------------------
> 1 file changed, 25 insertions(+), 42 deletions(-)
>
> diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
> index 5dbd45dc35ad..be2758ac40cb 100644
> --- a/net/decnet/af_decnet.c
> +++ b/net/decnet/af_decnet.c
> @@ -152,7 +152,8 @@ static atomic_long_t decnet_memory_allocated;
>
> static int __dn_setsockopt(struct socket *sock, int level, int optname,
> sockptr_t optval, unsigned int optlen, int flags);
> -static int __dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen, int flags);
> +static int __dn_getsockopt(struct socket *sock, int level, int optname,
> + char __user *optval, int __user *optlen, int flags);
>
> static struct hlist_head *dn_find_list(struct sock *sk)
> {
> @@ -176,6 +177,7 @@ static int check_port(__le16 port)
>
> sk_for_each(sk, &dn_sk_hash[le16_to_cpu(port) & DN_SK_HASH_MASK]) {
> struct dn_scp *scp = DN_SK(sk);
> +
> if (scp->addrloc == port)
> return -1;
>
Please do not add noise to your patch.
Never mix cleanups and a fix.
Also, decnet is no longer used, please do not send space cleanups.
Powered by blists - more mailing lists