Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755185AbdLTLom (ORCPT ); Wed, 20 Dec 2017 06:44:42 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:51392 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754985AbdLTLoi (ORCPT ); Wed, 20 Dec 2017 06:44:38 -0500 Message-ID: <1513770274.4827.482.camel@coelho.fi> From: Luca Coelho To: Paul Menzel , sara.sharon@intel.com Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, it+linux-wireless@molgen.mpg.de, Johannes Berg , Emmanuel Grumbach , Intel Linux Wireless Date: Wed, 20 Dec 2017 13:44:34 +0200 In-Reply-To: References: <75bc638e-99a8-2f3f-6260-491f8a018af6@molgen.mpg.de> <1513175552.4827.365.camel@intel.com> <1513621815.4827.430.camel@coelho.fi> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 91.156.4.241 X-SA-Exim-Mail-From: luca@coelho.fi Subject: Re: UBSAN: Undefined behaviour in drivers/net/wireless/intel/iwlwifi/mvm/utils.c:838:5 X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on farmhouse.coelho.fi) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1816 Lines: 50 On Wed, 2017-12-20 at 12:00 +0100, Paul Menzel wrote: > Dear Luca, > > > Am 18.12.2017 um 19:30 schrieb Luca Coelho: > > On Wed, 2017-12-13 at 16:32 +0200, Luciano Coelho wrote: > > > On Wed, 2017-12-13 at 14:25 +0100, Paul Menzel wrote: > > > > 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. > > > > Can you try the following patch to see if the problem goes away? > > > > http://pastebin.coelho.fi/7b624f474846da52.txt > > Thank you. The warning is gone now. Thank you. Thanks for testing! We are actually improving the fix a bit, because it seems that we should not have gotten INVALID_QUEUE there. We will have a two-fold fix (Sari, whom I CCed, is working on the other patch). > For the next time, it’d > be great to provide the output of `git format-patch -1`, which can > be > applied with `git am`. The output of `git show` is with my knowledge > hard to apply. Ah, sorry about that. I didn't want to send a full patch here so that it wouldn't get picked up by patchworks, so I just pastebinned it. -- Luca.