Skip to content

Commit

Permalink
cifs: prevent truncation from long to int in wait_for_free_credits
Browse files Browse the repository at this point in the history
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 <marshallmidden@gmail.com>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Ronnie Sahlberg authored and Steve French committed Jul 2, 2020
1 parent 9ffad92 commit 19e8886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 19e8886

Please sign in to comment.