Back in March, there was some discussion about ratelimiting the
BSDCOMPAT errors, and James Morris provided a patch to achieve
this.
http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1078.html
To which David Miller stated the patch had been applied.
http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1081.html
Unfortunately, it seems to have fallen through the cracks. Below
is the patch again, updated for 2.6.0-test3 - please apply.
Phil Oester
--- linux-2.6.0-test3-orig/net/core/sock.c Sat Aug 9 00:38:59 2003
+++ linux-2.6.0-test3/net/core/sock.c Mon Aug 18 18:01:15 2003
@@ -153,8 +153,13 @@
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;
+
+ if (!warned) {
+ warned = 1;
+ printk(KERN_WARNING "process `%s' is using obsolete "
+ "%s SO_BSDCOMPAT\n", current->comm, name);
+ }
}
/*
On Mon, 18 Aug 2003 15:06:05 PDT, Phil Oester said:
> Back in March, there was some discussion about ratelimiting the
> BSDCOMPAT errors, and James Morris provided a patch to achieve
> this.
> Unfortunately, it seems to have fallen through the cracks. Below
> is the patch again, updated for 2.6.0-test3 - please apply.
> 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;
> +
> + if (!warned) {
> + warned = 1;
Umm.. am I dense, or does this only warn once for *the first program*
to do it after the system boots? And you don't get another warning about
any OTHER programs until you reboot in a few weeks (possibly)?
If so, why are we bothering at all? Once *per process* I could see, but
once per boot?
On Mon, 18 Aug 2003 18:15:40 -0400
[email protected] wrote:
> On Mon, 18 Aug 2003 15:06:05 PDT, Phil Oester said:
> > 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;
> > +
> > + if (!warned) {
> > + warned = 1;
>
> Umm.. am I dense, or does this only warn once for *the first program*
> to do it after the system boots? And you don't get another warning about
> any OTHER programs until you reboot in a few weeks (possibly)?
Yes, this patch does suck hard.
I see no reason to apply this, just fix your apps and the
warning will stop. There's only a handful of programs
that trigger this at all.
David S. Miller wrote:
> I see no reason to apply this, just fix your apps and the
> warning will stop. There's only a handful of programs
> that trigger this at all.
Unfortunately Red Hat's BIND is among the more prominent. :-/
-- Jamie
On Mon, 18 Aug 2003 [email protected] wrote:
> If so, why are we bothering at all? Once *per process* I could see, but
> once per boot?
Once per process is too complicated, and an aggregate of people reporting
the message should lead to all of the major apps being fixed.
- James
--
James Morris
<[email protected]>
Jamie Lokier wrote:
> David S. Miller wrote:
> > I see no reason to apply this, just fix your apps and the
> > warning will stop. There's only a handful of programs
> > that trigger this at all.
>
> Unfortunately Red Hat's BIND is among the more prominent. :-/
Sorry, I didn't mean to imply _just_ Red Hat. Probably all distros'
BINDs use SO_BSDCOMPAT. What I meant was this is the only program I
notice the warning from, when running a 2.5 kernel on an otherwise Red
Hat 9 system. And it comes up every time I connect to the net, when I
restart named with new forwarders, which is about hourly :/
-- Jamie
Admittedly, recompiling Bind after commenting out the #define from
asm/socket.h does also solve the errors. But it does seem overkill
to warn on every single use of this...
Phil
On Tue, Aug 19, 2003 at 02:05:50AM +0100, Jamie Lokier wrote:
> Jamie Lokier wrote:
> > David S. Miller wrote:
> > > I see no reason to apply this, just fix your apps and the
> > > warning will stop. There's only a handful of programs
> > > that trigger this at all.
> >
> > Unfortunately Red Hat's BIND is among the more prominent. :-/
>
> Sorry, I didn't mean to imply _just_ Red Hat. Probably all distros'
> BINDs use SO_BSDCOMPAT. What I meant was this is the only program I
> notice the warning from, when running a 2.5 kernel on an otherwise Red
> Hat 9 system. And it comes up every time I connect to the net, when I
> restart named with new forwarders, which is about hourly :/
>
> -- Jamie