linux/include
Rasmus Villemoes 7275b09785 linux/bitmap.h: handle constant zero-size bitmaps correctly
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>
2018-10-31 08:54:12 -07:00
..
acpi
asm-generic hugetlb: introduce generic version of huge_ptep_get 2018-10-26 16:26:34 -07:00
clocksource
crypto
drm drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
dt-bindings ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
keys
kvm
linux linux/bitmap.h: handle constant zero-size bitmaps correctly 2018-10-31 08:54:12 -07:00
math-emu
media media updates for v4.20-rc1 2018-10-29 14:29:58 -07:00
memory
misc
net Pull request for inclusion in 4.20 2018-10-29 09:09:47 -07:00
pcmcia
ras
rdma
scsi
soc ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
sound
target
trace Merge branch 'akpm' (patches from Andrew) 2018-10-26 19:33:41 -07:00
uapi media updates for v4.20-rc1 2018-10-29 14:29:58 -07:00
video
xen