Re: [PATCH] drm/msm: Avoid potential overflow in timeout_to_jiffies()

2021-10-01 Thread Dmitry Baryshkov
On 17/09/2021 03:59, Marek Vasut wrote: The return type of ktime_divns() is s64. The timeout_to_jiffies() currently assigns the result of this ktime_divns() to unsigned long, which on 32 bit systems may overflow. Furthermore, the result of this function is sometimes also passed to functions which

Re: [PATCH] drm/msm: Avoid potential overflow in timeout_to_jiffies()

2021-09-17 Thread Arnd Bergmann
On Fri, Sep 17, 2021 at 2:59 AM Marek Vasut wrote: > > The return type of ktime_divns() is s64. The timeout_to_jiffies() currently > assigns the result of this ktime_divns() to unsigned long, which on 32 bit > systems may overflow. Furthermore, the result of this function is sometimes > also passe

[PATCH] drm/msm: Avoid potential overflow in timeout_to_jiffies()

2021-09-16 Thread Marek Vasut
The return type of ktime_divns() is s64. The timeout_to_jiffies() currently assigns the result of this ktime_divns() to unsigned long, which on 32 bit systems may overflow. Furthermore, the result of this function is sometimes also passed to functions which expect signed long, dma_fence_wait_timeou