[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE-0n52=yYW6SuMUPwGiv374K7D6DDpOZdJUudHdhMa7x2p1CA@mail.gmail.com>
Date: Mon, 27 Sep 2021 14:09:35 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Arnd Bergmann <arnd@...nel.org>, Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
"Kristian H. Kristensen" <hoegsberg@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>
Cc: Arnd Bergmann <arnd@...db.de>,
Christian König <christian.koenig@....com>,
Jordan Crouse <jordan@...micpenguin.net>,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] drm/msm/submit: fix overflow check on 64-bit architectures
Quoting Arnd Bergmann (2021-09-27 04:36:23)
> From: Arnd Bergmann <arnd@...db.de>
>
> The overflow check does causes a warning from clang-14 when 'sz' is a type
> that is smaller than size_t:
>
> drivers/gpu/drm/msm/msm_gem_submit.c:217:10: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
> if (sz == SIZE_MAX) {
>
> Change the type accordingly.
>
> Fixes: 20224d715a88 ("drm/msm/submit: Move copy_from_user ahead of locking bos")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
Reviewed-by: Stephen Boyd <swboyd@...omium.org>
Powered by blists - more mailing lists