blob: 44abcbca1ac0f433034d2d2bebc2122de495d8b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# ChangeSet
# 2005/01/25 10:10:51+00:00 aia21@cantab.net
# NTFS: Add printk rate limiting for ntfs_warning() and ntfs_error() when
# compiled without debug. This avoids a possible denial of service
# attack. Thanks to Carl-Daniel Hailfinger from SuSE for pointing this
# out.
#
diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
--- a/fs/ntfs/debug.c 2005-02-15 12:38:26 -08:00
+++ b/fs/ntfs/debug.c 2005-02-15 12:38:26 -08:00
@@ -53,6 +53,10 @@
va_list args;
int flen = 0;
+#ifndef DEBUG
+ if (!printk_ratelimit())
+ return;
+#endif
if (function)
flen = strlen(function);
spin_lock(&err_buf_lock);
@@ -93,6 +97,10 @@
va_list args;
int flen = 0;
+#ifndef DEBUG
+ if (!printk_ratelimit())
+ return;
+#endif
if (function)
flen = strlen(function);
spin_lock(&err_buf_lock);
|