summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch')
-rw-r--r--sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch
new file mode 100644
index 000000000000..44abcbca1ac0
--- /dev/null
+++ b/sys-kernel/gentoo-sources/files/gentoo-sources-2.4.81106.patch
@@ -0,0 +1,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);