Re: UBSAN: Undefined behaviour in drivers/net/wireless/intel/iwlwifi/mvm/utils.c:838:5

From: Luciano Coelho
Date: Wed Dec 13 2017 - 09:32:42 EST


On Wed, 2017-12-13 at 14:25 +0100, Paul Menzel wrote:
> Dear Linux folks,
>
>
> I enabled the undefined behavior sanitizer, and built Linusâ master
> branch under Ubuntu 17.10 with gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0.
>
> ```
> $ grep UBSAN /boot/config-4.15.0-rc3+
> CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
> # CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set
> CONFIG_UBSAN=y
> CONFIG_UBSAN_SANITIZE_ALL=y
> # CONFIG_UBSAN_ALIGNMENT is not set
> CONFIG_UBSAN_NULL=y
> ```
>
> Starting the system the messages below are printed.
>
> Starting the system and using the wireless device shows the messages
> below.

Thanks for reporting! This shouldn't cause any problems, but I'll fix
it by checking that the mac80211_queue is not INVALID_QUEUE (255) which
seems to be the trigger for this warning.

--
Cheers,
Luca.