diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-30 19:03:22 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-30 19:03:22 +0200 |
commit | 1a0e93df1e107dc766fdf86ae88076efd9f376e6 (patch) | |
tree | 509fe2df07ba12b4dc71a176a34a734ff75d69c8 /include | |
parent | Merge tag 'fsnotify_for_v5.19-rc5' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
parent | linux/dim: Fix divide by 0 in RDMA DIM (diff) | |
download | linux-1a0e93df1e107dc766fdf86ae88076efd9f376e6.tar.xz linux-1a0e93df1e107dc766fdf86ae88076efd9f376e6.zip |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fixes from Jason Gunthorpe:
"Three minor bug fixes:
- qedr not setting the QP timeout properly toward userspace
- Memory leak on error path in ib_cm
- Divide by 0 in RDMA interrupt moderation"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
linux/dim: Fix divide by 0 in RDMA DIM
RDMA/cm: Fix memory leak in ib_cm_insert_listen
RDMA/qedr: Fix reporting QP timeout attribute
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dim.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dim.h b/include/linux/dim.h index b698266d0035..6c5733981563 100644 --- a/include/linux/dim.h +++ b/include/linux/dim.h @@ -21,7 +21,7 @@ * We consider 10% difference as significant. */ #define IS_SIGNIFICANT_DIFF(val, ref) \ - (((100UL * abs((val) - (ref))) / (ref)) > 10) + ((ref) && (((100UL * abs((val) - (ref))) / (ref)) > 10)) /* * Calculate the gap between two values. |