Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261288AbVCTVll (ORCPT ); Sun, 20 Mar 2005 16:41:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261285AbVCTVll (ORCPT ); Sun, 20 Mar 2005 16:41:41 -0500 Received: from mail-in-03.arcor-online.net ([151.189.21.43]:10669 "EHLO mail-in-03.arcor-online.net") by vger.kernel.org with ESMTP id S261288AbVCTVl2 (ORCPT ); Sun, 20 Mar 2005 16:41:28 -0500 Date: Sun, 20 Mar 2005 22:45:59 +0100 (CET) From: Bodo Eggert <7eggert@gmx.de> To: Bodo Eggert <7eggert@gmx.de> Cc: Michael Tokarev , linux-kernel@vger.kernel.org, Jens Axboe , Vojtech Pavlik , video4linux-list@redhat.com Subject: [PATCH 2.6.11.2][SECURITY] printk with anti-cluttering-feature In-Reply-To: Message-ID: References: <423D6353.5010603@tls.msk.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1002 Lines: 23 Security fix against a log spamming DoS in tuner.c, compile-tested Signed-Off-By: Bodo Eggert <7eggert@gmx.de> --- linux-2.6.11/drivers/media/video/tuner.c 2005-03-20 20:54:54.000000000 +0100 +++ hotfix/drivers/media/video/tuner.c 2005-03-20 21:10:33.000000000 +0100 @@ -1048,8 +1048,9 @@ static void set_tv_freq(struct i2c_clien right now we don't have that in the config struct and this way is still better than no check at all */ - printk("tuner: TV freq (%d.%02d) out of range (%d-%d)\n", - freq/16,freq%16*100/16,tv_range[0],tv_range[1]); + if(printk_ratelimit()) + printk("tuner: TV freq (%d.%02d) out of range (%d-%d)\n", + freq/16,freq%16*100/16,tv_range[0],tv_range[1]); return; } t->tv_freq(c,freq); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/