summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2020-07-02 03:55:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-22 10:32:52 +0300
commit91e81d2262e76fd7885c3fdc9e4917096a6b7178 (patch)
tree79899341357ededcb90fe586a7ead2e6545e1276 /fs/cifs
parent43046f786714f75aa833c7c8e4ae649099979d94 (diff)
downloadlinux-91e81d2262e76fd7885c3fdc9e4917096a6b7178.tar.xz
cifs: prevent truncation from long to int in wait_for_free_credits
[ Upstream commit 19e888678bac8c82206eb915eaf72741b2a2615c ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index fe1552cc8a0a..eafc49de4d7f 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -528,7 +528,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;