ibmvnic: avoid memset null scrq msgs
authorDany Madden <drt@linux.ibm.com>
Thu, 26 Nov 2020 00:04:26 +0000 (18:04 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Nov 2020 21:26:48 +0000 (13:26 -0800)
commit9281cf2d584083a450fd65fd27cc5f0e692f6e30
treec12f6353d257719c0f7d1881421a54dc06d77e07
parent18f141bf97d42f65abfdf17fd93fb3a0dac100e7
ibmvnic: avoid memset null scrq msgs

scrq->msgs could be NULL during device reset, causing Linux to crash.
So, check before memset scrq->msgs.

Fixes: c8b2ad0a4a901 ("ibmvnic: Sanitize entire SCRQ buffer on reset")
Signed-off-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c