Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-17621 lnet: fix conns_per_peer bounds check
[fs/lustre-release.git]
/
lnet
/
klnds
/
o2iblnd
/
o2iblnd.c
diff --git
a/lnet/klnds/o2iblnd/o2iblnd.c
b/lnet/klnds/o2iblnd/o2iblnd.c
index
4277f8b
..
03fce9f
100644
(file)
--- a/
lnet/klnds/o2iblnd/o2iblnd.c
+++ b/
lnet/klnds/o2iblnd/o2iblnd.c
@@
-1382,7
+1382,7
@@
kiblnd_nl_set(int cmd, struct nlattr *attr, int type, void *data)
break;
case LNET_NET_O2IBLND_TUNABLES_ATTR_CONNS_PER_PEER:
num = nla_get_s64(attr);
- if (num >
-1 ||
num < 128)
+ if (num >
= 0 &&
num < 128)
tunables->lnd_tun_u.lnd_o2ib.lnd_conns_per_peer = num;
else
rc = -ERANGE;