From: Eric Dumazet <eric.dumazet@gmail.com>
To: 13145886936@163.com, davem@davemloft.net, kuba@kernel.org
Cc: linux-decnet-user@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
gushengxian <gushengxian@yulong.com>
Subject: Re: [PATCH] decnet: af_decnet: pmc should not be referenced when it's NULL
Date: Wed, 23 Jun 2021 12:47:46 +0200 [thread overview]
Message-ID: <f9cfcede-2684-8723-4979-c0534d711483@gmail.com> (raw)
In-Reply-To: <20210623033540.27552-1-13145886936@163.com>
On 6/23/21 5:35 AM, 13145886936@163.com wrote:
> From: gushengxian <gushengxian@yulong.com>
>
> pmc should not be referenced when it's NULL.
>
> Signed-off-by: gushengxian <gushengxian@yulong.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.
next prev parent reply other threads:[~2021-06-23 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 3:35 [PATCH] decnet: af_decnet: pmc should not be referenced when it's NULL 13145886936
2021-06-23 8:29 ` kernel test robot
2021-06-23 9:34 ` kernel test robot
2021-06-23 10:47 ` Eric Dumazet [this message]
2021-06-23 10:12 13145886936
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9cfcede-2684-8723-4979-c0534d711483@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=13145886936@163.com \
--cc=davem@davemloft.net \
--cc=gushengxian@yulong.com \
--cc=kuba@kernel.org \
--cc=linux-decnet-user@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).