<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/wireless, branch linux-4.17.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ath10k: update the phymode along with bandwidth change request</title>
<updated>2018-08-24T11:06:53+00:00</updated>
<author>
<name>Ryan Hsu</name>
<email>ryanhsu@codeaurora.org</email>
</author>
<published>2018-06-18T14:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8ddb02be59a552fe6e8db5fe8633de47baa3eca2'/>
<id>8ddb02be59a552fe6e8db5fe8633de47baa3eca2</id>
<content type='text'>
[ Upstream commit 9191fc2a431bade3dedc9ad17759495a9f82f41b ]

In the case of Station connects to AP with narrower bandwidth at beginning.
And later the AP changes the bandwidth to winder bandwidth, the AP will
beacon with wider bandwidth IE, eg VHT20-&gt;VHT40-&gt;VHT80 or VHT40-&gt;VHT80.

Since the supported BANDWIDTH will be limited by the PHYMODE, so while
Station receives the bandwidth change request, it will also need to
reconfigure the PHYMODE setting to firmware instead of just configuring
the BANDWIDTH info, otherwise it'll trigger a firmware crash with
non-support bandwidth.

The issue was observed in WLAN.RM.4.4.1-00051-QCARMSWP-1, QCA6174 with
below scenario:

AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz)
disconnect from AP xxx for new auth to yyy
RX ReassocResp from xxx (capab=0x1111 status=0 aid=102)
associated

....

AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz)
AP xxx changed bandwidth, new config is 5200 MHz, width 3 (5210/0 MHz)

....

firmware register dump:
[00]: 0x05030000 0x000015B3 0x00987291 0x00955B31
[04]: 0x00987291 0x00060730 0x00000004 0x00000001
[08]: 0x004089F0 0x00955A00 0x000A0B00 0x00400000
[12]: 0x00000009 0x00000000 0x00952CD0 0x00952CE6
[16]: 0x00952CC4 0x0098E25F 0x00000000 0x0091080D
[20]: 0x40987291 0x0040E7A8 0x00000000 0x0041EE3C
[24]: 0x809ABF05 0x0040E808 0x00000000 0xC0987291
[28]: 0x809A650C 0x0040E948 0x0041FE40 0x004345C4
[32]: 0x809A5C63 0x0040E988 0x0040E9AC 0x0042D1A8
[36]: 0x8091D252 0x0040E9A8 0x00000002 0x00000001
[40]: 0x809FDA9D 0x0040EA58 0x0043D554 0x0042D554
[44]: 0x809F8B22 0x0040EA78 0x0043D554 0x00000001
[48]: 0x80911210 0x0040EAC8 0x00000010 0x004041D0
[52]: 0x80911154 0x0040EB28 0x00400000 0x00000000
[56]: 0x8091122D 0x0040EB48 0x00000000 0x00400600

Reported-by: Rouven Czerwinski &lt;rouven@czerwinskis.de&gt;
Tested-by: Timur Kristóf &lt;timur.kristof@gmail.com&gt;
Signed-off-by: Ryan Hsu &lt;ryanhsu@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 9191fc2a431bade3dedc9ad17759495a9f82f41b ]

In the case of Station connects to AP with narrower bandwidth at beginning.
And later the AP changes the bandwidth to winder bandwidth, the AP will
beacon with wider bandwidth IE, eg VHT20-&gt;VHT40-&gt;VHT80 or VHT40-&gt;VHT80.

Since the supported BANDWIDTH will be limited by the PHYMODE, so while
Station receives the bandwidth change request, it will also need to
reconfigure the PHYMODE setting to firmware instead of just configuring
the BANDWIDTH info, otherwise it'll trigger a firmware crash with
non-support bandwidth.

The issue was observed in WLAN.RM.4.4.1-00051-QCARMSWP-1, QCA6174 with
below scenario:

AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz)
disconnect from AP xxx for new auth to yyy
RX ReassocResp from xxx (capab=0x1111 status=0 aid=102)
associated

....

AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz)
AP xxx changed bandwidth, new config is 5200 MHz, width 3 (5210/0 MHz)

....

firmware register dump:
[00]: 0x05030000 0x000015B3 0x00987291 0x00955B31
[04]: 0x00987291 0x00060730 0x00000004 0x00000001
[08]: 0x004089F0 0x00955A00 0x000A0B00 0x00400000
[12]: 0x00000009 0x00000000 0x00952CD0 0x00952CE6
[16]: 0x00952CC4 0x0098E25F 0x00000000 0x0091080D
[20]: 0x40987291 0x0040E7A8 0x00000000 0x0041EE3C
[24]: 0x809ABF05 0x0040E808 0x00000000 0xC0987291
[28]: 0x809A650C 0x0040E948 0x0041FE40 0x004345C4
[32]: 0x809A5C63 0x0040E988 0x0040E9AC 0x0042D1A8
[36]: 0x8091D252 0x0040E9A8 0x00000002 0x00000001
[40]: 0x809FDA9D 0x0040EA58 0x0043D554 0x0042D554
[44]: 0x809F8B22 0x0040EA78 0x0043D554 0x00000001
[48]: 0x80911210 0x0040EAC8 0x00000010 0x004041D0
[52]: 0x80911154 0x0040EB28 0x00400000 0x00000000
[56]: 0x8091122D 0x0040EB48 0x00000000 0x00400600

Reported-by: Rouven Czerwinski &lt;rouven@czerwinskis.de&gt;
Tested-by: Timur Kristóf &lt;timur.kristof@gmail.com&gt;
Signed-off-by: Ryan Hsu &lt;ryanhsu@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>brcmfmac: stop watchdog before detach and free everything</title>
<updated>2018-08-24T11:06:48+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>michael@amarulasolutions.com</email>
</author>
<published>2018-05-30T09:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=23e94126ee9b9bdf5cb49c9cc4fcb7f6466b90eb'/>
<id>23e94126ee9b9bdf5cb49c9cc4fcb7f6466b90eb</id>
<content type='text'>
[ Upstream commit 373c83a801f15b1e3d02d855fad89112bd4ccbe0 ]

Using built-in in kernel image without a firmware in filesystem
or in the kernel image can lead to a kernel NULL pointer deference.
Watchdog need to be stopped in brcmf_sdio_remove

The system is going down NOW!
[ 1348.110759] Unable to handle kernel NULL pointer dereference at virtual address 000002f8
Sent SIGTERM to all processes
[ 1348.121412] Mem abort info:
[ 1348.126962]   ESR = 0x96000004
[ 1348.130023]   Exception class = DABT (current EL), IL = 32 bits
[ 1348.135948]   SET = 0, FnV = 0
[ 1348.138997]   EA = 0, S1PTW = 0
[ 1348.142154] Data abort info:
[ 1348.145045]   ISV = 0, ISS = 0x00000004
[ 1348.148884]   CM = 0, WnR = 0
[ 1348.151861] user pgtable: 4k pages, 48-bit VAs, pgdp = (____ptrval____)
[ 1348.158475] [00000000000002f8] pgd=0000000000000000
[ 1348.163364] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 1348.168927] Modules linked in: ipv6
[ 1348.172421] CPU: 3 PID: 1421 Comm: brcmf_wdog/mmc0 Not tainted 4.17.0-rc5-next-20180517 #18
[ 1348.180757] Hardware name: Amarula A64-Relic (DT)
[ 1348.185455] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 1348.190251] pc : brcmf_sdiod_freezer_count+0x0/0x20
[ 1348.195124] lr : brcmf_sdio_watchdog_thread+0x64/0x290
[ 1348.200253] sp : ffff00000b85be30
[ 1348.203561] x29: ffff00000b85be30 x28: 0000000000000000
[ 1348.208868] x27: ffff00000b6cb918 x26: ffff80003b990638
[ 1348.214176] x25: ffff0000087b1a20 x24: ffff80003b94f800
[ 1348.219483] x23: ffff000008e620c8 x22: ffff000008f0b660
[ 1348.224790] x21: ffff000008c6a858 x20: 00000000fffffe00
[ 1348.230097] x19: ffff80003b94f800 x18: 0000000000000001
[ 1348.235404] x17: 0000ffffab2e8a74 x16: ffff0000080d7de8
[ 1348.240711] x15: 0000000000000000 x14: 0000000000000400
[ 1348.246018] x13: 0000000000000400 x12: 0000000000000001
[ 1348.251324] x11: 00000000000002c4 x10: 0000000000000a10
[ 1348.256631] x9 : ffff00000b85bc40 x8 : ffff80003be11870
[ 1348.261937] x7 : ffff80003dfc7308 x6 : 000000078ff08b55
[ 1348.267243] x5 : 00000139e1058400 x4 : 0000000000000000
[ 1348.272550] x3 : dead000000000100 x2 : 958f2788d6618100
[ 1348.277856] x1 : 00000000fffffe00 x0 : 0000000000000000

Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Acked-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Tested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 373c83a801f15b1e3d02d855fad89112bd4ccbe0 ]

Using built-in in kernel image without a firmware in filesystem
or in the kernel image can lead to a kernel NULL pointer deference.
Watchdog need to be stopped in brcmf_sdio_remove

The system is going down NOW!
[ 1348.110759] Unable to handle kernel NULL pointer dereference at virtual address 000002f8
Sent SIGTERM to all processes
[ 1348.121412] Mem abort info:
[ 1348.126962]   ESR = 0x96000004
[ 1348.130023]   Exception class = DABT (current EL), IL = 32 bits
[ 1348.135948]   SET = 0, FnV = 0
[ 1348.138997]   EA = 0, S1PTW = 0
[ 1348.142154] Data abort info:
[ 1348.145045]   ISV = 0, ISS = 0x00000004
[ 1348.148884]   CM = 0, WnR = 0
[ 1348.151861] user pgtable: 4k pages, 48-bit VAs, pgdp = (____ptrval____)
[ 1348.158475] [00000000000002f8] pgd=0000000000000000
[ 1348.163364] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 1348.168927] Modules linked in: ipv6
[ 1348.172421] CPU: 3 PID: 1421 Comm: brcmf_wdog/mmc0 Not tainted 4.17.0-rc5-next-20180517 #18
[ 1348.180757] Hardware name: Amarula A64-Relic (DT)
[ 1348.185455] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 1348.190251] pc : brcmf_sdiod_freezer_count+0x0/0x20
[ 1348.195124] lr : brcmf_sdio_watchdog_thread+0x64/0x290
[ 1348.200253] sp : ffff00000b85be30
[ 1348.203561] x29: ffff00000b85be30 x28: 0000000000000000
[ 1348.208868] x27: ffff00000b6cb918 x26: ffff80003b990638
[ 1348.214176] x25: ffff0000087b1a20 x24: ffff80003b94f800
[ 1348.219483] x23: ffff000008e620c8 x22: ffff000008f0b660
[ 1348.224790] x21: ffff000008c6a858 x20: 00000000fffffe00
[ 1348.230097] x19: ffff80003b94f800 x18: 0000000000000001
[ 1348.235404] x17: 0000ffffab2e8a74 x16: ffff0000080d7de8
[ 1348.240711] x15: 0000000000000000 x14: 0000000000000400
[ 1348.246018] x13: 0000000000000400 x12: 0000000000000001
[ 1348.251324] x11: 00000000000002c4 x10: 0000000000000a10
[ 1348.256631] x9 : ffff00000b85bc40 x8 : ffff80003be11870
[ 1348.261937] x7 : ffff80003dfc7308 x6 : 000000078ff08b55
[ 1348.267243] x5 : 00000139e1058400 x4 : 0000000000000000
[ 1348.272550] x3 : dead000000000100 x2 : 958f2788d6618100
[ 1348.277856] x1 : 00000000fffffe00 x0 : 0000000000000000

Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Acked-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Tested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>brcmfmac: fix regression in parsing NVRAM for multiple devices</title>
<updated>2018-08-06T14:18:21+00:00</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2018-07-22T21:46:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=afda82507fe24703bfb03a65d7d9a440f0049c5c'/>
<id>afda82507fe24703bfb03a65d7d9a440f0049c5c</id>
<content type='text'>
commit 299b6365a3b7cf7f5ea1c945a420e9ee4841d6f7 upstream.

NVRAM is designed to work with Broadcom's SDK Linux kernel which fakes
PCI domain 0 for all internal MMIO devices. Since official Linux kernel
uses platform devices for that purpose there is a mismatch in numbering
PCI domains.

There used to be a fix for that problem but it was accidentally dropped
during the last firmware loading rework. That resulted in brcmfmac not
being able to extract device specific NVRAM content and all kind of
calibration problems.

Reported-by: Aditya Xavier &lt;adityaxavier@gmail.com&gt;
Fixes: 2baa3aaee27f ("brcmfmac: introduce brcmf_fw_alloc_request() function")
Cc: stable@vger.kernel.org # v4.17+
Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Acked-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 299b6365a3b7cf7f5ea1c945a420e9ee4841d6f7 upstream.

NVRAM is designed to work with Broadcom's SDK Linux kernel which fakes
PCI domain 0 for all internal MMIO devices. Since official Linux kernel
uses platform devices for that purpose there is a mismatch in numbering
PCI domains.

There used to be a fix for that problem but it was accidentally dropped
during the last firmware loading rework. That resulted in brcmfmac not
being able to extract device specific NVRAM content and all kind of
calibration problems.

Reported-by: Aditya Xavier &lt;adityaxavier@gmail.com&gt;
Fixes: 2baa3aaee27f ("brcmfmac: introduce brcmf_fw_alloc_request() function")
Cc: stable@vger.kernel.org # v4.17+
Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Acked-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iwlwifi: add more card IDs for 9000 series</title>
<updated>2018-08-06T14:18:21+00:00</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2018-07-17T10:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b5c014661a4159f7bbbaf583ce3a224dea216484'/>
<id>b5c014661a4159f7bbbaf583ce3a224dea216484</id>
<content type='text'>
commit 0a5257bc6d89c2ae69b9bf955679cb4f89261874 upstream.

Add new device IDs for the 9000 series.

Cc: stable@vger.kernel.org # 4.14
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0a5257bc6d89c2ae69b9bf955679cb4f89261874 upstream.

Add new device IDs for the 9000 series.

Cc: stable@vger.kernel.org # 4.14
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: search all IEs for variant before falling back</title>
<updated>2018-08-03T05:48:00+00:00</updated>
<author>
<name>Thomas Hebb</name>
<email>tommyhebb@gmail.com</email>
</author>
<published>2018-04-13T14:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2435709952b4718565c081a2f50d5d161efb87bb'/>
<id>2435709952b4718565c081a2f50d5d161efb87bb</id>
<content type='text'>
[ Upstream commit c8489668065a283d3027e86e877b103a87f99d22 ]

commit f2593cb1b291 ("ath10k: Search SMBIOS for OEM board file
extension") added a feature to ath10k that allows Board Data File
(BDF) conflicts between multiple devices that use the same device IDs
but have different calibration requirements to be resolved by allowing
a "variant" string to be stored in SMBIOS [and later device tree, added
by commit d06f26c5c8a4 ("ath10k: search DT for qcom,ath10k-calibration-
variant")] that gets appended to the ID stored in board-2.bin.

This original patch had a regression, however. Namely that devices with
a variant present in SMBIOS that didn't need custom BDFs could no longer
find the default BDF, which has no variant appended. The patch was
reverted and re-applied with a fix for this issue in commit 1657b8f84ed9
("search SMBIOS for OEM board file extension").

But the fix to fall back to a default BDF introduced another issue: the
driver currently parses IEs in board-2.bin one by one, and for each one
it first checks to see if it matches the ID with the variant appended.
If it doesn't, it checks to see if it matches the "fallback" ID with no
variant. If a matching BDF is found at any point during this search, the
search is terminated and that BDF is used. The issue is that it's very
possible (and is currently the case for board-2.bin files present in the
ath10k-firmware repository) for the default BDF to occur in an earlier
IE than the variant-specific BDF. In this case, the current code will
happily choose the default BDF even though a better-matching BDF is
present later in the file.

This patch fixes the issue by first searching the entire file for the ID
with variant, and searching for the fallback ID only if that search
fails. It also includes some code cleanup in the area, as
ath10k_core_fetch_board_data_api_n() no longer does its own string
mangling to remove the variant from an ID, instead leaving that job to a
new flag passed to ath10k_core_create_board_name().

I've tested this patch on a QCA4019 and verified that the driver behaves
correctly for 1) both fallback and variant BDFs present, 2) only fallback
BDF present, and 3) no matching BDFs present.

Fixes: 1657b8f84ed9 ("ath10k: search SMBIOS for OEM board file extension")
Signed-off-by: Thomas Hebb &lt;tommyhebb@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c8489668065a283d3027e86e877b103a87f99d22 ]

commit f2593cb1b291 ("ath10k: Search SMBIOS for OEM board file
extension") added a feature to ath10k that allows Board Data File
(BDF) conflicts between multiple devices that use the same device IDs
but have different calibration requirements to be resolved by allowing
a "variant" string to be stored in SMBIOS [and later device tree, added
by commit d06f26c5c8a4 ("ath10k: search DT for qcom,ath10k-calibration-
variant")] that gets appended to the ID stored in board-2.bin.

This original patch had a regression, however. Namely that devices with
a variant present in SMBIOS that didn't need custom BDFs could no longer
find the default BDF, which has no variant appended. The patch was
reverted and re-applied with a fix for this issue in commit 1657b8f84ed9
("search SMBIOS for OEM board file extension").

But the fix to fall back to a default BDF introduced another issue: the
driver currently parses IEs in board-2.bin one by one, and for each one
it first checks to see if it matches the ID with the variant appended.
If it doesn't, it checks to see if it matches the "fallback" ID with no
variant. If a matching BDF is found at any point during this search, the
search is terminated and that BDF is used. The issue is that it's very
possible (and is currently the case for board-2.bin files present in the
ath10k-firmware repository) for the default BDF to occur in an earlier
IE than the variant-specific BDF. In this case, the current code will
happily choose the default BDF even though a better-matching BDF is
present later in the file.

This patch fixes the issue by first searching the entire file for the ID
with variant, and searching for the fallback ID only if that search
fails. It also includes some code cleanup in the area, as
ath10k_core_fetch_board_data_api_n() no longer does its own string
mangling to remove the variant from an ID, instead leaving that job to a
new flag passed to ath10k_core_create_board_name().

I've tested this patch on a QCA4019 and verified that the driver behaves
correctly for 1) both fallback and variant BDFs present, 2) only fallback
BDF present, and 3) no matching BDFs present.

Fixes: 1657b8f84ed9 ("ath10k: search SMBIOS for OEM board file extension")
Signed-off-by: Thomas Hebb &lt;tommyhebb@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rsi: fix nommu_map_sg overflow kernel panic</title>
<updated>2018-08-03T05:47:59+00:00</updated>
<author>
<name>Siva Rebbagondla</name>
<email>siva.rebbagondla@redpinesignals.com</email>
</author>
<published>2018-04-11T06:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4d130239aca06048d0d36f368a0dca4de64e14a3'/>
<id>4d130239aca06048d0d36f368a0dca4de64e14a3</id>
<content type='text'>
[ Upstream commit f700546682a62a87a9615121a37ee7452dab4b76 ]

Following overflow kernel panic is observed on some platforms while
loading the driver. It is fixed if dynamically allocated memory is
passed to SDIO instead of static one

[  927.513963] nommu_map_sg: overflow 17d54064ba7c+20 of device mask ffffffff
[  927.517712] Modules linked in: rsi_sdio(+) cmac bnep arc4 rsi_91x mac80211 cfg80211
	       btrsi rfcomm bluetooth ecdh_generic snd_soc_sst_bytcr_rt5660
[  927.517861] CPU: 0 PID: 1624 Comm: insmod Tainted: G W 4.15.0-1000 #1
[  927.517870] RIP: 0010:sdhci_send_command+0x5f0/0xa90 [sdhci]
[  927.517873] RSP: 0000:ffffac3fc064b6d8 EFLAGS: 00010086
[  927.517895] Call Trace:
[  927.517908]  ? __schedule+0x3cd/0x890
[  927.517915]  ? mod_timer+0x17b/0x3c0
[  927.517922]  sdhci_request+0x7c/0xf0 [sdhci]
[  927.517928]  __mmc_start_request+0x5a/0x170
[  927.517932]  mmc_start_request+0x74/0x90
[  927.517936]  mmc_wait_for_req+0x87/0xe0
[  927.517940]  mmc_io_rw_extended+0x2fd/0x330
[  927.517946]  ? mmc_wait_data_done+0x30/0x30
[  927.517951]  sdio_io_rw_ext_helper+0x160/0x210
[  927.517956]  sdio_writesb+0x1d/0x20
[  927.517966]	rsi_sdio_write_register_multiple+0x68/0x110 [rsi_sdio]
[  927.517976]  rsi_hal_device_init+0x357/0x910 [rsi_91x]
[  927.517983]  ? rsi_hal_device_init+0x357/0x910 [rsi_91x]
[  927.517990]  rsi_probe+0x2c6/0x450 [rsi_sdio]
[  927.517995]  sdio_bus_probe+0xfc/0x110
[  927.518000]  driver_probe_device+0x2b3/0x490
[  927.518005]  __driver_attach+0xdf/0xf0
[  927.518008]  ? driver_probe_device+0x490/0x490
[  927.518014]  bus_for_each_dev+0x6c/0xc0
[  927.518018]  driver_attach+0x1e/0x20
[  927.518021]  bus_add_driver+0x1f4/0x270
[  927.518028]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.518031]  driver_register+0x60/0xe0
[  927.518038]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.518041]  sdio_register_driver+0x20/0x30
[  927.518047]  rsi_module_init+0x16/0x40 [rsi_sdio]

Signed-off-by: Siva Rebbagondla &lt;siva.rebbagondla@redpinesignals.com&gt;
Signed-off-by: Amitkumar Karwar &lt;amit.karwar@redpinesignals.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f700546682a62a87a9615121a37ee7452dab4b76 ]

Following overflow kernel panic is observed on some platforms while
loading the driver. It is fixed if dynamically allocated memory is
passed to SDIO instead of static one

[  927.513963] nommu_map_sg: overflow 17d54064ba7c+20 of device mask ffffffff
[  927.517712] Modules linked in: rsi_sdio(+) cmac bnep arc4 rsi_91x mac80211 cfg80211
	       btrsi rfcomm bluetooth ecdh_generic snd_soc_sst_bytcr_rt5660
[  927.517861] CPU: 0 PID: 1624 Comm: insmod Tainted: G W 4.15.0-1000 #1
[  927.517870] RIP: 0010:sdhci_send_command+0x5f0/0xa90 [sdhci]
[  927.517873] RSP: 0000:ffffac3fc064b6d8 EFLAGS: 00010086
[  927.517895] Call Trace:
[  927.517908]  ? __schedule+0x3cd/0x890
[  927.517915]  ? mod_timer+0x17b/0x3c0
[  927.517922]  sdhci_request+0x7c/0xf0 [sdhci]
[  927.517928]  __mmc_start_request+0x5a/0x170
[  927.517932]  mmc_start_request+0x74/0x90
[  927.517936]  mmc_wait_for_req+0x87/0xe0
[  927.517940]  mmc_io_rw_extended+0x2fd/0x330
[  927.517946]  ? mmc_wait_data_done+0x30/0x30
[  927.517951]  sdio_io_rw_ext_helper+0x160/0x210
[  927.517956]  sdio_writesb+0x1d/0x20
[  927.517966]	rsi_sdio_write_register_multiple+0x68/0x110 [rsi_sdio]
[  927.517976]  rsi_hal_device_init+0x357/0x910 [rsi_91x]
[  927.517983]  ? rsi_hal_device_init+0x357/0x910 [rsi_91x]
[  927.517990]  rsi_probe+0x2c6/0x450 [rsi_sdio]
[  927.517995]  sdio_bus_probe+0xfc/0x110
[  927.518000]  driver_probe_device+0x2b3/0x490
[  927.518005]  __driver_attach+0xdf/0xf0
[  927.518008]  ? driver_probe_device+0x490/0x490
[  927.518014]  bus_for_each_dev+0x6c/0xc0
[  927.518018]  driver_attach+0x1e/0x20
[  927.518021]  bus_add_driver+0x1f4/0x270
[  927.518028]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.518031]  driver_register+0x60/0xe0
[  927.518038]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.518041]  sdio_register_driver+0x20/0x30
[  927.518047]  rsi_module_init+0x16/0x40 [rsi_sdio]

Signed-off-by: Siva Rebbagondla &lt;siva.rebbagondla@redpinesignals.com&gt;
Signed-off-by: Amitkumar Karwar &lt;amit.karwar@redpinesignals.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rsi: Fix 'invalid vdd' warning in mmc</title>
<updated>2018-08-03T05:47:59+00:00</updated>
<author>
<name>Siva Rebbagondla</name>
<email>siva.rebbagondla@redpinesignals.com</email>
</author>
<published>2018-04-11T06:43:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5ea0308c83d12658897b364ebbb71a3d4966657a'/>
<id>5ea0308c83d12658897b364ebbb71a3d4966657a</id>
<content type='text'>
[ Upstream commit 78e450719c702784e42af6da912d3692fd3da0cb ]

While performing cleanup, driver is messing with card-&gt;ocr
value by not masking rocr against ocr_avail. Below panic
is observed with some of the SDIO host controllers due to
this. Issue is resolved by reverting incorrect modifications
to vdd.

[  927.423821] mmc1: Invalid vdd 0x1f
[  927.423925] Modules linked in: rsi_sdio(+) cmac bnep arc4 rsi_91x
	       mac80211 cfg80211 btrsi rfcomm bluetooth ecdh_generic
[  927.424073] CPU: 0 PID: 1624 Comm: insmod Tainted: G		W        4.15.0-1000-caracalla #1
[  927.424075] Hardware name: Dell Inc. Edge Gateway	3003/      , BIOS 01.00.06 01/22/2018
[  927.424082] RIP: 0010:sdhci_set_power_noreg+0xdd/0x190[sdhci]
[  927.424085] RSP: 0018:ffffac3fc064b930 EFLAGS:  00010282
[  927.424107] Call Trace:
[  927.424118]  sdhci_set_power+0x5a/0x60 [sdhci]
[  927.424125]  sdhci_set_ios+0x360/0x3b0 [sdhci]
[  927.424133]  mmc_set_initial_state+0x92/0x120
[  927.424137]  mmc_power_up.part.34+0x33/0x1d0
[  927.424141]  mmc_power_up+0x17/0x20
[  927.424147]  mmc_sdio_runtime_resume+0x2d/0x50
[  927.424151]  mmc_runtime_resume+0x17/0x20
[  927.424156]  __rpm_callback+0xc4/0x200
[  927.424161]  ? idr_alloc_cyclic+0x57/0xd0
[  927.424165]  ? mmc_runtime_suspend+0x20/0x20
[  927.424169]  rpm_callback+0x24/0x80
[  927.424172]  ? mmc_runtime_suspend+0x20/0x20
[  927.424176]  rpm_resume+0x4b3/0x6c0
[  927.424181]  __pm_runtime_resume+0x4e/0x80
[  927.424188]  driver_probe_device+0x41/0x490
[  927.424192]  __driver_attach+0xdf/0xf0
[  927.424196]  ? driver_probe_device+0x490/0x490
[  927.424201]  bus_for_each_dev+0x6c/0xc0
[  927.424205]  driver_attach+0x1e/0x20
[  927.424209]  bus_add_driver+0x1f4/0x270
[  927.424217]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.424221]  driver_register+0x60/0xe0
[  927.424227]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.424231]  sdio_register_driver+0x20/0x30
[  927.424237]  rsi_module_init+0x16/0x40 [rsi_sdio]

Signed-off-by: Siva Rebbagondla &lt;siva.rebbagondla@redpinesignals.com&gt;
Signed-off-by: Amitkumar Karwar &lt;amit.karwar@redpinesignals.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 78e450719c702784e42af6da912d3692fd3da0cb ]

While performing cleanup, driver is messing with card-&gt;ocr
value by not masking rocr against ocr_avail. Below panic
is observed with some of the SDIO host controllers due to
this. Issue is resolved by reverting incorrect modifications
to vdd.

[  927.423821] mmc1: Invalid vdd 0x1f
[  927.423925] Modules linked in: rsi_sdio(+) cmac bnep arc4 rsi_91x
	       mac80211 cfg80211 btrsi rfcomm bluetooth ecdh_generic
[  927.424073] CPU: 0 PID: 1624 Comm: insmod Tainted: G		W        4.15.0-1000-caracalla #1
[  927.424075] Hardware name: Dell Inc. Edge Gateway	3003/      , BIOS 01.00.06 01/22/2018
[  927.424082] RIP: 0010:sdhci_set_power_noreg+0xdd/0x190[sdhci]
[  927.424085] RSP: 0018:ffffac3fc064b930 EFLAGS:  00010282
[  927.424107] Call Trace:
[  927.424118]  sdhci_set_power+0x5a/0x60 [sdhci]
[  927.424125]  sdhci_set_ios+0x360/0x3b0 [sdhci]
[  927.424133]  mmc_set_initial_state+0x92/0x120
[  927.424137]  mmc_power_up.part.34+0x33/0x1d0
[  927.424141]  mmc_power_up+0x17/0x20
[  927.424147]  mmc_sdio_runtime_resume+0x2d/0x50
[  927.424151]  mmc_runtime_resume+0x17/0x20
[  927.424156]  __rpm_callback+0xc4/0x200
[  927.424161]  ? idr_alloc_cyclic+0x57/0xd0
[  927.424165]  ? mmc_runtime_suspend+0x20/0x20
[  927.424169]  rpm_callback+0x24/0x80
[  927.424172]  ? mmc_runtime_suspend+0x20/0x20
[  927.424176]  rpm_resume+0x4b3/0x6c0
[  927.424181]  __pm_runtime_resume+0x4e/0x80
[  927.424188]  driver_probe_device+0x41/0x490
[  927.424192]  __driver_attach+0xdf/0xf0
[  927.424196]  ? driver_probe_device+0x490/0x490
[  927.424201]  bus_for_each_dev+0x6c/0xc0
[  927.424205]  driver_attach+0x1e/0x20
[  927.424209]  bus_add_driver+0x1f4/0x270
[  927.424217]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.424221]  driver_register+0x60/0xe0
[  927.424227]  ? rsi_sdio_ack_intr+0x50/0x50 [rsi_sdio]
[  927.424231]  sdio_register_driver+0x20/0x30
[  927.424237]  rsi_module_init+0x16/0x40 [rsi_sdio]

Signed-off-by: Siva Rebbagondla &lt;siva.rebbagondla@redpinesignals.com&gt;
Signed-off-by: Amitkumar Karwar &lt;amit.karwar@redpinesignals.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qtnfmac: pearl: pcie: fix memory leak in qtnf_fw_work_handler</title>
<updated>2018-08-03T05:47:58+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-04-05T15:49:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=de152d298fddfa4a3493967bd0e810f0da8d3a43'/>
<id>de152d298fddfa4a3493967bd0e810f0da8d3a43</id>
<content type='text'>
[ Upstream commit 3763770044640caeb1101cdea40697cc0814403c ]

In case memory resources for fw were succesfully allocated, release
them before jumping to fw_load_fail.

Addresses-Coverity-ID: 1466092 ("Resource leak")
Fixes: c3b2f7ca4186 ("qtnfmac: implement asynchronous firmware loading")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Sergey Matyukevich &lt;sergey.matyukevich.os@quantenna.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 3763770044640caeb1101cdea40697cc0814403c ]

In case memory resources for fw were succesfully allocated, release
them before jumping to fw_load_fail.

Addresses-Coverity-ID: 1466092 ("Resource leak")
Fixes: c3b2f7ca4186 ("qtnfmac: implement asynchronous firmware loading")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Sergey Matyukevich &lt;sergey.matyukevich.os@quantenna.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath10k: fix kernel panic while reading tpc_stats</title>
<updated>2018-08-03T05:47:58+00:00</updated>
<author>
<name>Tamizh Chelvam</name>
<email>tamizhr@codeaurora.org</email>
</author>
<published>2018-04-25T08:36:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a4f84c17f04e5d112ebba17b3ebce8f407b77d87'/>
<id>a4f84c17f04e5d112ebba17b3ebce8f407b77d87</id>
<content type='text'>
[ Upstream commit 4b190675ad06f5a6ecbeef0b01890c5fb372e3eb ]

When attempt to read tpc_stats for the chipsets which support
more than 3 tx chain will trigger kernel panic(kernel stack is corrupted)
due to writing values on rate_code array out of range.
This patch changes the array size depends on the WMI_TPC_TX_N_CHAIN and
added check to avoid write values on the array if the num tx chain
get in tpc config event is greater than WMI_TPC_TX_N_CHAIN.

Tested on QCA9984 with firmware-5.bin_10.4-3.5.3-00057

Kernel panic log :

[  323.510944] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: bf90c654
[  323.510944]
[  323.524390] CPU: 0 PID: 1908 Comm: cat Not tainted 3.14.77 #31
[  323.530224] [&lt;c021db48&gt;] (unwind_backtrace) from [&lt;c021ac08&gt;] (show_stack+0x10/0x14)
[  323.537941] [&lt;c021ac08&gt;] (show_stack) from [&lt;c03c53c0&gt;] (dump_stack+0x80/0xa0)
[  323.545146] [&lt;c03c53c0&gt;] (dump_stack) from [&lt;c022e4ac&gt;] (panic+0x84/0x1e4)
[  323.552000] [&lt;c022e4ac&gt;] (panic) from [&lt;c022e61c&gt;] (__stack_chk_fail+0x10/0x14)
[  323.559350] [&lt;c022e61c&gt;] (__stack_chk_fail) from [&lt;bf90c654&gt;] (ath10k_wmi_event_pdev_tpc_config+0x424/0x438 [ath10k_core])
[  323.570471] [&lt;bf90c654&gt;] (ath10k_wmi_event_pdev_tpc_config [ath10k_core]) from [&lt;bf90d800&gt;] (ath10k_wmi_10_4_op_rx+0x2f0/0x39c [ath10k_core])
[  323.583047] [&lt;bf90d800&gt;] (ath10k_wmi_10_4_op_rx [ath10k_core]) from [&lt;bf8fcc18&gt;] (ath10k_htc_rx_completion_handler+0x170/0x1a0 [ath10k_core])
[  323.595702] [&lt;bf8fcc18&gt;] (ath10k_htc_rx_completion_handler [ath10k_core]) from [&lt;bf961f44&gt;] (ath10k_pci_hif_send_complete_check+0x1f0/0x220 [ath10k_pci])
[  323.609421] [&lt;bf961f44&gt;] (ath10k_pci_hif_send_complete_check [ath10k_pci]) from [&lt;bf96562c&gt;] (ath10k_ce_per_engine_service+0x74/0xc4 [ath10k_pci])
[  323.622490] [&lt;bf96562c&gt;] (ath10k_ce_per_engine_service [ath10k_pci]) from [&lt;bf9656f0&gt;] (ath10k_ce_per_engine_service_any+0x74/0x80 [ath10k_pci])
[  323.635423] [&lt;bf9656f0&gt;] (ath10k_ce_per_engine_service_any [ath10k_pci]) from [&lt;bf96365c&gt;] (ath10k_pci_napi_poll+0x44/0xe8 [ath10k_pci])
[  323.647665] [&lt;bf96365c&gt;] (ath10k_pci_napi_poll [ath10k_pci]) from [&lt;c0599994&gt;] (net_rx_action+0xac/0x160)
[  323.657208] [&lt;c0599994&gt;] (net_rx_action) from [&lt;c02324a4&gt;] (__do_softirq+0x104/0x294)
[  323.665017] [&lt;c02324a4&gt;] (__do_softirq) from [&lt;c0232920&gt;] (irq_exit+0x9c/0x11c)
[  323.672314] [&lt;c0232920&gt;] (irq_exit) from [&lt;c0217fc0&gt;] (handle_IRQ+0x6c/0x90)
[  323.679341] [&lt;c0217fc0&gt;] (handle_IRQ) from [&lt;c02084e0&gt;] (gic_handle_irq+0x3c/0x60)
[  323.686893] [&lt;c02084e0&gt;] (gic_handle_irq) from [&lt;c02095c0&gt;] (__irq_svc+0x40/0x70)
[  323.694349] Exception stack(0xdd489c58 to 0xdd489ca0)
[  323.699384] 9c40:                                                       00000000 a0000013
[  323.707547] 9c60: 00000000 dc4bce40 60000013 ddc1d800 dd488000 00000990 00000000 c085c800
[  323.715707] 9c80: 00000000 dd489d44 0000092d dd489ca0 c026e664 c026e668 60000013 ffffffff
[  323.723877] [&lt;c02095c0&gt;] (__irq_svc) from [&lt;c026e668&gt;] (rcu_note_context_switch+0x170/0x184)
[  323.732298] [&lt;c026e668&gt;] (rcu_note_context_switch) from [&lt;c020e928&gt;] (__schedule+0x50/0x4d4)
[  323.740716] [&lt;c020e928&gt;] (__schedule) from [&lt;c020e490&gt;] (schedule_timeout+0x148/0x178)
[  323.748611] [&lt;c020e490&gt;] (schedule_timeout) from [&lt;c020f804&gt;] (wait_for_common+0x114/0x154)
[  323.756972] [&lt;c020f804&gt;] (wait_for_common) from [&lt;bf8f6ef0&gt;] (ath10k_tpc_stats_open+0xc8/0x340 [ath10k_core])
[  323.766873] [&lt;bf8f6ef0&gt;] (ath10k_tpc_stats_open [ath10k_core]) from [&lt;c02bb598&gt;] (do_dentry_open+0x1ac/0x274)
[  323.776741] [&lt;c02bb598&gt;] (do_dentry_open) from [&lt;c02c838c&gt;] (do_last+0x8c0/0xb08)
[  323.784201] [&lt;c02c838c&gt;] (do_last) from [&lt;c02c87e4&gt;] (path_openat+0x210/0x598)
[  323.791408] [&lt;c02c87e4&gt;] (path_openat) from [&lt;c02c9d1c&gt;] (do_filp_open+0x2c/0x78)
[  323.798873] [&lt;c02c9d1c&gt;] (do_filp_open) from [&lt;c02bc85c&gt;] (do_sys_open+0x114/0x1b4)
[  323.806509] [&lt;c02bc85c&gt;] (do_sys_open) from [&lt;c0208c80&gt;] (ret_fast_syscall+0x0/0x44)
[  323.814241] CPU1: stopping
[  323.816927] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.14.77 #31
[  323.823008] [&lt;c021db48&gt;] (unwind_backtrace) from [&lt;c021ac08&gt;] (show_stack+0x10/0x14)
[  323.830731] [&lt;c021ac08&gt;] (show_stack) from [&lt;c03c53c0&gt;] (dump_stack+0x80/0xa0)
[  323.837934] [&lt;c03c53c0&gt;] (dump_stack) from [&lt;c021cfac&gt;] (handle_IPI+0xb8/0x140)
[  323.845224] [&lt;c021cfac&gt;] (handle_IPI) from [&lt;c02084fc&gt;] (gic_handle_irq+0x58/0x60)
[  323.852774] [&lt;c02084fc&gt;] (gic_handle_irq) from [&lt;c02095c0&gt;] (__irq_svc+0x40/0x70)
[  323.860233] Exception stack(0xdd499fa0 to 0xdd499fe8)
[  323.865273] 9fa0: ffffffed 00000000 1d3c9000 00000000 dd498000 dd498030 10c0387d c08b62c8
[  323.873432] 9fc0: 4220406a 512f04d0 00000000 00000000 00000001 dd499fe8 c021838c c0218390
[  323.881588] 9fe0: 60000013 ffffffff
[  323.885070] [&lt;c02095c0&gt;] (__irq_svc) from [&lt;c0218390&gt;] (arch_cpu_idle+0x30/0x50)
[  323.892454] [&lt;c0218390&gt;] (arch_cpu_idle) from [&lt;c026500c&gt;] (cpu_startup_entry+0xa4/0x108)
[  323.900690] [&lt;c026500c&gt;] (cpu_startup_entry) from [&lt;422085a4&gt;] (0x422085a4)

Signed-off-by: Tamizh chelvam &lt;tamizhr@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 4b190675ad06f5a6ecbeef0b01890c5fb372e3eb ]

When attempt to read tpc_stats for the chipsets which support
more than 3 tx chain will trigger kernel panic(kernel stack is corrupted)
due to writing values on rate_code array out of range.
This patch changes the array size depends on the WMI_TPC_TX_N_CHAIN and
added check to avoid write values on the array if the num tx chain
get in tpc config event is greater than WMI_TPC_TX_N_CHAIN.

Tested on QCA9984 with firmware-5.bin_10.4-3.5.3-00057

Kernel panic log :

[  323.510944] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: bf90c654
[  323.510944]
[  323.524390] CPU: 0 PID: 1908 Comm: cat Not tainted 3.14.77 #31
[  323.530224] [&lt;c021db48&gt;] (unwind_backtrace) from [&lt;c021ac08&gt;] (show_stack+0x10/0x14)
[  323.537941] [&lt;c021ac08&gt;] (show_stack) from [&lt;c03c53c0&gt;] (dump_stack+0x80/0xa0)
[  323.545146] [&lt;c03c53c0&gt;] (dump_stack) from [&lt;c022e4ac&gt;] (panic+0x84/0x1e4)
[  323.552000] [&lt;c022e4ac&gt;] (panic) from [&lt;c022e61c&gt;] (__stack_chk_fail+0x10/0x14)
[  323.559350] [&lt;c022e61c&gt;] (__stack_chk_fail) from [&lt;bf90c654&gt;] (ath10k_wmi_event_pdev_tpc_config+0x424/0x438 [ath10k_core])
[  323.570471] [&lt;bf90c654&gt;] (ath10k_wmi_event_pdev_tpc_config [ath10k_core]) from [&lt;bf90d800&gt;] (ath10k_wmi_10_4_op_rx+0x2f0/0x39c [ath10k_core])
[  323.583047] [&lt;bf90d800&gt;] (ath10k_wmi_10_4_op_rx [ath10k_core]) from [&lt;bf8fcc18&gt;] (ath10k_htc_rx_completion_handler+0x170/0x1a0 [ath10k_core])
[  323.595702] [&lt;bf8fcc18&gt;] (ath10k_htc_rx_completion_handler [ath10k_core]) from [&lt;bf961f44&gt;] (ath10k_pci_hif_send_complete_check+0x1f0/0x220 [ath10k_pci])
[  323.609421] [&lt;bf961f44&gt;] (ath10k_pci_hif_send_complete_check [ath10k_pci]) from [&lt;bf96562c&gt;] (ath10k_ce_per_engine_service+0x74/0xc4 [ath10k_pci])
[  323.622490] [&lt;bf96562c&gt;] (ath10k_ce_per_engine_service [ath10k_pci]) from [&lt;bf9656f0&gt;] (ath10k_ce_per_engine_service_any+0x74/0x80 [ath10k_pci])
[  323.635423] [&lt;bf9656f0&gt;] (ath10k_ce_per_engine_service_any [ath10k_pci]) from [&lt;bf96365c&gt;] (ath10k_pci_napi_poll+0x44/0xe8 [ath10k_pci])
[  323.647665] [&lt;bf96365c&gt;] (ath10k_pci_napi_poll [ath10k_pci]) from [&lt;c0599994&gt;] (net_rx_action+0xac/0x160)
[  323.657208] [&lt;c0599994&gt;] (net_rx_action) from [&lt;c02324a4&gt;] (__do_softirq+0x104/0x294)
[  323.665017] [&lt;c02324a4&gt;] (__do_softirq) from [&lt;c0232920&gt;] (irq_exit+0x9c/0x11c)
[  323.672314] [&lt;c0232920&gt;] (irq_exit) from [&lt;c0217fc0&gt;] (handle_IRQ+0x6c/0x90)
[  323.679341] [&lt;c0217fc0&gt;] (handle_IRQ) from [&lt;c02084e0&gt;] (gic_handle_irq+0x3c/0x60)
[  323.686893] [&lt;c02084e0&gt;] (gic_handle_irq) from [&lt;c02095c0&gt;] (__irq_svc+0x40/0x70)
[  323.694349] Exception stack(0xdd489c58 to 0xdd489ca0)
[  323.699384] 9c40:                                                       00000000 a0000013
[  323.707547] 9c60: 00000000 dc4bce40 60000013 ddc1d800 dd488000 00000990 00000000 c085c800
[  323.715707] 9c80: 00000000 dd489d44 0000092d dd489ca0 c026e664 c026e668 60000013 ffffffff
[  323.723877] [&lt;c02095c0&gt;] (__irq_svc) from [&lt;c026e668&gt;] (rcu_note_context_switch+0x170/0x184)
[  323.732298] [&lt;c026e668&gt;] (rcu_note_context_switch) from [&lt;c020e928&gt;] (__schedule+0x50/0x4d4)
[  323.740716] [&lt;c020e928&gt;] (__schedule) from [&lt;c020e490&gt;] (schedule_timeout+0x148/0x178)
[  323.748611] [&lt;c020e490&gt;] (schedule_timeout) from [&lt;c020f804&gt;] (wait_for_common+0x114/0x154)
[  323.756972] [&lt;c020f804&gt;] (wait_for_common) from [&lt;bf8f6ef0&gt;] (ath10k_tpc_stats_open+0xc8/0x340 [ath10k_core])
[  323.766873] [&lt;bf8f6ef0&gt;] (ath10k_tpc_stats_open [ath10k_core]) from [&lt;c02bb598&gt;] (do_dentry_open+0x1ac/0x274)
[  323.776741] [&lt;c02bb598&gt;] (do_dentry_open) from [&lt;c02c838c&gt;] (do_last+0x8c0/0xb08)
[  323.784201] [&lt;c02c838c&gt;] (do_last) from [&lt;c02c87e4&gt;] (path_openat+0x210/0x598)
[  323.791408] [&lt;c02c87e4&gt;] (path_openat) from [&lt;c02c9d1c&gt;] (do_filp_open+0x2c/0x78)
[  323.798873] [&lt;c02c9d1c&gt;] (do_filp_open) from [&lt;c02bc85c&gt;] (do_sys_open+0x114/0x1b4)
[  323.806509] [&lt;c02bc85c&gt;] (do_sys_open) from [&lt;c0208c80&gt;] (ret_fast_syscall+0x0/0x44)
[  323.814241] CPU1: stopping
[  323.816927] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.14.77 #31
[  323.823008] [&lt;c021db48&gt;] (unwind_backtrace) from [&lt;c021ac08&gt;] (show_stack+0x10/0x14)
[  323.830731] [&lt;c021ac08&gt;] (show_stack) from [&lt;c03c53c0&gt;] (dump_stack+0x80/0xa0)
[  323.837934] [&lt;c03c53c0&gt;] (dump_stack) from [&lt;c021cfac&gt;] (handle_IPI+0xb8/0x140)
[  323.845224] [&lt;c021cfac&gt;] (handle_IPI) from [&lt;c02084fc&gt;] (gic_handle_irq+0x58/0x60)
[  323.852774] [&lt;c02084fc&gt;] (gic_handle_irq) from [&lt;c02095c0&gt;] (__irq_svc+0x40/0x70)
[  323.860233] Exception stack(0xdd499fa0 to 0xdd499fe8)
[  323.865273] 9fa0: ffffffed 00000000 1d3c9000 00000000 dd498000 dd498030 10c0387d c08b62c8
[  323.873432] 9fc0: 4220406a 512f04d0 00000000 00000000 00000001 dd499fe8 c021838c c0218390
[  323.881588] 9fe0: 60000013 ffffffff
[  323.885070] [&lt;c02095c0&gt;] (__irq_svc) from [&lt;c0218390&gt;] (arch_cpu_idle+0x30/0x50)
[  323.892454] [&lt;c0218390&gt;] (arch_cpu_idle) from [&lt;c026500c&gt;] (cpu_startup_entry+0xa4/0x108)
[  323.900690] [&lt;c026500c&gt;] (cpu_startup_entry) from [&lt;422085a4&gt;] (0x422085a4)

Signed-off-by: Tamizh chelvam &lt;tamizhr@codeaurora.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mt76: add rcu locking around tx scheduling</title>
<updated>2018-08-03T05:47:57+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2018-04-25T09:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3bad56027a936de7fdff5a9326b401805da50544'/>
<id>3bad56027a936de7fdff5a9326b401805da50544</id>
<content type='text'>
[ Upstream commit 1d868b70e06a2319fdda46cc46ec7c6762557543 ]

Fixes a reported lockdep error in mac80211:

[  179.867321] =============================
[  179.871510] WARNING: suspicious RCU usage
[  179.875528] 4.14.32 #0 Not tainted
[  179.878924] -----------------------------
[  179.882981] backports-2017-11-01/net/mac80211/tx.c:594 suspicious rcu_dereference_check() usage!
[  179.891785]
[  179.891785] other info that might help us debug this:
[  179.891785]
[  179.899824]
[  179.899824] rcu_scheduler_active = 2, debug_locks = 1
[  179.906343] 2 locks held by ksoftirqd/0/7:
[  179.910479]  #0:  (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-.}, at: [&lt;86b207a4&gt;] mt76_dma_tx_cleanup+0x64/0x354 [mt76]
[  179.919734]  #1:  (&amp;(&amp;fq-&gt;lock)-&gt;rlock){+.-.}, at: [&lt;87238410&gt;] ieee80211_tx_dequeue+0x54/0xc3c [mac80211]
[  179.929890]
[  179.929890] stack backtrace:
[  179.934257] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 4.14.32 #0
[  179.940421] Stack : 00000000 00000000 00000000 00000000 80e0fce2 00000036 00000000 00000000
[  179.948864]         87c3d24c 80696377 8061039c 00000000 00000007 00000001 87c5db78 6534689d
[  179.957306]         00000000 00000000 80e10000 87c5da74 00000001 0000015a 00000007 00000000
[  179.965748]         00000000 806a0000 000e4171 00000000 00000000 00000000 ffffffff 00000001
[  179.974189]         806c0000 8692b240 86b000d0 87316fe4 00000001 802c9a68 00000000 80700000
[  179.982632]         ...
[  179.985104] Call Trace:
[  179.987582] [&lt;80010a48&gt;] show_stack+0x58/0x100
[  179.992040] [&lt;804c2c58&gt;] dump_stack+0xe8/0x170
[  179.996868] [&lt;87234a04&gt;] ieee80211_tx_h_select_key+0xa8/0x5b8 [mac80211]
[  180.004299] [&lt;87238d44&gt;] ieee80211_tx_dequeue+0x988/0xc3c [mac80211]
[  180.011048] [&lt;86b230dc&gt;] mt76_txq_schedule+0x110/0x3a4 [mt76]
[  180.016821] [&lt;86b209d0&gt;] mt76_dma_tx_cleanup+0x290/0x354 [mt76]
[  180.022777] [&lt;86be2e60&gt;] mt7603_tx_tasklet+0x40/0x6c [mt7603e]
[  180.028637] [&lt;80037058&gt;] tasklet_action+0x110/0x1ec
[  180.033532] [&lt;804e1dac&gt;] __do_softirq+0x164/0x35c
[  180.038235] [&lt;80037174&gt;] run_ksoftirqd+0x40/0x84
[  180.042870] [&lt;800580c8&gt;] smpboot_thread_fn+0x1a8/0x1d8
[  180.048023] [&lt;800542e8&gt;] kthread+0x130/0x144
[  180.052297] [&lt;8000b1f8&gt;] ret_from_kernel_thread+0x14/0x1c

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 1d868b70e06a2319fdda46cc46ec7c6762557543 ]

Fixes a reported lockdep error in mac80211:

[  179.867321] =============================
[  179.871510] WARNING: suspicious RCU usage
[  179.875528] 4.14.32 #0 Not tainted
[  179.878924] -----------------------------
[  179.882981] backports-2017-11-01/net/mac80211/tx.c:594 suspicious rcu_dereference_check() usage!
[  179.891785]
[  179.891785] other info that might help us debug this:
[  179.891785]
[  179.899824]
[  179.899824] rcu_scheduler_active = 2, debug_locks = 1
[  179.906343] 2 locks held by ksoftirqd/0/7:
[  179.910479]  #0:  (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-.}, at: [&lt;86b207a4&gt;] mt76_dma_tx_cleanup+0x64/0x354 [mt76]
[  179.919734]  #1:  (&amp;(&amp;fq-&gt;lock)-&gt;rlock){+.-.}, at: [&lt;87238410&gt;] ieee80211_tx_dequeue+0x54/0xc3c [mac80211]
[  179.929890]
[  179.929890] stack backtrace:
[  179.934257] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 4.14.32 #0
[  179.940421] Stack : 00000000 00000000 00000000 00000000 80e0fce2 00000036 00000000 00000000
[  179.948864]         87c3d24c 80696377 8061039c 00000000 00000007 00000001 87c5db78 6534689d
[  179.957306]         00000000 00000000 80e10000 87c5da74 00000001 0000015a 00000007 00000000
[  179.965748]         00000000 806a0000 000e4171 00000000 00000000 00000000 ffffffff 00000001
[  179.974189]         806c0000 8692b240 86b000d0 87316fe4 00000001 802c9a68 00000000 80700000
[  179.982632]         ...
[  179.985104] Call Trace:
[  179.987582] [&lt;80010a48&gt;] show_stack+0x58/0x100
[  179.992040] [&lt;804c2c58&gt;] dump_stack+0xe8/0x170
[  179.996868] [&lt;87234a04&gt;] ieee80211_tx_h_select_key+0xa8/0x5b8 [mac80211]
[  180.004299] [&lt;87238d44&gt;] ieee80211_tx_dequeue+0x988/0xc3c [mac80211]
[  180.011048] [&lt;86b230dc&gt;] mt76_txq_schedule+0x110/0x3a4 [mt76]
[  180.016821] [&lt;86b209d0&gt;] mt76_dma_tx_cleanup+0x290/0x354 [mt76]
[  180.022777] [&lt;86be2e60&gt;] mt7603_tx_tasklet+0x40/0x6c [mt7603e]
[  180.028637] [&lt;80037058&gt;] tasklet_action+0x110/0x1ec
[  180.033532] [&lt;804e1dac&gt;] __do_softirq+0x164/0x35c
[  180.038235] [&lt;80037174&gt;] run_ksoftirqd+0x40/0x84
[  180.042870] [&lt;800580c8&gt;] smpboot_thread_fn+0x1a8/0x1d8
[  180.048023] [&lt;800542e8&gt;] kthread+0x130/0x144
[  180.052297] [&lt;8000b1f8&gt;] ret_from_kernel_thread+0x14/0x1c

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
