]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Fix bug that blocks process on exit after port bounce
authorJianxin Xiong <jianxin.xiong@intel.com>
Thu, 19 May 2016 12:21:57 +0000 (05:21 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 26 May 2016 15:23:11 +0000 (11:23 -0400)
commit69e65d47f94b8e78da3671b1609cf325e3881e42
tree3b94997fa2b5f7c5c91e8351b9d917b9d28e02ed
parentef23d69f3d3dc04f89d97ca59eb42c141d8f89ff
IB/hfi1: Fix bug that blocks process on exit after port bounce

During the processing of a user SDMA request, if there was an
error before the request counter was increased, the state of
the packet queue could be updated incorrectly, causing the
counter to underflow. As the result, the process could get
stuck later since the counter could never get back to 0.

This patch adds a condition to guard the packet queue update
so that the counter is only decreased if it has been increased
before the error happens.

Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/user_sdma.c