From: Ronnie Sahlberg Date: Thu, 2 Jul 2020 00:55:41 +0000 (+1000) Subject: cifs: prevent truncation from long to int in wait_for_free_credits X-Git-Tag: v5.8-rc4~15^2 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/19e888678bac8c82206eb915eaf72741b2a2615c cifs: prevent truncation from long to int in wait_for_free_credits 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 Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French --- diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index d11e31064679..84433d0653f9 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -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;