summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorHenry Orosco <henry.orosco@intel.com>2017-06-24 00:04:01 +0300
committerDoug Ledford <dledford@redhat.com>2017-07-20 18:20:49 +0300
commitc709d7f229a273c7c5664e9dfe5432b031842d0c (patch)
tree47d9f2b40d70d316466ba2fcc0fa15a39c1044df /drivers/infiniband
parentc5c9d27e6c79ab3ab36092fe67fb7f2c6a120171 (diff)
downloadlinux-c709d7f229a273c7c5664e9dfe5432b031842d0c.tar.xz
i40iw: Update list correctly
To avoid infinite loop, in i40iw_ieq_handle_exception, update plist inside while loop. Signed-off-by: Henry Orosco <henry.orosco@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_puda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/hw/i40iw/i40iw_puda.c
index 1bb16814560f..71050c5d29a0 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_puda.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c
@@ -1414,10 +1414,10 @@ static void i40iw_ieq_handle_exception(struct i40iw_puda_rsrc *ieq,
if (!list_empty(rxlist)) {
tmpbuf = (struct i40iw_puda_buf *)rxlist->next;
- plist = &tmpbuf->list;
while ((struct list_head *)tmpbuf != rxlist) {
if ((int)(buf->seqnum - tmpbuf->seqnum) < 0)
break;
+ plist = &tmpbuf->list;
tmpbuf = (struct i40iw_puda_buf *)plist->next;
}
/* Insert buf before tmpbuf */