Thread (15 messages) 15 messages, 7 authors, 2023-05-04
STALE1173d

[PATCH net v3] sctp: remove unncessary check in sctp_sched_set_sched()

From: Gavrilov Ilia <hidden>
Date: 2023-05-03 10:31:27
Also in: linux-sctp, lkml
Subsystem: networking [general], sctp protocol, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Marcelo Ricardo Leitner, Xin Long, Linus Torvalds

The value of the 'sched' parameter of the function 'sctp_sched_set_sched'
is checked on the calling side, so the internal check can be removed

Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.

Signed-off-by: Ilia.Gavrilov <redacted>
---
V2:
 - Change the order of local variables 
 - Specify the target tree in the subject
V3:
 - Change description
 - Remove 'fixes'
 net/sctp/stream_sched.c | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/net/sctp/stream_sched.c b/net/sctp/stream_sched.c
index 330067002deb..52d308bdb469 100644
--- a/net/sctp/stream_sched.c
+++ b/net/sctp/stream_sched.c
@@ -155,9 +155,6 @@ int sctp_sched_set_sched(struct sctp_association *asoc,
 	if (old == n)
 		return ret;
 
-	if (sched > SCTP_SS_MAX)
-		return -EINVAL;
-
 	if (old)
 		sctp_sched_free_sched(&asoc->stream);
 
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help