Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: linmiaohe <linmiaohe@huawei.com>
To: David Miller <davem@davemloft.net>
Cc: "kuba@kernel.org" <kuba@kernel.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"kafai@fb.com" <kafai@fb.com>, "ast@kernel.org" <ast@kernel.org>,
	"jakub@cloudflare.com" <jakub@cloudflare.com>,
	"zhang.lin16@zte.com.cn" <zhang.lin16@zte.com.cn>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: Avoid strcmp current->comm with warncomm when warned >= 5
Date: Wed, 19 Aug 2020 01:49:43 +0000	[thread overview]
Message-ID: <cdcd79834e5145718a224f0610b01a3c@huawei.com> (raw)

David Miller <davem@davemloft.net> wrote:
>From: Miaohe Lin <linmiaohe@huawei.com>
>Date: Tue, 18 Aug 2020 07:41:32 -0400
>
>> @@ -417,7 +417,7 @@ static void sock_warn_obsolete_bsdism(const char 
>> *name)  {
>>  	static int warned;
>>  	static char warncomm[TASK_COMM_LEN];
>> -	if (strcmp(warncomm, current->comm) && warned < 5) {
>> +	if (warned < 5 && strcmp(warncomm, current->comm)) {
>>  		strcpy(warncomm,  current->comm);
>>  		pr_warn("process `%s' is using obsolete %s SO_BSDCOMPAT\n",
>>  			warncomm, name);
>
>We've been warning about SO_BSDCOMPAT usage for almost 20 years, I think we can remove this code completely now.

Looks sane. Will do. Many thanks.


             reply	other threads:[~2020-08-19  1:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  1:49 linmiaohe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-18 11:41 Miaohe Lin
2020-08-18 19:45 ` David Miller

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=cdcd79834e5145718a224f0610b01a3c@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jakub@cloudflare.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhang.lin16@zte.com.cn \
    --subject='Re: [PATCH] net: Avoid strcmp current->comm with warncomm when warned >= 5' \
    /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

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).