On Fri, 2012-06-29 at 23:45 -0400, [email protected] wrote: > The patch below does not apply to the 3.4-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to <[email protected]>. > > thanks, > > greg k-h > > ------------------ original commit in Linus's tree ------------------ > > From 882b7b7d11d65e8eccce738f1ce97cdfdb998f9f Mon Sep 17 00:00:00 2001 > From: Johannes Berg <[email protected]> > Date: Wed, 20 Jun 2012 08:46:25 +0200 > Subject: [PATCH] iwlwifi: remove log_event debugfs file debugging is disabled > > When debugging is disabled, the event log functions aren't > functional in the way that the debugfs file expects. This > leads to the debugfs access crashing. Since the event log > functions aren't functional then, remove the debugfs file > when CONFIG_IWLWIFI_DEBUG is not set. [...]
I backported this to 3.2.y, and that patch (attached) applies and builds cleanly on top of 3.4.4 as well. Ben. -- Ben Hutchings If you seem to know what you are doing, you'll be given more to do.
From: Johannes Berg <[email protected]> Date: Wed, 20 Jun 2012 08:46:25 +0200 Subject: iwlwifi: remove log_event debugfs file debugging is disabled commit 882b7b7d11d65e8eccce738f1ce97cdfdb998f9f upstream. When debugging is disabled, the event log functions aren't functional in the way that the debugfs file expects. This leads to the debugfs access crashing. Since the event log functions aren't functional then, remove the debugfs file when CONFIG_IWLWIFI_DEBUG is not set. Reported-by: Lekensteyn <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]> [bwh: Backported to 3.2: adjust filename, context] Signed-off-by: Ben Hutchings <[email protected]> --- --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -1777,6 +1777,7 @@ return simple_read_from_buffer(user_buf, count, ppos, buf, pos); } +#ifdef CONFIG_IWLWIFI_DEBUG static ssize_t iwl_dbgfs_log_event_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) @@ -1814,6 +1815,7 @@ return count; } +#endif static ssize_t iwl_dbgfs_interrupt_read(struct file *file, char __user *user_buf, @@ -1941,7 +1943,9 @@ return ret; } +#ifdef CONFIG_IWLWIFI_DEBUG DEBUGFS_READ_WRITE_FILE_OPS(log_event); +#endif DEBUGFS_READ_WRITE_FILE_OPS(interrupt); DEBUGFS_READ_FILE_OPS(fh_reg); DEBUGFS_READ_FILE_OPS(rx_queue); @@ -1957,7 +1961,9 @@ { DEBUGFS_ADD_FILE(rx_queue, dir, S_IRUSR); DEBUGFS_ADD_FILE(tx_queue, dir, S_IRUSR); +#ifdef CONFIG_IWLWIFI_DEBUG DEBUGFS_ADD_FILE(log_event, dir, S_IWUSR | S_IRUSR); +#endif DEBUGFS_ADD_FILE(interrupt, dir, S_IWUSR | S_IRUSR); DEBUGFS_ADD_FILE(csr, dir, S_IWUSR); DEBUGFS_ADD_FILE(fh_reg, dir, S_IRUSR);
signature.asc
Description: This is a digitally signed message part
