lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4b06544d432227e8587f17330f73edcaa734de86.1276988387.git.joe@perches.com>
Date:	Sat, 19 Jun 2010 16:30:09 -0700
From:	Joe Perches <joe@...ches.com>
To:	Stefano Brivio <stefano.brivio@...imi.it>
Cc:	"John W. Linville" <linville@...driver.com>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] drivers/net/wireless/b43: Use local ratelimit_state

Avoid limiting the logging output of other networking devices

Signed-off-by: Joe Perches <joe@...ches.com>
---
 drivers/net/wireless/b43/main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 7965b70..8031f24 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -311,13 +311,15 @@ static int b43_wireless_core_start(struct b43_wldev *dev);
 
 static int b43_ratelimit(struct b43_wl *wl)
 {
+	static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 10);
+
 	if (!wl || !wl->current_dev)
 		return 1;
 	if (b43_status(wl->current_dev) < B43_STAT_STARTED)
 		return 1;
 	/* We are up and running.
 	 * Ratelimit the messages to avoid DoS over the net. */
-	return net_ratelimit();
+	return __ratelimit(&ratelimit);
 }
 
 void b43info(struct b43_wl *wl, const char *fmt, ...)
-- 
1.7.1.337.g6068.dirty

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ