]> git.baikalelectronics.ru Git - kernel.git/commit
staging/rdma/hfi1: fix pio progress routine race with allocator
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Thu, 3 Dec 2015 19:34:18 +0000 (14:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2015 22:00:17 +0000 (14:00 -0800)
commit5ceb1d60777530203135ce6325b6db9606bfaf6d
tree6c0d53abdbac2d58610da872f48e6a661590c8fa
parent18b6ba189649b430b3eaa0d5acce13aec7f42841
staging/rdma/hfi1: fix pio progress routine race with allocator

The allocation code assumes that the shadow ring cannot
be overrun because the credits will limit the allocation.

Unfortuately, the progress mechanism in sc_release_update() updates
the free count prior to processing the shadow ring, allowing the
shadow ring to be overrun by an allocation.

Reviewed-by: Mark Debbage <mark.debbage@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/pio.c