i40iw: Protect req_resource_num update
authorMustafa Ismail <mustafa.ismail@intel.com>
Mon, 22 Aug 2016 23:15:58 +0000 (18:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:21:19 +0000 (15:21 +0200)
commitd8db2da632f3af15c4e12d3982a7102a746c21d2
tree07de428887ddea7a8cff48e06176cdda504d6487
parent5c091f61e600b5b2b996b5f7fc8c840fee8db809
i40iw: Protect req_resource_num update

commit 44856be3e95c87f03e850ef4fdf8c0503c2dde18 upstream.

In i40iw_alloc_resource(), ensure that the update to
req_resource_num is protected by the lock.

Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status")
Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/i40iw/i40iw.h