]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
IB/hfi1: Check for error on call to alloc_rsm_map_table
authorJohn Fleck <john.fleck@intel.com>
Mon, 15 Jul 2019 16:45:21 +0000 (12:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Aug 2019 17:05:28 +0000 (19:05 +0200)
commit5ba28ec91434d777be6edf24d495773ad5ca7043
tree3be78d4c767b77382730125761fc49a6f153a55c
parentd8bd04e32ff7469a849bdb858c7dc758febc5283
IB/hfi1: Check for error on call to alloc_rsm_map_table

commit cd48a82087231fdba0e77521102386c6ed0168d6 upstream.

The call to alloc_rsm_map_table does not check if the kmalloc fails.
Check for a NULL on alloc, and bail if it fails.

Fixes: 372cc85a13c9 ("IB/hfi1: Extract RSM map table init from QOS")
Link: https://lore.kernel.org/r/20190715164521.74174.27047.stgit@awfm-01.aw.intel.com
Cc: <stable@vger.kernel.org>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: John Fleck <john.fleck@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/hfi1/chip.c