Commit 062775e8 authored by Anton Altaparmakov's avatar Anton Altaparmakov

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.
parent d62edbe1
......@@ -25,6 +25,13 @@ ToDo/Notes:
- Enable the code for setting the NT4 compatibility flag when we start
making NTFS 1.2 specific modifications.
2.1.23-WIP
- 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.
2.1.22 - Many bug and race fixes and error handling improvements.
- Improve error handling in fs/ntfs/inode.c::ntfs_truncate().
......
......@@ -53,6 +53,10 @@ void __ntfs_warning(const char *function, const struct super_block *sb,
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 @@ void __ntfs_error(const char *function, const struct super_block *sb,
va_list args;
int flen = 0;
#ifndef DEBUG
if (!printk_ratelimit())
return;
#endif
if (function)
flen = strlen(function);
spin_lock(&err_buf_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment