From: Andi Kleen <ak@muc.de>
To: netdev@oss.sgi.com
Cc: davem@redhat.com
Subject: [PATCH] Limit SO_BSDCOMPAT warning
Date: Fri, 24 Oct 2003 22:57:07 +0200 [thread overview]
Message-ID: <20031024205707.GA1072@averell> (raw)
Warning a few times for each process is enough.
-Andi
diff -u linux-2.6.0test7/net/core/sock.c-o linux-2.6.0test7mm1-averell/net/core/sock.c
--- linux-2.6.0test7mm1/net/core/sock.c-o 2003-10-16 05:19:13.000000000 +0200
+++ linux-2.6.0test7mm1/net/core/sock.c 2003-10-24 22:30:46.000000000 +0200
@@ -154,8 +154,14 @@
static void sock_warn_obsolete_bsdism(const char *name)
{
- printk(KERN_WARNING "process `%s' is using obsolete "
- "%s SO_BSDCOMPAT\n", current->comm, name);
+ static int warned;
+ static char warncomm[16];
+ if (strcmp(warncomm, current->comm) && warned < 5) {
+ strcpy(warncomm, current->comm);
+ printk(KERN_WARNING "process `%s' is using obsolete "
+ "%s SO_BSDCOMPAT\n", warncomm, name);
+ warned++;
+ }
}
/*
next reply other threads:[~2003-10-24 20:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-24 20:57 Andi Kleen [this message]
2003-10-25 2:37 ` [PATCH] Limit SO_BSDCOMPAT warning David S. 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=20031024205707.GA1072@averell \
--to=ak@muc.de \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/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).