Files
kernel_google_wahoo/include/linux
Rasmus Villemoes 540d0d6340 linux/bitmap.h: handle constant zero-size bitmaps correctly
[ Upstream commit 7275b097851a5e2e0dd4da039c7e96b59ac5314e ]

The static inlines in bitmap.h do not handle a compile-time constant
nbits==0 correctly (they dereference the passed src or dst pointers,
despite only 0 words being valid to access).  I had the 0-day buildbot
chew on a patch [1] that would cause build failures for such cases without
complaining, suggesting that we don't have any such users currently, at
least for the 70 .config/arch combinations that was built.  Should any
turn up, make sure they use the out-of-line versions, which do handle
nbits==0 correctly.

This is of course not the most efficient, but it's much less churn than
teaching all the static inlines an "if (zero_const_nbits())", and since we
don't have any current instances, this doesn't affect existing code at
all.

[1] lkml.kernel.org/r/20180815085539.27485-1-linux@rasmusvillemoes.dk

Link: http://lkml.kernel.org/r/20180818131623.8755-3-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Yury Norov <ynorov@caviumnetworks.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sudeep Holla <sudeep.holla@arm.com>
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-11-28 18:25:53 +01:00
..
2015-10-17 21:22:08 -07:00
2016-03-09 15:34:52 -08:00
2019-04-27 09:33:59 +02:00
2018-04-08 11:51:57 +02:00
2018-04-24 09:32:12 +02:00
2015-11-07 10:40:47 -07:00
2015-10-18 10:14:39 -07:00
2019-03-23 08:44:38 +01:00
2019-11-25 15:54:25 +01:00
2017-07-15 11:57:44 +02:00
2015-10-30 01:47:27 -04:00
2018-01-17 09:35:30 +01:00
2017-08-06 19:19:42 -07:00
2016-04-20 15:42:02 +09:00
2015-10-23 05:44:28 -07:00
2015-10-13 19:01:25 +02:00
2016-10-28 03:01:30 -04:00
2015-11-23 09:44:58 +01:00
2015-10-27 18:55:31 -07:00
2015-10-20 22:10:45 +08:00
2016-03-03 15:07:28 -08:00
2015-11-06 17:50:42 -08:00
2016-12-08 07:15:24 +01:00
2017-08-24 17:02:36 -07:00
2015-10-22 08:59:18 -07:00
2019-11-10 11:21:14 +01:00
2016-09-30 10:18:37 +02:00
2019-04-27 09:33:54 +02:00
2018-11-21 09:27:36 +01:00
2019-06-17 19:54:22 +02:00
2016-04-12 09:08:35 -07:00
2015-10-19 01:01:21 +02:00
2018-11-27 16:08:02 +01:00
2015-11-23 09:44:58 +01:00
2015-12-13 14:30:59 -08:00
2015-11-13 20:34:33 -05:00