Search Linux Wireless

Re: [PATCH 5/6] ath6kl: Fix a debugfs crash for USB devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kalle,

On 02/15/2013 04:00 PM, Kalle Valo wrote:
Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx> writes:

From: Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx>

Credit distribution stats is currently implemented
only for SDIO. This fixes a crash in debugfs for
USB interface.

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<f91c2048>] read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
*pde = b62bd067
Oops: 0000 [#1] SMP

[...]

--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -658,6 +658,9 @@ static ssize_t read_file_credit_dist_stats(struct file *file,
  	unsigned int buf_len, len = 0;
  	ssize_t ret_cnt;

+	if (ar->hif_type != ATH6KL_HIF_TYPE_SDIO)
+		return -EINVAL;

Actually I think it would be better not to even create the debugfs when
using sdio.

agreed, but looks bit ugly right ? thoughts.




--
thanks,
shafi
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux