aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dma-debug.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-27 05:08:55 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2012-07-02 06:11:40 -0400
commit68ee6d22376411f8ec668413f1b632a34192a807 (patch)
tree04d58831702e693d69702787fbe8538499086bd0 /lib/dma-debug.c
parent8f53dc724a83a0082184fa27df80c25c7df47340 (diff)
dma-debug: debugfs_create_bool() takes a u32 pointer
Even though it has "bool" in the name, you have pass a u32 pointer to debugfs_create_bool(). Otherwise you get memory corruption in write_file_bool(). Fortunately in this case the corruption happens in an alignment hole between variables so it doesn't cause any problems. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r--lib/dma-debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 518aea714d21..66ce41489133 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -78,7 +78,7 @@ static LIST_HEAD(free_entries);
78static DEFINE_SPINLOCK(free_entries_lock); 78static DEFINE_SPINLOCK(free_entries_lock);
79 79
80/* Global disable flag - will be set in case of an error */ 80/* Global disable flag - will be set in case of an error */
81static bool global_disable __read_mostly; 81static u32 global_disable __read_mostly;
82 82
83/* Global error count */ 83/* Global error count */
84static u32 error_count; 84static u32 error_count;
@@ -657,7 +657,7 @@ static int dma_debug_fs_init(void)
657 657
658 global_disable_dent = debugfs_create_bool("disabled", 0444, 658 global_disable_dent = debugfs_create_bool("disabled", 0444,
659 dma_debug_dent, 659 dma_debug_dent,
660 (u32 *)&global_disable); 660 &global_disable);
661 if (!global_disable_dent) 661 if (!global_disable_dent)
662 goto out_err; 662 goto out_err;
663 663