Return-Path: <saidone@saidone.org>
X-Original-To: joe@perches.com
Delivered-To: joe@perches.com
Received: from smtp207.alice.it (smtp207.alice.it [82.57.200.103]) by
 mail.perches.com (Postfix) with ESMTP id ACDB224368 for <joe@perches.com>;
 Wed, 13 Jul 2011 10:44:42 -0700 (PDT)
Received: from kugelmass.saidonet (80.183.18.56) by smtp207.alice.it
 (8.5.124.08) id 4DFA189A02D4036E; Wed, 13 Jul 2011 19:44:49 +0200
Received: from [192.168.1.1] (nicoletta-desktop.saidonet [192.168.1.1]) by
 kugelmass.saidonet (Postfix) with ESMTP id 4A282B2; Wed, 13 Jul 2011
 19:44:47 +0200 (CEST)
Message-ID: <4E1DD98E.5030903@saidone.org>
Date: Wed, 13 Jul 2011 19:44:46 +0200
From: saidone <saidone@saidone.org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17)
 Gecko/20110424 Thunderbird/3.1.10
MIME-Version: 1.0
To: Joe Perches <joe@perches.com>
CC: stable <stable@kernel.org>
Subject: Re: WARN_RATELIMIT
References: <4E1D7560.7060502@saidone.org>
	 <1310568751.1662.13.camel@Joe-Laptop>
In-Reply-To: <1310568751.1662.13.camel@Joe-Laptop>
Content-Type: text/plain; charset=UTF-8; format=flowed
Status: 
X-Evolution-Source: pop://joe@192.168.1.1/
Content-Transfer-Encoding: 7bit

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>

