]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: wilc1000: fix DMA on stack objects
authorAjay.Kathat@microchip.com <Ajay.Kathat@microchip.com>
Tue, 9 Aug 2022 07:57:56 +0000 (07:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 08:47:13 +0000 (10:47 +0200)
commit5212d958f6518003cd98c9886f8e8aedcfc25741
tree3f2d17f44c0339e85c1c1a577301caf23319d88b
parent374b04cb6e7b7bf99e44a0110df83615b0fccbcd
wifi: wilc1000: fix DMA on stack objects

[ Upstream commit 40b717bfcefab28a0656b8caa5e43d5449e5a671 ]

Sometimes 'wilc_sdio_cmd53' is called with addresses pointing to an
object on the stack. Use dynamically allocated memory for cmd53 instead
of stack address which is not DMA'able.

Fixes: 5625f965d764 ("wilc1000: move wilc driver out of staging")
Reported-by: Michael Walle <mwalle@kernel.org>
Suggested-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Tested-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220809075749.62752-1-ajay.kathat@microchip.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/microchip/wilc1000/netdev.h
drivers/net/wireless/microchip/wilc1000/sdio.c
drivers/net/wireless/microchip/wilc1000/wlan.c