]> Git Repo - linux.git/commitdiff
cifs: prevent truncation from long to int in wait_for_free_credits
authorRonnie Sahlberg <[email protected]>
Thu, 2 Jul 2020 00:55:41 +0000 (10:55 +1000)
committerSteve French <[email protected]>
Thu, 2 Jul 2020 01:01:26 +0000 (20:01 -0500)
The wait_event_... defines evaluate to long so we should not assign it an int as this may truncate
the value.

Reported-by: Marshall Midden <[email protected]>
Signed-off-by: Ronnie Sahlberg <[email protected]>
Signed-off-by: Steve French <[email protected]>
fs/cifs/transport.c

index d11e31064679b12a6e315679cc2ff8210cf4b569..84433d0653f92a896eba0a063eecdec1b3321b6d 100644 (file)
@@ -523,7 +523,7 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits,
                      const int timeout, const int flags,
                      unsigned int *instance)
 {
-       int rc;
+       long rc;
        int *credits;
        int optype;
        long int t;
This page took 0.072581 seconds and 4 git commands to generate.