https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79944

--- Comment #2 from Dmitry Vyukov <dvyukov at google dot com> ---
I've shutup that bug with dest = NULL, but then I immediately got this:

BUG: KASAN: global-out-of-bounds in clear_bit
include/linux/bitops_compiler.h:15 [inline]
BUG: KASAN: global-out-of-bounds in dma_channel_table_init+0x81/0x18c
drivers/dma/dmaengine.c:334
Write of size 8 at addr ffffffff84d5e921 by task swapper/0/1

which looks like another bug because clear_bit is defined as:

static inline void
clear_bit(long nr, volatile unsigned long *addr)
{
        __atomic_fetch_and((char *)addr + (nr / 8), ~(1 << (nr % 8)),
__ATOMIC_RELAXED);
}

Unless I am missing something, type of the first arg to __atomic_fetch_and s
char* so this should be a 1 byte access.

Extracting and minimizing this is quite time consuming, so maybe you will just
spot something else in that code.

Reply via email to