Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1414483

[PATCH 4.4 36/99] ath10k: fix kernel panic, move arvifs list head init before htt init

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.4 36/99] ath10k: fix kernel panic, move arvifs list head init before htt init
Date 2016-06-06 01:00 +0200
Message-ID <rGPbr-4oQ-3@gated-at.bofh.it> (permalink)
References <rGO5H-3HY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Anilkumar Kolli <akolli@qti.qualcomm.com>

commit 4ad24a9d83bd4bf0a85e95bf144e18d3fda4fbf1 upstream.

It is observed that while loading and unloading ath10k modules
in an infinite loop, before ath10k_core_start() completion HTT
rx frames are received, while processing these frames,
dereferencing the arvifs list code is getting hit before
initilizing the arvifs list, causing a kernel panic.

This patch initilizes the arvifs list before initilizing htt.

Fixes the below issue:
 [<bf88b058>] (ath10k_htt_rx_pktlog_completion_handler+0x278/0xd08 [ath10k_core])
 [<bf88b058>] (ath10k_htt_rx_pktlog_completion_handler [ath10k_core])
 [<bf88c0dc>] (ath10k_htt_txrx_compl_task+0x5f4/0xeb0 [ath10k_core])
 [<bf88c0dc>] (ath10k_htt_txrx_compl_task [ath10k_core])
 [<c0234100>] (tasklet_action+0x8c/0xec)
 [<c0234100>] (tasklet_action)
 [<c02337c0>] (__do_softirq+0xf8/0x228)
 [<c02337c0>] (__do_softirq)  [<c0233920>] (run_ksoftirqd+0x30/0x90)
 Code: e5954ad8 e2899008 e1540009 0a00000d (e5943008)
 ---[ end trace 71de5c2e011dbf56 ]---
 Kernel panic - not syncing: Fatal exception in interrupt

Fixes: 500ff9f9389d ("ath10k: implement chanctx API")
Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ath/ath10k/core.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1681,6 +1681,10 @@ int ath10k_core_start(struct ath10k *ar,
 		goto err_hif_stop;
 	}
 
+	ar->free_vdev_map = (1LL << ar->max_num_vdevs) - 1;
+
+	INIT_LIST_HEAD(&ar->arvifs);
+
 	/* we don't care about HTT in UTF mode */
 	if (mode == ATH10K_FIRMWARE_MODE_NORMAL) {
 		status = ath10k_htt_setup(&ar->htt);
@@ -1694,10 +1698,6 @@ int ath10k_core_start(struct ath10k *ar,
 	if (status)
 		goto err_hif_stop;
 
-	ar->free_vdev_map = (1LL << ar->max_num_vdevs) - 1;
-
-	INIT_LIST_HEAD(&ar->arvifs);
-
 	return 0;
 
 err_hif_stop:

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.4 00/99] 4.4.13-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 64/99] pipe: limit the per-user amount of pages allocated in pipes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 84/99] ext4: clean up error handling when orphan list is corrupted Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 03/99] MIPS: MSA: Fix a link error on `_init_msa_upper with older GCC Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 10/99] MIPS: Sync icache & dcache in set_pte_at Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 16/99] MIPS: Prevent "restoration" of MSA context in non-MSA kernels Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 04/99] MIPS: Dont unwind to user mode with EVA Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 68/99] powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 51/99] cpuidle: Indicate when a device has been unregistered Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 41/99] rtlwifi: Fix logic error in enter/exit power-save mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 73/99] drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 65/99] powerpc/book3s64: Fix branching to OOL handlers in relocatable kernel Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 02/99] MIPS: math-emu: Fix jalr emulation when rd == $0 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 12/99] MIPS: Reserve nosave data for hibernation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 62/99] QE-UART: add "fsl,t1040-ucc-uart" to of_device_id Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 66/99] powerpc/eeh: Dont report error in eeh_pe_reset_and_recover() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 83/99] ext4: fix hang when processing corrupted orphaned inode list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 69/99] xen/events: Dont move disabled irqs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 58/99] PCI: Disable all BAR sizing for devices with non-compliant BARs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 61/99] wait/ptrace: assume __WALL if the child is traced Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 70/99] xen: use same main loop for counting and remapping pages Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 35/99] ath10k: fix rx_channel during hw reconfigure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 39/99] rtlwifi: rtl8723be: Add antenna select module parameter Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 55/99] clk: bcm2835: pll_off should only update CM_PLL_ANARST Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-05 23:50 +0200
  [PATCH 4.4 86/99] ext4: address UBSAN warning in mb_find_order_for_block() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 80/99] drm/atomic: Verify connector->funcs != NULL when clearing states Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 93/99] xfs: Dont wrap growfs AGFL indexes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 91/99] gcov: disable tree-loop-im to reduce stack usage Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 90/99] scripts/package/Makefile: rpmbuild add support of RPMOPTS Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 77/99] drm/amdgpu: Fix hdmi deep color support. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 52/99] cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 85/99] ext4: fix oops on corrupted filesystem Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 92/99] xfs: disallow rw remount on fs with unknown ro-compat features Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 53/99] clk: bcm2835: Fix PLL poweron Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 79/99] drm/fb_helper: Fix references to dev->mode_config.num_connector Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:00 +0200
  [PATCH 4.4 94/99] xfs: xfs_iflush_cluster fails to abort on error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:30 +0200
  [PATCH 4.4 76/99] drm/amdgpu: use drm_mode_vrefresh() rather than mode->vrefresh Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:30 +0200
  [PATCH 4.4 98/99] xfs: handle dquot buffer readahead in log recovery correctly Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:30 +0200
  [PATCH 4.4 99/99] gpio: davinci: fix missed parent conversion Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:30 +0200
  [PATCH 4.4 78/99] drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:30 +0200
  [PATCH 4.4 87/99] ext4: silence UBSAN in ext4_mb_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 00:50 +0200
  [PATCH 4.4 23/99] MIPS: VDSO: Build with `-fno-strict-aliasing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 36/99] ath10k: fix kernel panic, move arvifs list head init before htt init Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 75/99] drm/vmwgfx: Fix order of operation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 25/99] ASoC: ak4642: Enable cache usage to fix crashes on resume Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 34/99] ath10k: fix firmware assert in monitor mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 22/99] MIPS: lib: Mark intrinsics notrace Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 44/99] aacraid: Fix for aac_command_thread hang Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 42/99] rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 43/99] aacraid: Relinquish CPU during timeout wait Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 45/99] aacraid: Fix for KDUMP driver hang Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 33/99] ath10k: fix debugfs pktlog_filter write Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 30/99] ARM: dts: imx35: restore existing used clock enumeration Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 40/99] rtlwifi: btcoexist: Implement antenna selection Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 37/99] ath5k: Change led pin configuration for compaq c700 laptop Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 72/99] drm/gma500: Fix possible out of bounds read Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 32/99] ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 56/99] clk: bcm2835: divider value has to be 1 or more Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 38/99] hwrng: exynos - Fix unbalanced PM runtime put on timeout error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 88/99] PM / sleep: Handle failures in device_suspend_late() consistently Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 26/99] Input: uinput - handle compat ioctl for UI_SET_PHYS Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 27/99] ARM: mvebu: fix GPIO config on the Linksys boards Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 21/99] MIPS: Build microMIPS VDSO for microMIPS kernels Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 57/99] pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 74/99] drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 47/99] hwmon: (ads7828) Enable internal reference Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 96/99] xfs: skip stale inodes in xfs_iflush_cluster Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 24/99] affs: fix remount failure when there are no options changed Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 18/99] MIPS: ptrace: Fix FP context restoration FCSR regression Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 95/99] xfs: fix inode validity check in xfs_iflush_cluster Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:00 +0200
  [PATCH 4.4 13/99] MIPS: Loongson-3: Reserve 32MB for RS780E integrated GPU Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 05/99] MIPS: Avoid using unwind_stack() with usermode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 01/99] MIPS64: R6: R2 emulation bugfix Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 07/99] MIPS: Fix uapi include in exported asm/siginfo.h Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 19/99] MIPS: ptrace: Prevent writes to read-only FCSR bits Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 14/99] MIPS: Use copy_s.fmt rather than copy_u.fmt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 06/99] MIPS: Fix siginfo.h to use strict posix types Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 20/99] MIPS: Fix sigreturn via VDSO on microMIPS kernel Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 08/99] MIPS: Fix watchpoint restoration Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 09/99] MIPS: Handle highmem pages in __update_cache Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 15/99] MIPS: Fix MSA ld_*/st_* asm macros to use PTR_ADDU Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 28/99] ARM: dts: at91: fix typo in sama5d2 PIN_PD24 description Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  [PATCH 4.4 29/99] ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-06 01:10 +0200
  Re: [PATCH 4.4 00/99] 4.4.13-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-06-06 19:30 +0200
  Re: [PATCH 4.4 00/99] 4.4.13-stable review Guenter Roeck <linux@roeck-us.net> - 2016-06-07 06:10 +0200
    Re: [PATCH 4.4 00/99] 4.4.13-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-08 03:10 +0200
    Re: [PATCH 4.4 00/99] 4.4.13-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-08 03:10 +0200

csiph-web