Commit 13c90c2
RDMA/hns: Fix invalid sq params not being blocked
SQ params from userspace are checked in by set_user_sq_size(). But
when the check fails, the function doesn't return but instead keep
running and overwrite 'ret'. As a result, the invalid params will
not get blocked actually.
Add a return right after the failed check. Besides, although the
check result of kernel sq params will not be overwritten, to keep
coding style unified, move default_congest_type() before
set_kernel_sq_size().
Fixes: 6ec429d ("RDMA/hns: Support userspace configuring congestion control algorithm with QP granularity")
Signed-off-by: Junxian Huang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>1 parent b9f59a2 commit 13c90c2
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1121 | 1121 | | |
1122 | 1122 | | |
1123 | 1123 | | |
1124 | | - | |
| 1124 | + | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
1128 | 1130 | | |
1129 | 1131 | | |
1130 | | - | |
1131 | | - | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
1135 | 1136 | | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | | - | |
1141 | | - | |
1142 | 1141 | | |
1143 | 1142 | | |
1144 | 1143 | | |
| |||
0 commit comments