* [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb
@ 2015-08-06 10:26 Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 2/3] mwifiex: fix command timeout for PCIe chipsets Amitkumar Karwar
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Amitkumar Karwar @ 2015-08-06 10:26 UTC (permalink / raw)
To: linux-wireless
Cc: Cathy Luo, Nishant Sarmukadam, stable, Reyad Attiyat, Kalle Valo
From: Reyad Attiyat <reyad.attiyat@gmail.com>
There is an error that can occur where the driver adds the same URB to USB submission list twice.
This happens since mwifiex_usb_submit_rem_rx can submit packets at same time as an rx urb complete callback.
This causes list corruption and is fixed by not setting the skb to NULL when submitting an rx packet.
[ 84.461242] WARNING: CPU: 1 PID: 748 at lib/list_debug.c:36 __list_add+0xcb/0xd0()
[ 84.461245] list_add double add: new=ffff8800c92b0c50, prev=ffff8800c92b0c50, next=ffff8800ced6c430.
[ 84.461247] Modules linked in: rfcomm fuse cmac nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack bnep iptable_mangle iptable_security iptable_raw btusb btintel bluetooth mwifiex_usb mwifiex x86_pkg_temp_thermal cfg80211 coretemp r8712u(C) kvm_intel kvm hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf rfkill iTCO_wdt industrialio iTCO_vendor_support
[ 84.461316] crc32_pclmul crc32c_intel ghash_clmulni_intel microcode snd_hda_codec_realtek vfat snd_hda_codec_generic fat snd_hda_codec_hdmi snd_hda_intel snd_hda_controller uvcvideo snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hwdep videobuf2_core snd_hda_core joydev v4l2_common videodev hid_sensor_hub snd_seq hid_multitouch media snd_seq_device snd_pcm snd_timer mei_me snd i2c_i801 lpc_ich mei soundcore tpm_infineon tpm_tis tpm i2c_hid i2c_designware_platform i2c_designware_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel i915 i2c_algo_bit drm_kms_helper drm xhci_pci xhci_hcd ehci_pci sd_mod ehci_hcd video
[ 84.461383] CPU: 1 PID: 748 Comm: kworker/u9:0 Tainted: G C 4.1.0-rc5+ #163
[ 84.461386] Hardware name: Microsoft Corporation Surface Pro 2/Surface Pro 2, BIOS 2.05.0250 04/10/2015
[ 84.461396] Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue [mwifiex]
[ 84.461399] ffffffff81a8150e ffff8801174cf8e8 ffffffff817df830 0000000000000000
[ 84.461405] ffff8801174cf938 ffff8801174cf928 ffffffff810a54ba ffff8800c86bd750
[ 84.461410] ffff8800c92b0c50 ffff8800c92b0c50 ffff8800ced6c430 ffff88010c057178
[ 84.461416] Call Trace:
[ 84.461421] [<ffffffff817df830>] dump_stack+0x4f/0x7b
[ 84.461428] [<ffffffff810a54ba>] warn_slowpath_common+0x8a/0xc0
[ 84.461432] [<ffffffff810a5536>] warn_slowpath_fmt+0x46/0x50
[ 84.461436] [<ffffffff814109fb>] __list_add+0xcb/0xd0
[ 84.461442] [<ffffffff815c551a>] ? usb_hcd_link_urb_to_ep+0x2a/0xa0
[ 84.461446] [<ffffffff815c5570>] usb_hcd_link_urb_to_ep+0x80/0xa0
[ 84.461459] [<ffffffffa004318a>] prepare_transfer+0xaa/0x130 [xhci_hcd]
[ 84.461470] [<ffffffffa0044cf7>] xhci_queue_bulk_tx+0xb7/0x7a0 [xhci_hcd]
[ 84.461480] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660 [xhci_hcd]
[ 84.461489] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660 [xhci_hcd]
[ 84.461498] [<ffffffffa003b735>] xhci_urb_enqueue+0x5c5/0x660 [xhci_hcd]
[ 84.461503] [<ffffffff815c7ad3>] usb_hcd_submit_urb+0x93/0xa70
[ 84.461507] [<ffffffff8168dde8>] ? __alloc_skb+0x78/0x1f0
[ 84.461511] [<ffffffff8168d301>] ? __kmalloc_reserve.isra.26+0x31/0x90
[ 84.461515] [<ffffffff8168ddbc>] ? __alloc_skb+0x4c/0x1f0
[ 84.461519] [<ffffffff8168ddfc>] ? __alloc_skb+0x8c/0x1f0
[ 84.461523] [<ffffffff8168badd>] ? skb_dequeue+0x5d/0x80
[ 84.461527] [<ffffffff815c987e>] usb_submit_urb+0x42e/0x5f0
[ 84.461531] [<ffffffff816931d9>] ? __alloc_rx_skb+0x39/0x100
[ 84.461536] [<ffffffffa05aa372>] mwifiex_usb_submit_rx_urb+0xb2/0x170 [mwifiex_usb]
[ 84.461542] [<ffffffffa05aa5f5>] mwifiex_usb_submit_rem_rx_urbs+0x45/0x50 [mwifiex_usb]
[ 84.461550] [<ffffffffa07094be>] mwifiex_rx_work_queue+0x10e/0x140 [mwifiex]
[ 84.461556] [<ffffffff810c4429>] process_one_work+0x229/0x890
[ 84.461559] [<ffffffff810c438c>] ? process_one_work+0x18c/0x890
[ 84.461565] [<ffffffff810c4ae3>] worker_thread+0x53/0x470
[ 84.461569] [<ffffffff810c4a90>] ? process_one_work+0x890/0x890
[ 84.461572] [<ffffffff810cb162>] kthread+0xf2/0x110
[ 84.461577] [<ffffffff811031ad>] ? trace_hardirqs_on+0xd/0x10
[ 84.461581] [<ffffffff810cb070>] ? kthread_create_on_node+0x230/0x230
[ 84.461586] [<ffffffff817e9662>] ret_from_fork+0x42/0x70
[ 84.461590] [<ffffffff810cb070>] ? kthread_create_on_node+0x230/0x230
[ 84.461593] ---[ end trace 65103af5e6fb3444 ]---
Cc: stable@vger.kernel.org # 3.19+
Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/mwifiex/usb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c
index aada934..fbad99c 100644
--- a/drivers/net/wireless/mwifiex/usb.c
+++ b/drivers/net/wireless/mwifiex/usb.c
@@ -244,9 +244,11 @@ setup_for_next:
if (card->rx_cmd_ep == context->ep) {
mwifiex_usb_submit_rx_urb(context, size);
} else {
- context->skb = NULL;
- if (atomic_read(&adapter->rx_pending) <= HIGH_RX_PENDING)
+ if (atomic_read(&adapter->rx_pending) <= HIGH_RX_PENDING){
mwifiex_usb_submit_rx_urb(context, size);
+ }else{
+ context->skb = NULL;
+ }
}
return;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4.2 2/3] mwifiex: fix command timeout for PCIe chipsets
2015-08-06 10:26 [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Amitkumar Karwar
@ 2015-08-06 10:26 ` Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 3/3] mwifiex: fix system crash observed during initialisation Amitkumar Karwar
2015-08-07 8:26 ` [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Kalle Valo
2 siblings, 0 replies; 6+ messages in thread
From: Amitkumar Karwar @ 2015-08-06 10:26 UTC (permalink / raw)
To: linux-wireless
Cc: Cathy Luo, Nishant Sarmukadam, stable, Zhaoyang Liu,
Amitkumar Karwar, Kalle Valo
From: Zhaoyang Liu <liuzy@marvell.com>
When WLAN interface is up and running, driver unload and
load was causing command timeout error.
We enable Rx data by updating RX ring read pointer in
init_fw_port(). It should be done when FW is completely
intialialised. Command timeout is fixed in this patch by
moving init_fw_port() call to mwifiex_init_fw_complete().
Cc: stable@vger.kernel.org # 3.19+
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/mwifiex/init.c | 5 -----
drivers/net/wireless/mwifiex/util.c | 4 ++++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 8fa363a..7a970c2 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -551,11 +551,6 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
}
}
- if (adapter->if_ops.init_fw_port) {
- if (adapter->if_ops.init_fw_port(adapter))
- return -1;
- }
-
for (i = 0; i < adapter->priv_num; i++) {
if (adapter->priv[i]) {
ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta,
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index a5f34f2..0cec8a6 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -126,6 +126,10 @@ static int num_of_items = ARRAY_SIZE(items);
int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter)
{
+ if (adapter->hw_status == MWIFIEX_HW_STATUS_READY)
+ if (adapter->if_ops.init_fw_port)
+ adapter->if_ops.init_fw_port(adapter);
+
adapter->init_wait_q_woken = true;
wake_up_interruptible(&adapter->init_wait_q);
return 0;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4.2 3/3] mwifiex: fix system crash observed during initialisation
2015-08-06 10:26 [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 2/3] mwifiex: fix command timeout for PCIe chipsets Amitkumar Karwar
@ 2015-08-06 10:26 ` Amitkumar Karwar
2015-08-07 8:26 ` [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Kalle Valo
2 siblings, 0 replies; 6+ messages in thread
From: Amitkumar Karwar @ 2015-08-06 10:26 UTC (permalink / raw)
To: linux-wireless
Cc: Cathy Luo, Nishant Sarmukadam, stable, Zhaoyang Liu,
Amitkumar Karwar, Kalle Valo
From: Zhaoyang Liu <liuzy@marvell.com>
System crash was observed if one of the driver initialisation
commands is timed out. The reason is our timeout handler triggers
firmware dump, meanwhile driver initialisation error paths have
already freed the adapter structure.
Firmware hasn't yet completely initialized. So collecting firmware
dump is not needed in this case. Command timeout handler is
modified in this patch to fix the crash issue.
Cc: stable@vger.kernel.org # 3.19+
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/mwifiex/cmdevt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 27b778d..45ae38e 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -979,8 +979,10 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
mwifiex_cancel_pending_ioctl(adapter);
}
}
- if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
+ if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
mwifiex_init_fw_complete(adapter);
+ return;
+ }
if (adapter->if_ops.device_dump)
adapter->if_ops.device_dump(adapter);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb
2015-08-06 10:26 [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 2/3] mwifiex: fix command timeout for PCIe chipsets Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 3/3] mwifiex: fix system crash observed during initialisation Amitkumar Karwar
@ 2015-08-07 8:26 ` Kalle Valo
2015-08-07 8:33 ` Amitkumar Karwar
2 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2015-08-07 8:26 UTC (permalink / raw)
To: Amitkumar Karwar
Cc: linux-wireless, Cathy Luo, Nishant Sarmukadam, stable,
Reyad Attiyat
Amitkumar Karwar <akarwar@marvell.com> writes:
> From: Reyad Attiyat <reyad.attiyat@gmail.com>
>
> There is an error that can occur where the driver adds the same URB to USB submission list twice.
> This happens since mwifiex_usb_submit_rem_rx can submit packets at same time as an rx urb complete callback.
> This causes list corruption and is fixed by not setting the skb to NULL when submitting an rx packet.
>
> [ 84.461242] WARNING: CPU: 1 PID: 748 at lib/list_debug.c:36 __list_add+0xcb/0xd0()
> [ 84.461245] list_add double add: new=ffff8800c92b0c50, prev=ffff8800c92b0c50, next=ffff8800ced6c430.
> [ 84.461247] Modules linked in: rfcomm fuse cmac nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack bnep iptable_mangle iptable_security iptable_raw btusb btintel bluetooth mwifiex_usb mwifiex x86_pkg_temp_thermal cfg80211 coretemp r8712u(C) kvm_intel kvm hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf rfkill iTCO_wdt industrialio iTCO_vendor_support
> [ 84.461316] crc32_pclmul crc32c_intel ghash_clmulni_intel microcode snd_hda_codec_realtek vfat snd_hda_codec_generic fat snd_hda_codec_hdmi snd_hda_intel snd_hda_controller uvcvideo snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hwdep videobuf2_core snd_hda_core joydev v4l2_common videodev hid_sensor_hub snd_seq hid_multitouch media snd_seq_device snd_pcm snd_timer mei_me snd i2c_i801 lpc_ich mei soundcore tpm_infineon tpm_tis tpm i2c_hid i2c_designware_platform i2c_designware_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel i915 i2c_algo_bit drm_kms_helper drm xhci_pci xhci_hcd ehci_pci sd_mod ehci_hcd video
> [ 84.461383] CPU: 1 PID: 748 Comm: kworker/u9:0 Tainted: G C 4.1.0-rc5+ #163
> [ 84.461386] Hardware name: Microsoft Corporation Surface Pro 2/Surface Pro 2, BIOS 2.05.0250 04/10/2015
> [ 84.461396] Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue [mwifiex]
> [ 84.461399] ffffffff81a8150e ffff8801174cf8e8 ffffffff817df830 0000000000000000
> [ 84.461405] ffff8801174cf938 ffff8801174cf928 ffffffff810a54ba ffff8800c86bd750
> [ 84.461410] ffff8800c92b0c50 ffff8800c92b0c50 ffff8800ced6c430 ffff88010c057178
> [ 84.461416] Call Trace:
> [ 84.461421] [<ffffffff817df830>] dump_stack+0x4f/0x7b
> [ 84.461428] [<ffffffff810a54ba>] warn_slowpath_common+0x8a/0xc0
> [ 84.461432] [<ffffffff810a5536>] warn_slowpath_fmt+0x46/0x50
> [ 84.461436] [<ffffffff814109fb>] __list_add+0xcb/0xd0
> [ 84.461442] [<ffffffff815c551a>] ? usb_hcd_link_urb_to_ep+0x2a/0xa0
> [ 84.461446] [<ffffffff815c5570>] usb_hcd_link_urb_to_ep+0x80/0xa0
> [ 84.461459] [<ffffffffa004318a>] prepare_transfer+0xaa/0x130 [xhci_hcd]
> [ 84.461470] [<ffffffffa0044cf7>] xhci_queue_bulk_tx+0xb7/0x7a0 [xhci_hcd]
> [ 84.461480] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660 [xhci_hcd]
> [ 84.461489] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660 [xhci_hcd]
> [ 84.461498] [<ffffffffa003b735>] xhci_urb_enqueue+0x5c5/0x660 [xhci_hcd]
> [ 84.461503] [<ffffffff815c7ad3>] usb_hcd_submit_urb+0x93/0xa70
> [ 84.461507] [<ffffffff8168dde8>] ? __alloc_skb+0x78/0x1f0
> [ 84.461511] [<ffffffff8168d301>] ? __kmalloc_reserve.isra.26+0x31/0x90
> [ 84.461515] [<ffffffff8168ddbc>] ? __alloc_skb+0x4c/0x1f0
> [ 84.461519] [<ffffffff8168ddfc>] ? __alloc_skb+0x8c/0x1f0
> [ 84.461523] [<ffffffff8168badd>] ? skb_dequeue+0x5d/0x80
> [ 84.461527] [<ffffffff815c987e>] usb_submit_urb+0x42e/0x5f0
> [ 84.461531] [<ffffffff816931d9>] ? __alloc_rx_skb+0x39/0x100
> [ 84.461536] [<ffffffffa05aa372>] mwifiex_usb_submit_rx_urb+0xb2/0x170 [mwifiex_usb]
> [ 84.461542] [<ffffffffa05aa5f5>] mwifiex_usb_submit_rem_rx_urbs+0x45/0x50 [mwifiex_usb]
> [ 84.461550] [<ffffffffa07094be>] mwifiex_rx_work_queue+0x10e/0x140 [mwifiex]
> [ 84.461556] [<ffffffff810c4429>] process_one_work+0x229/0x890
> [ 84.461559] [<ffffffff810c438c>] ? process_one_work+0x18c/0x890
> [ 84.461565] [<ffffffff810c4ae3>] worker_thread+0x53/0x470
> [ 84.461569] [<ffffffff810c4a90>] ? process_one_work+0x890/0x890
> [ 84.461572] [<ffffffff810cb162>] kthread+0xf2/0x110
> [ 84.461577] [<ffffffff811031ad>] ? trace_hardirqs_on+0xd/0x10
> [ 84.461581] [<ffffffff810cb070>] ? kthread_create_on_node+0x230/0x230
> [ 84.461586] [<ffffffff817e9662>] ret_from_fork+0x42/0x70
> [ 84.461590] [<ffffffff810cb070>] ? kthread_create_on_node+0x230/0x230
> [ 84.461593] ---[ end trace 65103af5e6fb3444 ]---
>
> Cc: stable@vger.kernel.org # 3.19+
> Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
> Acked-by: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
What do you want to do with these patches exactly? These three are
already in wireless-drivers-next so I cannot apply to wireless-drivers
anymore (and that's why I cannot push them to 4.2).
--
Kalle Valo
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb
2015-08-07 8:26 ` [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Kalle Valo
@ 2015-08-07 8:33 ` Amitkumar Karwar
2015-08-07 18:09 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Amitkumar Karwar @ 2015-08-07 8:33 UTC (permalink / raw)
To: Kalle Valo
Cc: linux-wireless@vger.kernel.org, Cathy Luo, Nishant Sarmukadam,
stable@vger.kernel.org, Reyad Attiyat
Hi Kalle,
> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> Sent: Friday, August 07, 2015 1:56 PM
> To: Amitkumar Karwar
> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
> stable@vger.kernel.org; Reyad Attiyat
> Subject: Re: [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when
> submitting rx urb
>
> Amitkumar Karwar <akarwar@marvell.com> writes:
>
> > From: Reyad Attiyat <reyad.attiyat@gmail.com>
> >
> > There is an error that can occur where the driver adds the same URB to
> USB submission list twice.
> > This happens since mwifiex_usb_submit_rem_rx can submit packets at
> same time as an rx urb complete callback.
> > This causes list corruption and is fixed by not setting the skb to
> NULL when submitting an rx packet.
> >
> > [ 84.461242] WARNING: CPU: 1 PID: 748 at lib/list_debug.c:36
> __list_add+0xcb/0xd0()
> > [ 84.461245] list_add double add: new=ffff8800c92b0c50,
> prev=ffff8800c92b0c50, next=ffff8800ced6c430.
> > [ 84.461247] Modules linked in: rfcomm fuse cmac
> nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT
> nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc
> ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6
> nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw
> ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4
> nf_nat_ipv4 nf_nat nf_conntrack bnep iptable_mangle iptable_security
> iptable_raw btusb btintel bluetooth mwifiex_usb mwifiex
> x86_pkg_temp_thermal cfg80211 coretemp r8712u(C) kvm_intel kvm
> hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d
> hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger
> hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf rfkill
> iTCO_wdt industrialio iTCO_vendor_support
> > [ 84.461316] crc32_pclmul crc32c_intel ghash_clmulni_intel
> microcode snd_hda_codec_realtek vfat snd_hda_codec_generic fat
> snd_hda_codec_hdmi snd_hda_intel snd_hda_controller uvcvideo
> snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hwdep
> videobuf2_core snd_hda_core joydev v4l2_common videodev hid_sensor_hub
> snd_seq hid_multitouch media snd_seq_device snd_pcm snd_timer mei_me snd
> i2c_i801 lpc_ich mei soundcore tpm_infineon tpm_tis tpm i2c_hid
> i2c_designware_platform i2c_designware_core nfsd auth_rpcgss nfs_acl
> lockd grace sunrpc sch_fq_codel i915 i2c_algo_bit drm_kms_helper drm
> xhci_pci xhci_hcd ehci_pci sd_mod ehci_hcd video
> > [ 84.461383] CPU: 1 PID: 748 Comm: kworker/u9:0 Tainted: G C
> 4.1.0-rc5+ #163
> > [ 84.461386] Hardware name: Microsoft Corporation Surface Pro
> 2/Surface Pro 2, BIOS 2.05.0250 04/10/2015
> > [ 84.461396] Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue
> [mwifiex]
> > [ 84.461399] ffffffff81a8150e ffff8801174cf8e8 ffffffff817df830
> 0000000000000000
> > [ 84.461405] ffff8801174cf938 ffff8801174cf928 ffffffff810a54ba
> ffff8800c86bd750
> > [ 84.461410] ffff8800c92b0c50 ffff8800c92b0c50 ffff8800ced6c430
> ffff88010c057178
> > [ 84.461416] Call Trace:
> > [ 84.461421] [<ffffffff817df830>] dump_stack+0x4f/0x7b
> > [ 84.461428] [<ffffffff810a54ba>] warn_slowpath_common+0x8a/0xc0
> > [ 84.461432] [<ffffffff810a5536>] warn_slowpath_fmt+0x46/0x50
> > [ 84.461436] [<ffffffff814109fb>] __list_add+0xcb/0xd0
> > [ 84.461442] [<ffffffff815c551a>] ?
> usb_hcd_link_urb_to_ep+0x2a/0xa0
> > [ 84.461446] [<ffffffff815c5570>] usb_hcd_link_urb_to_ep+0x80/0xa0
> > [ 84.461459] [<ffffffffa004318a>] prepare_transfer+0xaa/0x130
> [xhci_hcd]
> > [ 84.461470] [<ffffffffa0044cf7>] xhci_queue_bulk_tx+0xb7/0x7a0
> [xhci_hcd]
> > [ 84.461480] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660
> [xhci_hcd]
> > [ 84.461489] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660
> [xhci_hcd]
> > [ 84.461498] [<ffffffffa003b735>] xhci_urb_enqueue+0x5c5/0x660
> [xhci_hcd]
> > [ 84.461503] [<ffffffff815c7ad3>] usb_hcd_submit_urb+0x93/0xa70
> > [ 84.461507] [<ffffffff8168dde8>] ? __alloc_skb+0x78/0x1f0
> > [ 84.461511] [<ffffffff8168d301>] ?
> __kmalloc_reserve.isra.26+0x31/0x90
> > [ 84.461515] [<ffffffff8168ddbc>] ? __alloc_skb+0x4c/0x1f0
> > [ 84.461519] [<ffffffff8168ddfc>] ? __alloc_skb+0x8c/0x1f0
> > [ 84.461523] [<ffffffff8168badd>] ? skb_dequeue+0x5d/0x80
> > [ 84.461527] [<ffffffff815c987e>] usb_submit_urb+0x42e/0x5f0
> > [ 84.461531] [<ffffffff816931d9>] ? __alloc_rx_skb+0x39/0x100
> > [ 84.461536] [<ffffffffa05aa372>]
> mwifiex_usb_submit_rx_urb+0xb2/0x170 [mwifiex_usb]
> > [ 84.461542] [<ffffffffa05aa5f5>]
> mwifiex_usb_submit_rem_rx_urbs+0x45/0x50 [mwifiex_usb]
> > [ 84.461550] [<ffffffffa07094be>] mwifiex_rx_work_queue+0x10e/0x140
> [mwifiex]
> > [ 84.461556] [<ffffffff810c4429>] process_one_work+0x229/0x890
> > [ 84.461559] [<ffffffff810c438c>] ? process_one_work+0x18c/0x890
> > [ 84.461565] [<ffffffff810c4ae3>] worker_thread+0x53/0x470
> > [ 84.461569] [<ffffffff810c4a90>] ? process_one_work+0x890/0x890
> > [ 84.461572] [<ffffffff810cb162>] kthread+0xf2/0x110
> > [ 84.461577] [<ffffffff811031ad>] ? trace_hardirqs_on+0xd/0x10
> > [ 84.461581] [<ffffffff810cb070>] ?
> kthread_create_on_node+0x230/0x230
> > [ 84.461586] [<ffffffff817e9662>] ret_from_fork+0x42/0x70
> > [ 84.461590] [<ffffffff810cb070>] ?
> kthread_create_on_node+0x230/0x230
> > [ 84.461593] ---[ end trace 65103af5e6fb3444 ]---
> >
> > Cc: stable@vger.kernel.org # 3.19+
> > Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
> > Acked-by: Amitkumar Karwar <akarwar@marvell.com>
> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> What do you want to do with these patches exactly? These three are
> already in wireless-drivers-next so I cannot apply to wireless-drivers
> anymore (and that's why I cannot push them to 4.2).
>
These are some critical stability fixes. I want them to be merged to 3.19 onwards stable kernel releases.
I have CCed stable@vger.kernel.org here. Let me know if I missed anything.
Regards,
Amitkumar
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb
2015-08-07 8:33 ` Amitkumar Karwar
@ 2015-08-07 18:09 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2015-08-07 18:09 UTC (permalink / raw)
To: Amitkumar Karwar
Cc: Kalle Valo, linux-wireless@vger.kernel.org, Cathy Luo,
Nishant Sarmukadam, stable@vger.kernel.org, Reyad Attiyat
On Fri, Aug 07, 2015 at 08:33:57AM +0000, Amitkumar Karwar wrote:
> Hi Kalle,
>
> > From: Kalle Valo [mailto:kvalo@codeaurora.org]
> > Sent: Friday, August 07, 2015 1:56 PM
> > To: Amitkumar Karwar
> > Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
> > stable@vger.kernel.org; Reyad Attiyat
> > Subject: Re: [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when
> > submitting rx urb
> >
> > Amitkumar Karwar <akarwar@marvell.com> writes:
> >
> > > From: Reyad Attiyat <reyad.attiyat@gmail.com>
> > >
> > > There is an error that can occur where the driver adds the same URB to
> > USB submission list twice.
> > > This happens since mwifiex_usb_submit_rem_rx can submit packets at
> > same time as an rx urb complete callback.
> > > This causes list corruption and is fixed by not setting the skb to
> > NULL when submitting an rx packet.
> > >
> > > [ 84.461242] WARNING: CPU: 1 PID: 748 at lib/list_debug.c:36
> > __list_add+0xcb/0xd0()
> > > [ 84.461245] list_add double add: new=ffff8800c92b0c50,
> > prev=ffff8800c92b0c50, next=ffff8800ced6c430.
> > > [ 84.461247] Modules linked in: rfcomm fuse cmac
> > nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT
> > nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc
> > ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6
> > nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw
> > ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4
> > nf_nat_ipv4 nf_nat nf_conntrack bnep iptable_mangle iptable_security
> > iptable_raw btusb btintel bluetooth mwifiex_usb mwifiex
> > x86_pkg_temp_thermal cfg80211 coretemp r8712u(C) kvm_intel kvm
> > hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d
> > hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger
> > hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf rfkill
> > iTCO_wdt industrialio iTCO_vendor_support
> > > [ 84.461316] crc32_pclmul crc32c_intel ghash_clmulni_intel
> > microcode snd_hda_codec_realtek vfat snd_hda_codec_generic fat
> > snd_hda_codec_hdmi snd_hda_intel snd_hda_controller uvcvideo
> > snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hwdep
> > videobuf2_core snd_hda_core joydev v4l2_common videodev hid_sensor_hub
> > snd_seq hid_multitouch media snd_seq_device snd_pcm snd_timer mei_me snd
> > i2c_i801 lpc_ich mei soundcore tpm_infineon tpm_tis tpm i2c_hid
> > i2c_designware_platform i2c_designware_core nfsd auth_rpcgss nfs_acl
> > lockd grace sunrpc sch_fq_codel i915 i2c_algo_bit drm_kms_helper drm
> > xhci_pci xhci_hcd ehci_pci sd_mod ehci_hcd video
> > > [ 84.461383] CPU: 1 PID: 748 Comm: kworker/u9:0 Tainted: G C
> > 4.1.0-rc5+ #163
> > > [ 84.461386] Hardware name: Microsoft Corporation Surface Pro
> > 2/Surface Pro 2, BIOS 2.05.0250 04/10/2015
> > > [ 84.461396] Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue
> > [mwifiex]
> > > [ 84.461399] ffffffff81a8150e ffff8801174cf8e8 ffffffff817df830
> > 0000000000000000
> > > [ 84.461405] ffff8801174cf938 ffff8801174cf928 ffffffff810a54ba
> > ffff8800c86bd750
> > > [ 84.461410] ffff8800c92b0c50 ffff8800c92b0c50 ffff8800ced6c430
> > ffff88010c057178
> > > [ 84.461416] Call Trace:
> > > [ 84.461421] [<ffffffff817df830>] dump_stack+0x4f/0x7b
> > > [ 84.461428] [<ffffffff810a54ba>] warn_slowpath_common+0x8a/0xc0
> > > [ 84.461432] [<ffffffff810a5536>] warn_slowpath_fmt+0x46/0x50
> > > [ 84.461436] [<ffffffff814109fb>] __list_add+0xcb/0xd0
> > > [ 84.461442] [<ffffffff815c551a>] ?
> > usb_hcd_link_urb_to_ep+0x2a/0xa0
> > > [ 84.461446] [<ffffffff815c5570>] usb_hcd_link_urb_to_ep+0x80/0xa0
> > > [ 84.461459] [<ffffffffa004318a>] prepare_transfer+0xaa/0x130
> > [xhci_hcd]
> > > [ 84.461470] [<ffffffffa0044cf7>] xhci_queue_bulk_tx+0xb7/0x7a0
> > [xhci_hcd]
> > > [ 84.461480] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660
> > [xhci_hcd]
> > > [ 84.461489] [<ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660
> > [xhci_hcd]
> > > [ 84.461498] [<ffffffffa003b735>] xhci_urb_enqueue+0x5c5/0x660
> > [xhci_hcd]
> > > [ 84.461503] [<ffffffff815c7ad3>] usb_hcd_submit_urb+0x93/0xa70
> > > [ 84.461507] [<ffffffff8168dde8>] ? __alloc_skb+0x78/0x1f0
> > > [ 84.461511] [<ffffffff8168d301>] ?
> > __kmalloc_reserve.isra.26+0x31/0x90
> > > [ 84.461515] [<ffffffff8168ddbc>] ? __alloc_skb+0x4c/0x1f0
> > > [ 84.461519] [<ffffffff8168ddfc>] ? __alloc_skb+0x8c/0x1f0
> > > [ 84.461523] [<ffffffff8168badd>] ? skb_dequeue+0x5d/0x80
> > > [ 84.461527] [<ffffffff815c987e>] usb_submit_urb+0x42e/0x5f0
> > > [ 84.461531] [<ffffffff816931d9>] ? __alloc_rx_skb+0x39/0x100
> > > [ 84.461536] [<ffffffffa05aa372>]
> > mwifiex_usb_submit_rx_urb+0xb2/0x170 [mwifiex_usb]
> > > [ 84.461542] [<ffffffffa05aa5f5>]
> > mwifiex_usb_submit_rem_rx_urbs+0x45/0x50 [mwifiex_usb]
> > > [ 84.461550] [<ffffffffa07094be>] mwifiex_rx_work_queue+0x10e/0x140
> > [mwifiex]
> > > [ 84.461556] [<ffffffff810c4429>] process_one_work+0x229/0x890
> > > [ 84.461559] [<ffffffff810c438c>] ? process_one_work+0x18c/0x890
> > > [ 84.461565] [<ffffffff810c4ae3>] worker_thread+0x53/0x470
> > > [ 84.461569] [<ffffffff810c4a90>] ? process_one_work+0x890/0x890
> > > [ 84.461572] [<ffffffff810cb162>] kthread+0xf2/0x110
> > > [ 84.461577] [<ffffffff811031ad>] ? trace_hardirqs_on+0xd/0x10
> > > [ 84.461581] [<ffffffff810cb070>] ?
> > kthread_create_on_node+0x230/0x230
> > > [ 84.461586] [<ffffffff817e9662>] ret_from_fork+0x42/0x70
> > > [ 84.461590] [<ffffffff810cb070>] ?
> > kthread_create_on_node+0x230/0x230
> > > [ 84.461593] ---[ end trace 65103af5e6fb3444 ]---
> > >
> > > Cc: stable@vger.kernel.org # 3.19+
> > > Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
> > > Acked-by: Amitkumar Karwar <akarwar@marvell.com>
> > > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> >
> > What do you want to do with these patches exactly? These three are
> > already in wireless-drivers-next so I cannot apply to wireless-drivers
> > anymore (and that's why I cannot push them to 4.2).
> >
>
> These are some critical stability fixes. I want them to be merged to 3.19 onwards stable kernel releases.
> I have CCed stable@vger.kernel.org here. Let me know if I missed anything.
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-07 18:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06 10:26 [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 2/3] mwifiex: fix command timeout for PCIe chipsets Amitkumar Karwar
2015-08-06 10:26 ` [PATCH 4.2 3/3] mwifiex: fix system crash observed during initialisation Amitkumar Karwar
2015-08-07 8:26 ` [PATCH 4.2 1/3] mwifiex: usb: Fix double add error when submitting rx urb Kalle Valo
2015-08-07 8:33 ` Amitkumar Karwar
2015-08-07 18:09 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).