Files
twx-linux/include/linux
Vinod Koul 2656ee5a5a linux/kernel.h: fix overflow for DIV_ROUND_UP_ULL
[ Upstream commit 8f9fab480c ]

DIV_ROUND_UP_ULL adds the two arguments and then invokes
DIV_ROUND_DOWN_ULL.  But on a 32bit system the addition of two 32 bit
values can overflow.  DIV_ROUND_DOWN_ULL does it correctly and stashes
the addition into a unsigned long long so cast the result to unsigned
long long here to avoid the overflow condition.

[akpm@linux-foundation.org: DIV_ROUND_UP_ULL must be an rval]
Link: http://lkml.kernel.org/r/20190625100518.30753-1-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-21 09:03:11 +02:00
..
2019-04-17 08:38:42 +02:00
2019-04-20 09:16:05 +02:00
2019-07-03 13:14:48 +02:00
2019-03-23 20:10:09 +01:00
2019-05-31 06:46:18 -07:00
2019-05-22 07:37:44 +02:00
2019-05-16 19:41:22 +02:00
2019-05-04 09:20:11 +02:00
2019-06-11 12:20:52 +02:00
2019-04-17 08:38:45 +02:00
2019-06-17 19:51:56 +02:00