android_kernel_samsung_univ.../include
Alexander Potapenko 1b94a87cf9 llist: clang: introduce member_address_is_nonnull()
commit beaec533fc2701a28a4d667f67c9f59c6e4e0d13 upstream.

Currently llist_for_each_entry() and llist_for_each_entry_safe() iterate
until &pos->member != NULL.  But when building the kernel with Clang,
the compiler assumes &pos->member cannot be NULL if the member's offset
is greater than 0 (which would be equivalent to the object being
non-contiguous in memory).  Therefore the loop condition is always true,
and the loops become infinite.

To work around this, introduce the member_address_is_nonnull() macro,
which casts object pointer to uintptr_t, thus letting the member pointer
to be NULL.

Signed-off-by: Alexander Potapenko <glider@google.com>
Tested-by: Sodagudi Prasad <psodagud@codeaurora.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-08 11:51:59 +02:00
..
acpi
asm-generic mm/vmalloc: add interfaces to free unmapped page table 2018-03-28 18:40:14 +02:00
clocksource
crypto
drm drm: Allow determining if current task is output poll worker 2018-03-18 11:17:48 +01:00
dt-bindings
keys
kvm
linux llist: clang: introduce member_address_is_nonnull() 2018-04-08 11:51:59 +02:00
math-emu
media
memory
misc
net tcp: sysctl: Fix a race to avoid unexpected 0 window from space 2018-03-22 09:23:22 +01:00
pcmcia
ras
rdma RDMA/ucma: Introduce safer rdma_addr_size() variants 2018-04-08 11:51:59 +02:00
rxrpc
scsi
soc
sound
target
trace
uapi PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant 2018-04-08 11:51:57 +02:00
video
xen
Kbuild