diff options
author | Kaike Wan <kaike.wan@intel.com> | 2017-06-17 10:37:26 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-20 11:20:50 -0400 |
commit | a25ce4270bfdd522207b02f81a594c7d1746b697 (patch) | |
tree | 1abc324af4c736e444135f1c6aa0f97201611048 /drivers/mfd/tps65086.c | |
parent | 266098b841d48f7f0db40424bdbc072e4db14e9b (diff) |
IB/rdmavt: Setting of QP timeout can overflow jiffies computation
Current computation of qp->timeout_jiffies in rvt_modify_qp() will cause
overflow due to the fact that the input to the function usecs_to_jiffies
is only 32-bit ( unsigned int). Overflow will occur when attr->timeout is
equal to or greater than 30. The consequence is unnecessarily excessive
retry and thus degradation of the system performance.
This patch fixes the problem by limiting the input to 5-bit and calling
usecs_to_jiffies() before multiplying the scaling factor.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/mfd/tps65086.c')
0 files changed, 0 insertions, 0 deletions