]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rsi: Fix NULL pointer dereference in kmalloc
authorAditya Pakki <pakki001@umn.edu>
Sat, 23 Mar 2019 20:49:16 +0000 (15:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:44:59 +0000 (06:44 -0700)
commit8945579832c651bf58d123df0635fb099b403af5
tree7bd0d4e0b3ffc0aeab29f7de9b146d1a4a25b452
parent9df0ca5d1b3027a1c8d7eb9afb29b60e698aad32
rsi: Fix NULL pointer dereference in kmalloc

[ Upstream commit d5414c2355b20ea8201156d2e874265f1cb0d775 ]

kmalloc can fail in rsi_register_rates_channels but memcpy still attempts
to write to channels. The patch replaces these calls with kmemdup and
passes the error upstream.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/rsi/rsi_91x_mac80211.c