All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 5/5] ath6kl: Fix a debugfs crash for USB devices
@ 2013-02-22 14:50 Mohammed Shafi Shajakhan
  2013-03-08 15:29 ` Mohammed Shafi
  0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Shafi Shajakhan @ 2013-02-22 14:50 UTC (permalink / raw)
  To: linux-wireless; +Cc: Kalle Valo, Mohammed Shafi Shajakhan, Ryan Hsu

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

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

EIP: 0060:[<f91c2048>] EFLAGS: 00210246 CPU: 0
EIP is at read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
EAX: 00000000 EBX: e6f7a9c0 ECX: e7b148b8 EDX: 00000000
ESI: 000000c8 EDI: e7b14000 EBP: e6e09f64 ESP: e6e09f30
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process cat (pid: 4058, ti=e6e08000 task=e50cf230 task.ti=e6e08000)
Stack:
00008000 00000000 e6e09f64 c1132d3c 00004e71 e50cf230 00008000 089e4000
e7b148b8 00000000 e6f7a9c0 00008000 089e4000 e6e09f8c c11331fc e6e09f98
00000001 e6e09f7c f91c2010 e6e09fac e6f7a9c0 089e4877 089e4000 e6e09fac

	Call Trace:
	[<c1132d3c>] ? rw_verify_area+0x6c/0x120
	[<c11331fc>] vfs_read+0x8c/0x160
	[<f91c2010>] ? read_file_war_stats+0x130/0x130 [ath6kl_core]
	[<c113330d>] sys_read+0x3d/0x70
	[<c15755b4>] syscall_call+0x7/0xb
	[<c1570000>] ? fill_powernow_table_pstate+0x127/0x127

Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/debug.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 15cfe30..c557367 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1752,8 +1752,10 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
 	debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
 			    &fops_tgt_stats);
 
-	debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar,
-			    &fops_credit_dist_stats);
+	if (ar->hif_type != ATH6KL_HIF_TYPE_SDIO)
+		debugfs_create_file("credit_dist_stats", S_IRUSR,
+				    ar->debugfs_phy, ar,
+				    &fops_credit_dist_stats);
 
 	debugfs_create_file("endpoint_stats", S_IRUSR | S_IWUSR,
 			    ar->debugfs_phy, ar, &fops_endpoint_stats);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 5/5] ath6kl: Fix a debugfs crash for USB devices
  2013-02-22 14:50 [PATCH v2 5/5] ath6kl: Fix a debugfs crash for USB devices Mohammed Shafi Shajakhan
@ 2013-03-08 15:29 ` Mohammed Shafi
  2013-03-09  7:38   ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Shafi @ 2013-03-08 15:29 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan; +Cc: linux-wireless, Kalle Valo, Ryan Hsu

On Fri, Feb 22, 2013 at 8:20 PM, Mohammed Shafi Shajakhan
<mohammed@qca.qualcomm.com> wrote:
> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>
> 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
>
> EIP: 0060:[<f91c2048>] EFLAGS: 00210246 CPU: 0
> EIP is at read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
> EAX: 00000000 EBX: e6f7a9c0 ECX: e7b148b8 EDX: 00000000
> ESI: 000000c8 EDI: e7b14000 EBP: e6e09f64 ESP: e6e09f30
> DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
> Process cat (pid: 4058, ti=e6e08000 task=e50cf230 task.ti=e6e08000)
> Stack:
> 00008000 00000000 e6e09f64 c1132d3c 00004e71 e50cf230 00008000 089e4000
> e7b148b8 00000000 e6f7a9c0 00008000 089e4000 e6e09f8c c11331fc e6e09f98
> 00000001 e6e09f7c f91c2010 e6e09fac e6f7a9c0 089e4877 089e4000 e6e09fac
>
>         Call Trace:
>         [<c1132d3c>] ? rw_verify_area+0x6c/0x120
>         [<c11331fc>] vfs_read+0x8c/0x160
>         [<f91c2010>] ? read_file_war_stats+0x130/0x130 [ath6kl_core]
>         [<c113330d>] sys_read+0x3d/0x70
>         [<c15755b4>] syscall_call+0x7/0xb
>         [<c1570000>] ? fill_powernow_table_pstate+0x127/0x127
>
> Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com>
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath6kl/debug.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
> index 15cfe30..c557367 100644
> --- a/drivers/net/wireless/ath/ath6kl/debug.c
> +++ b/drivers/net/wireless/ath/ath6kl/debug.c
> @@ -1752,8 +1752,10 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
>         debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
>                             &fops_tgt_stats);
>
> -       debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar,
> -                           &fops_credit_dist_stats);
> +       if (ar->hif_type != ATH6KL_HIF_TYPE_SDIO)

made a mistake,
should be > +       if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
will send another patch
> +               debugfs_create_file("credit_dist_stats", S_IRUSR,
> +                                   ar->debugfs_phy, ar,
> +                                   &fops_credit_dist_stats);
>
>         debugfs_create_file("endpoint_stats", S_IRUSR | S_IWUSR,
>                             ar->debugfs_phy, ar, &fops_endpoint_stats);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
thanks,
shafi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 5/5] ath6kl: Fix a debugfs crash for USB devices
  2013-03-08 15:29 ` Mohammed Shafi
@ 2013-03-09  7:38   ` Kalle Valo
  2013-03-12 16:15     ` Mohammed Shafi Shajakhan
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2013-03-09  7:38 UTC (permalink / raw)
  To: Mohammed Shafi
  Cc: Mohammed Shafi Shajakhan, linux-wireless, Ryan Hsu, ath6kl-devel

Mohammed Shafi <shafi.wireless@gmail.com> writes:

> On Fri, Feb 22, 2013 at 8:20 PM, Mohammed Shafi Shajakhan
> <mohammed@qca.qualcomm.com> wrote:
>> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>>
>> 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
>>
>> EIP: 0060:[<f91c2048>] EFLAGS: 00210246 CPU: 0
>> EIP is at read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
>> EAX: 00000000 EBX: e6f7a9c0 ECX: e7b148b8 EDX: 00000000
>> ESI: 000000c8 EDI: e7b14000 EBP: e6e09f64 ESP: e6e09f30
>> DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
>> Process cat (pid: 4058, ti=e6e08000 task=e50cf230 task.ti=e6e08000)
>> Stack:
>> 00008000 00000000 e6e09f64 c1132d3c 00004e71 e50cf230 00008000 089e4000
>> e7b148b8 00000000 e6f7a9c0 00008000 089e4000 e6e09f8c c11331fc e6e09f98
>> 00000001 e6e09f7c f91c2010 e6e09fac e6f7a9c0 089e4877 089e4000 e6e09fac
>>
>>         Call Trace:
>>         [<c1132d3c>] ? rw_verify_area+0x6c/0x120
>>         [<c11331fc>] vfs_read+0x8c/0x160
>>         [<f91c2010>] ? read_file_war_stats+0x130/0x130 [ath6kl_core]
>>         [<c113330d>] sys_read+0x3d/0x70
>>         [<c15755b4>] syscall_call+0x7/0xb
>>         [<c1570000>] ? fill_powernow_table_pstate+0x127/0x127
>>
>> Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com>
>> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

[...]

>> @@ -1752,8 +1752,10 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
>>         debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
>>                             &fops_tgt_stats);
>>
>> -       debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar,
>> -                           &fops_credit_dist_stats);
>> +       if (ar->hif_type != ATH6KL_HIF_TYPE_SDIO)
>
> made a mistake,
> should be > +       if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
> will send another patch

Oh, I missed as well. I rebased ath6kl-next branch and dropped patch 5
(but kept patches 1-4). Please resend patch 5.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 5/5] ath6kl: Fix a debugfs crash for USB devices
  2013-03-09  7:38   ` Kalle Valo
@ 2013-03-12 16:15     ` Mohammed Shafi Shajakhan
  0 siblings, 0 replies; 4+ messages in thread
From: Mohammed Shafi Shajakhan @ 2013-03-12 16:15 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Mohammed Shafi, linux-wireless, Ryan Hsu, ath6kl-devel

On 03/09/2013 01:08 PM, Kalle Valo wrote:
> Mohammed Shafi <shafi.wireless@gmail.com> writes:
>
>> On Fri, Feb 22, 2013 at 8:20 PM, Mohammed Shafi Shajakhan
>> <mohammed@qca.qualcomm.com> wrote:
>>> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>>>
>>> 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
>>>
>>> EIP: 0060:[<f91c2048>] EFLAGS: 00210246 CPU: 0
>>> EIP is at read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
>>> EAX: 00000000 EBX: e6f7a9c0 ECX: e7b148b8 EDX: 00000000
>>> ESI: 000000c8 EDI: e7b14000 EBP: e6e09f64 ESP: e6e09f30
>>> DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
>>> Process cat (pid: 4058, ti=e6e08000 task=e50cf230 task.ti=e6e08000)
>>> Stack:
>>> 00008000 00000000 e6e09f64 c1132d3c 00004e71 e50cf230 00008000 089e4000
>>> e7b148b8 00000000 e6f7a9c0 00008000 089e4000 e6e09f8c c11331fc e6e09f98
>>> 00000001 e6e09f7c f91c2010 e6e09fac e6f7a9c0 089e4877 089e4000 e6e09fac
>>>
>>>          Call Trace:
>>>          [<c1132d3c>] ? rw_verify_area+0x6c/0x120
>>>          [<c11331fc>] vfs_read+0x8c/0x160
>>>          [<f91c2010>] ? read_file_war_stats+0x130/0x130 [ath6kl_core]
>>>          [<c113330d>] sys_read+0x3d/0x70
>>>          [<c15755b4>] syscall_call+0x7/0xb
>>>          [<c1570000>] ? fill_powernow_table_pstate+0x127/0x127
>>>
>>> Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com>
>>> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>
> [...]
>
>>> @@ -1752,8 +1752,10 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
>>>          debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
>>>                              &fops_tgt_stats);
>>>
>>> -       debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar,
>>> -                           &fops_credit_dist_stats);
>>> +       if (ar->hif_type != ATH6KL_HIF_TYPE_SDIO)
>>
>> made a mistake,
>> should be > +       if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
>> will send another patch
>
> Oh, I missed as well. I rebased ath6kl-next branch and dropped patch 5
> (but kept patches 1-4). Please resend patch 5.
>

sure thanks!

-- 
thanks,
shafi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-12 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 14:50 [PATCH v2 5/5] ath6kl: Fix a debugfs crash for USB devices Mohammed Shafi Shajakhan
2013-03-08 15:29 ` Mohammed Shafi
2013-03-09  7:38   ` Kalle Valo
2013-03-12 16:15     ` Mohammed Shafi Shajakhan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.