Re: Linux 2.6.32.43 (WARN_RATELIMIT)

From: Joe Perches
Date: Wed Jul 13 2011 - 17:35:58 EST


On Wed, 2011-07-13 at 23:28 +0200, Jiri Slaby wrote:
> Cced Joe.

Thanks Jiri.

I didn't submit this patch for stable.
I don't even try to track stable.

Saidone also notified me, I just replied to him
and cc'd stable. Perhaps I should have cc'd lkml
as well. Saidone's proposed patch is attached.

cheers, Joe

> On 07/13/2011 11:21 PM, Jiri Slaby wrote:
> > On 07/13/2011 11:16 PM, Jiri Slaby wrote:
> >> On 07/13/2011 05:45 AM, Greg KH wrote:
> >>> Joe Perches (2):
> >>> bug.h: Add WARN_RATELIMIT
> >>> net: filter: Use WARN_RATELIMIT
> >>
> >> Hi, this causes a build failure on PPC with minimalistic config (PS3) [1]:
> >> net/core/filter.c: In function 'sk_run_filter':
> >> net/core/filter.c:297: error: implicit declaration of function
> >> 'WARN_RATELIMIT'
> >>
> >> net/core/filter.c should include linux/bug.h (or linux/kernel.h).
> >
> > Ah, no, PS3 doesn't have CONFIG_BUG set.
>
> A fix attached. Upstream doesn't need it. There it is all in
> linux/ratelimit.h
>
> >> [1]
> >> http://gitorious.org/opensuse/kernel-source/blobs/SLE11-SP1/config/ppc/ps3
> >>
> >> regards,


--- Begin Message --- Hi Joe, I found that the problem was that I have debugfs disabled (# CONFIG_BUG is not set).
I cannot make better than this patch to net/core/filter.c:

#ifdef CONFIG_BUG
WARN_RATELIMIT(1, "Unknown code:%u jt:%u tf:%u k:%u\n",
fentry->code, fentry->jt,
fentry->jf, fentry->k);
#endif
#ifndef CONFIG_BUG
WARN_ON(1);
#endif
return 0;

However, at least, it works ;-)
Thank you very much for the hints,

Marco Marini

On 13/07/2011 16:52, Joe Perches wrote:
On Wed, 2011-07-13 at 12:37 +0200, saidone wrote:
Hello Joe,
I tried to build the latest stable kernel 2.6.32.43 with gcc 3.4.6, but
it stopped while compiling filter.c:
net/core/filter.c: In function `sk_run_filter':
net/core/filter.c:294: error: implicit declaration of function
`WARN_RATELIMIT'
How can I patch it in a "safe" manner?
Thanks in advance,
Marco Marini

I believe net/core/filter.c will need to

#include<linux/ratelimit.h>


--- End Message ---